Ed Leafe wrote: > On Nov 25, 2006, at 8:24 PM, Brian Snipes wrote: > > >> Looked at some existing code ( CxnEditor.py ) for examples of what >> to do >> and have a question. I was going to test a sample new menu entry by >> having it call a button's onHit event. Is that possible? I can't find >> any way of calling that even from a menu item click. >> > > That sounds like a somewhat backwards design. If you want the menu > item's Hit event and the button's Hit event to do the same thing, > then they should both be calling a common method. Typically the best > place for such a common event would be the form. In cases where the > same process needs to be triggered by several forms, the best place > for such a method would be the application object. > > An example of this would be on the SimpleFormWithBizobj. You can > either select a menu item to save your changes, or click on the > toolbar button. Either one will call the form's save() method, which > knows how to start the save process. > > -- Ed Leafe > That was my guess based on the CxnEditor.py code but as a quick test to see if I had the menu added properly I figured I would have it call on onHit event from one of the buttons on the form and got sidetracked/intrigued trying to figure out the proper calling method. I basically want to modify some of the existing items ( like About ) and remove some that won't be needed.
Thanks for the info. Brian _______________________________________________ Post Messages to: [email protected] Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users
