On Oct 12, 2010, at 10:14 AM, Henning Hraban Ramm wrote:
> I thought I got this right...
>
> I subclassed my events from dEvent like this:
>
> class OpenFile(dEvents.dEvent):
> pass
>
> and then raise it from a button Hit handler like this:
>
> self.raiseEvent(events.OpenFile, filename=self.FileName.Value)
You need to define the appliesToClass() classmethod for your event
class. From dEvent.py:
def appliesToClass(eventClass, objectClass):
""" Returns True if this event can be raised by the passed class.
Stub: subclass events need to override with appropriate logic.
"""
return False
appliesToClass = classmethod(appliesToClass)
Look at some of the classes in dEvent.py for examples of how this
method works.
-- Ed Leafe
_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users
Searchable Archives: http://leafe.com/archives/search/dabo-users
This message:
http://leafe.com/archives/byMID/[email protected]