On 05/03/2013 03:52 PM, Paul McNett wrote:
On 5/3/13 3:24 PM, John Fabiani wrote:
In the past writing a save method in the app.MainFormClass ( in this case 
"MainForm")
still executed the save method in the parent (dabo.ui.Form) without having to 
do a
super().  At least I have code the worked that way in 0.9.5.
You have MainForm's as children of dForm's? The MainForm is supposed to be the
top-most form, never a child, and I'm surprised wx let you get away with that.

If you are talking about the user selecting the 'save' button in the toolbar or 
in
the menu, that sends an event that gets caught in potentially a few places (the
objects that bind to that event).

Anyway, dFormMain doesn't derive from dForm, so it won't by default bind to any 
of
the data-type events. You would have to set that up manually.

And yes, unless you said 'evt.stop()' in that handler, it would have gotten 
handled
by any other object also bound to that event. Now, two things about this:

1) it is undefined which handler will get to respond first.
2) this is different than calling super()

It could be I'm wrong but I thought that was how it was suppose to work anyway. 
 It's
not a big deal to add the super() just thought I'd bring it up
Please clarify with code, because I'm only guessing at your setup currently.

Paul


class MainForm(dabo.ui.dForm):
   def afterInit(self):
      ...
   def save(self):
      ...

if __name__ == "__main__":
    app = dabo.dApp()
    app.Icon = "pes.ico"
    app.BasePrefKey = "PesED"
    app.setAppInfo("appName", "PES Education")
    app.setAppInfo("appShortName", "PES Education") ## appShortName
normally just removes all the spaces from appName
    app.setAppInfo("Icon", "pes.ico")
    app.AboutFormClass = PesAbout
    app.MainFormClass = MainForm
    app.start()

I've been using the above basic code from the start.  I'm I doing it wrong?

Johnf



_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/dabo-users
Searchable Archives: http://leafe.com/archives/search/dabo-users
This message: http://leafe.com/archives/byMID/[email protected]

Reply via email to