From: Kevin A. <al...@se...> - 2005-08-15 02:30:05
|
On Aug 14, 2005, at 7:31 AM, Roger Erens wrote: > Alex Tweedly wrote: >> I plan to produce a new doc - very similar to this one but for the >> multi-resource Editor. That's actually new stuff to cover, so it may >> take me longer. > Lots of succes! >> Then I'll look at updating the rest of the docs - but no promises. If >> you have run into one which is misleading or confusing because of it >> being out of date, suggest that and I'll move it near the top of my >> list (though that still doesn't mean I'll get to it). >> . > In the Changing a PythonCard Application section of Walkthrough 1 this > function is defined: > > def on_menuFileExit_select(self, event): > pass > > However, the minimal sample does not contain this function, and it is > not obvious whether it should be added. > > Best regards, > Roger > Yep, out-of-date documentation strikes again. The Background class contains the method def on_exit_command(self, evt): self.exit() and the resources were all changed to use a command named "exit" so you don't have to define this yourself, plus any buttons you want to create that mimic a File->Exit menu can just use an "exit" command as well for free. For example, in minimal.rsrc.py and most of the other samples and templates... { 'type':'MenuItem', 'name':'menuFileExit', 'label':'E&xit\tAlt+X', 'command':'exit' } ] } So this part of the walkthrough can be ignored. ka |