bindings and menu items in Leopard

It seems that in Leopard, when I have a menu item bound to a value in
NSUserDefaults, when sending the action, the action is sent before the
value is toggled (as in checked/unchecked). In Tiger it first changed
the value and then sent the action. The annoying thing is a button
bound to the value will change the value and then send the action,
making it difficult when a menu and button are bound to the same
method. Is this a bug on Apple's end or some new desired behavior.

Looking at it further, it seems that any menu item that has any kind
of binding on it will have strange behavior, not performing
validateMenuItem: for example. Is this intentional, because it seems
pretty big to be a Leopard bug.

Thanks,
Mitchell Livingston

Begin forwarded message:

> From: Mitchell Livingston <livings124...>
> Date: October 29, 2007 2:45:58 PM EDT
> To: <cocoa-dev...>
> Subject: bindings and menu items in Leopard
>
> Hello,
>
> It seems that in Leopard, when I have a menu item bound to a value
> in NSUserDefaults, when sending the action, the action is sent
> before the value is toggled (as in checked/unchecked). In Tiger it
> first changed the value and then sent the action. The annoying thing
> is a button bound to the value will change the value and then send
> the action, making it difficult when a menu and button are bound to
> the same method. Is this a bug on Apple's end or some new desired
> behavior.
>
> Thanks,
> Mitchell Livingston

I thought I was doing something wrong, but I can confirm this
behavior. I'm definitely filing this as a bug.

August

On Oct 29, 2007, at 2:45 PM, Mitchell Livingston wrote:

> Hello,
>
> It seems that in Leopard, when I have a menu item bound to a value
> in NSUserDefaults, when sending the action, the action is sent
> before the value is toggled (as in checked/unchecked). In Tiger it
> first changed the value and then sent the action. The annoying thing
> is a button bound to the value will change the value and then send
> the action, making it difficult when a menu and button are bound to
> the same method. Is this a bug on Apple's end or some new desired
> behavior.
>
> Thanks,
> Mitchell Livingston