freeride-devel
[Top][All Lists]
Advanced

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

RE: [FR-devel] modification to slot.


From: Curt Hibbs
Subject: RE: [FR-devel] modification to slot.
Date: Wed, 8 May 2002 19:41:57 -0700

Yohanes Santoso wrote:

> Another thing is: is there anyway we can put more information on
> notification? For example, if the buffer changes, I'd like to send out
> notification.

[snip]

> This can either be implemented in scratch, or, make use of the
> existing messaging capability of the databus.

My preference would be keep it as simple as possible as long as he needed
functionality is reasonably accessible -- and in this case I think that it
is.

The notification mechanism provides the minimum amount of information
needed: the reason for the notification and the slot which is the source of
the notification. I think it is reasonable to make the slot itself
responsible for providing extra information that subscribers might need.
This is flexible and completely open-ended.

In my code I've used three different techniques for providing additional
info (depending on what seemed appropriate):

1. Use a manager object as Rich suggested: slot.manager.get_extra_data()

2. Use the data object store in the slot to hold the extra data:
slot.data.get_extra_data()

3. Use slot attributes to hold extra data: slot.attr_extra_data

Curt




reply via email to

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