freeride-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[FR-devel] RE: Databus hash problem **URGENT**


From: Rich Kilmer
Subject: [FR-devel] RE: Databus hash problem **URGENT**
Date: Fri, 9 Aug 2002 08:54:35 -0400

Ok...figured it out.  I implemented the new capability in Databus of a
hash slot.  To get the hash(wrapper) from the slot (or force the slot
into hash mode) you call slot.hash.  Unfortunately, the hash method is
used by a Hash to compute the hashcode of an object ;-)

I will have to change all this stuff over to something other than
hash...I think I will use 'map'.

Working on changes now...sorry for the inconvenience.

-rich

> -----Original Message-----
> From: Laurent Julliard [mailto:address@hidden
> Sent: Friday, August 09, 2002 8:38 AM
> To: Rich Kilmer
> Cc: Fox GUI Users
> Subject: Databus hash problem **URGENT**
> 
> Rich,
> 
> I was about to commit a bunch of new changes to the FR CVS repo and
> before that I have updated my working copy with your changes in the
> databus.
> 
> When testing my own code with the new databus version an error appears
> in my code that was not there before. Find below a small piece of code
> that reproduces the problem. I must say I'm not clear at all about
what
> causes this problem and I would very much like that you assist me. I
> need this to be fix before I can commit my changes
> 
> Here si the piece of code:
> 
> ----- begin code -----
> require 'freebase/freebase'
> include FreeBASE
> 
> bus = DataBus.new
> slot = bus['/my/path']
> 
> myhash = Hash.new
> 
> # make the slot a queue
> slot.queue
> 
> myhash[slot] = 'something'
> 
> exit
> ----- end code -----
> 
> Runtime error is the following:
> 
> ./freebase/databus.rb:433:in `check_type': Slot /my/path/ cannot be
set
> as a hash_slot because its already a queue_slot (RuntimeError)
>          from ./freebase/databus.rb:410:in `hash'
>          from ../sketch/hashbug.rb:12:in `[]='
>          from ../sketch/hashbug.rb:12
> 
> Note: if you don't make the slot a queue and comment this line, you'll
> have another interesting error.
> 
> Am I missing something here ?
> 
> Laurent
> --
> Laurent JULLIARD - Xerox R&T/SSTC/XPA - Open Source team
>  >> Host your Xerox Software project on CodeX: http://codex.xerox.com
>  >> address@hidden community: http://xww.linux.world.xerox.com
> 





reply via email to

[Prev in Thread] Current Thread [Next in Thread]