On Jun 28, 2008, at 2:41 AM, Joan Lluch (casa) wrote:

The problem remains because when the user selects the menuItem the following happens:

FIRST- myAction is executed (possibly setting menuState to an appropiate value) SECOND - setMenuState is executed with a value contrary to the last one, so if I had set it to NO in myAction, it is called now with YES, destroying completely the intended behaviour. The menu item then shows the wrong state in the running app.

From where is this second call to setMenuState: coming?

Put a breakpoint on it and backtrace. In Xcode's Breakpoints window (Run > Show > Breakpoints), toggle open the breakpoint's disclosure triangle. Click the plus button to add a debugger command. Enter "bt" as the command. Enable the "Log" checkbox beneath the debugger command field. Click the checkbox in the continue (▐▶) column, so that the program automatically continues after the breakpoint fires. With this setup, the debugger console will get a backtrace every time your setMenuState: method is called, but it won't annoying break the flow of your application or require you to hit continue each time.

Cheers,
Ken_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to