Ed Leafe wrote: > On Jun 5, 2007, at 10:24 AM, <[EMAIL PROTECTED]> > <[EMAIL PROTECTED]> wrote: > >> When binding an event, is there a way to pass additional function >> argument(s)?
From what I have gleamed in the last week, no. >> >> For example on, on one object I need to call boundFunction(True) >> and on >> another I want to call boundFunction(False) > > Normally that would be managed by the event handler. Assuming that > the object you would want True passed is referenced by > 'self.TrueObject': > > def handler(self, evt): > param = (evt.EventObject is self.TrueObject) > > At this point, if the event object is TrueObject, 'param' will be > True; otherwise, False. > I am curious why you advise (or say "Normally") using the evt parameter over using separate methods. as in: def handler(self, evt, myBool): def handler1(self, evt): handler(self, evt, True): def handler2(self, evt): handler(self, evt, False): Carl K _______________________________________________ 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/dabo-users/[EMAIL PROTECTED]
