Wolfgang,

"Apple's implementation apparently doesn't change the menu items' states when 
-setAutoEnable: is called (with whatever argument), so I think we shouldn't 
bother either."

Thanks for your input and verifying the behavior on Mac OS X.  Given what 
you've said, my change is definitely wrong.

I'll review the change I made and see if there's a better way to approach the 
problem.

The issue I was having is that I am trying to get the menus in an NSPopUpButton 
instance to be enabled when loading from a nib.   It might be better to set 
autoenable to NO and explicitly enable them in initWithCoder: instead of doing 
this.

Thanks, :) 
Gregory Casamento -- Principal Consultant - OLC, Inc # GNUstep Chief Maintainer




________________________________
From: Wolfgang Lux <wolfgang....@gmail.com>
To: Gregory John Casamento <greg_casame...@yahoo.com>
Cc: GNUstep Developer <gnustep-dev@gnu.org>
Sent: Saturday, January 17, 2009 7:21:32 PM
Subject: Commit r27569

Gregory,

>         * Source/NSMenu.m: Correction to previous change.  Update when
>         setAutoenableItems: value is changed.  Altered update to
>         enable menu items when autoenable is not being performed.


I'm not sure what you are trying to achieve here, but this change is definitely 
wrong. If auto enable for a menu is disabled, the menu items' states are not 
NSMenu's business. At best one might consider enabling all items at the time 
auto enable is disabled, but then the -update method is certainly the wrong 
place for doing this. Note that update is called from the -itemChanged: method, 
which in turn is called whenever a menu item is changed, e.g., when the 
application attempts to disable it! Anyway, Apple's implementation apparently 
doesn't change the menu items' states when -setAutoEnable: is called (with 
whatever argument), so I think we shouldn't bother either.

Wolfgang



      
_______________________________________________
Gnustep-dev mailing list
Gnustep-dev@gnu.org
http://lists.gnu.org/mailman/listinfo/gnustep-dev
  • Commit r27569 Wolfgang Lux
    • Re: Commit r27569 Gregory John Casamento

Reply via email to