I have a popup menu for which I call:

[myPopup bind:@"selectedTag" toObject:myDict withKeyPath:@"myItem"
options:NULL];

If I use the GUI to set change the popup value, myDict.myItem is updated
accordingly.

But if I use:

[myPopup selectItemAtIndex:1];

It isn't

I have to use

[myDict setObject:[NSNumber numberWithInt:1] forKey:@"myItem"];


Shouldn't I be able to programmatically set the popup Value and have the
binding carry the change over to myDict?

The docs say:

selectedTag
An integer value that specifies the tag of the selected item in the
NSPopUpButton. When the selection changes in the NSPopUpButton, this value
is updated with the tag of the newly selected item.



_______________________________________________

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to