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: Laurent Julliard
Subject: Re: [FR-devel] Database slot-type addtion
Date: Fri, 02 Aug 2002 18:30:51 -0400
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0.0) Gecko/20020529

Rich Kilmer wrote:
Proposed addition of a slot type of 'hash':

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.

Thoughts?

-rich

While I think the way the new functionality is implemented remains up to you (I think Curt and Horacio had some interesting variant) I definitely support this new feature.

I have been using FreeBASE for some time now and in several occasion I was tempted to store some values in slot attributes @slot.attr_... but problem is that it doesn't allow for notification. So I finally opted for data subslots for each attribute where notification was requested.

Your suggestion fixes this annoying problem.

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]