freeride-devel
[Top][All Lists]
Advanced

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

RE: [FR-devel] Database slot-type addtion


From: Rich Kilmer
Subject: RE: [FR-devel] Database slot-type addtion
Date: Fri, 2 Aug 2002 21:15:49 -0400

I will be committing this to CVS later (movie first!)

All implemented (and documented), but needs testing.

Adds to slot:

#slot.put(key, value)
#slot.get(key) #=> value
#slot.remove(key)
#slot.clear #=> removes all items from hash, queue, stack
#slot.is_hash_slot?
#slot.hash #=> turn slot into hash slot and return HashWrapper

Extra method on HashWrapper:

myHash = {1=>"me", 2=>"you}
slot.hash.set_hash(myHash)

so you can set up a hash quickly

-Rich

> -----Original Message-----
> From: address@hidden [mailto:freeride-
> address@hidden On Behalf Of Horacio Lopez
> Sent: Friday, August 02, 2002 4:15 PM
> To: address@hidden
> Subject: Re: [FR-devel] Database slot-type addtion
> 
> .....
> > Added methods to slot:
> >
> >  #slot.put(key, value)
> >  #slot.get(key) #=> value
> >  #slot.is_hash_slot?
> >  #slot.hash # turn slot into hash slot
> >
> > Right we could just set the data to a hash like this:
> >
> >  slot.data = {}
> >  slot.data[key]=value
> >  slot.data[key] #=> value
> >
> > But modifying the internal object's state as stored in a data slot
does
> > not propagate notifications events, whereas the new method (hash
slot)
> > would allow a subscriber to be notified.
> 
> great feature, *could* be used for accesing resource
> repositories.
> 
> is this already in the CVS ?
> 
> I could abstract the I18N api so that it actually
> uses these data slots to retrieve resource bundles.
> 
> 
> cheers
> 
> vruz
> 
> 
> 
> _______________________________________________
> Freeride-devel mailing list
> address@hidden
> http://mail.freesoftware.fsf.org/mailman/listinfo/freeride-devel





reply via email to

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