• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
selectedTag binding weirdness
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

selectedTag binding weirdness


  • Subject: selectedTag binding weirdness
  • From: Trygve Inda <email@hidden>
  • Date: Wed, 01 Feb 2012 11:04:03 -0800
  • Thread-topic: selectedTag binding weirdness

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 (email@hidden)

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:

This email sent to email@hidden


  • Prev by Date: Re: Window/Controller, View/Controller, View ?
  • Next by Date: Re: How to deactivate an app
  • Previous by thread: Re: Block Confusion...
  • Next by thread: Re: PDFView focus ring
  • Index(es):
    • Date
    • Thread