On Fri, Jul 11, 2008 at 1:29 AM, Paul McNett <[EMAIL PROTECTED]> wrote: > dabo Commit > Revision 4272 > Date: 2008-07-11 00:27:05 -0700 (Fri, 11 Jul 2008) > Author: Paul > Trac: http://svn.dabodev.com/trac/dabo/changeset/4272 > > Changed: > U trunk/dabo/ui/uiwx/dMenuItem.py > > Log: > Removed the raising of the ValueError if you set a menu item Caption in the > form of "Open\tCtrl+O". > > Instead, simply override any existing HotKey with the hotkey provided in > the string, and only set the caption part to the Caption property. > > The only potential problem with this is in this example: > > item.Caption = "Open\tCtrl+O" > ... > item.Caption = "Close" > > In this case, the item will still have the Ctrl+O hotkey, and if you > didn't want a hotkey, you'd have to then set it explicitly with: > > item.HotKey = None > > I think allowing the shortcut \t format doesn't harm anything, so why not > leave it in. If there's serious disagreement to this, let's give a > DeprecationWarning instead of the ValueError, as the \t method was the > only way to set the hotkeys until relatively recently and I know all my > apps use it still - I'm sure there are other apps out there as well.
This was how I had it originally, but changed it in favor of raising the ValueError. I still think we should depreciate setting the hotkey through the Caption. If we wrap another UI and they have another way of setting HotKeys then we're going to have to change it anyway. Nate L. _______________________________________________ Post Messages to: [email protected] Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-dev Searchable Archives: http://leafe.com/archives/search/dabo-dev This message: http://leafe.com/archives/byMID/[EMAIL PROTECTED]
