• 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
NSPopupButton Bindings-Related Issue
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

NSPopupButton Bindings-Related Issue


  • Subject: NSPopupButton Bindings-Related Issue
  • From: Keary Suska <email@hidden>
  • Date: Fri, 27 Jun 2008 22:01:04 -0600
  • Thread-topic: NSPopupButton Bindings-Related Issue

Generally, my needs are simple. In this case, I need a sheet that displays
an nspopupbutton populated with product names, where a user can select an
item from the popup and a description of the item would appear in a
designated space below the control, and of course I want to retrieve the
value after the sheet is dismissed, providing that the correct button is
pressed. Sounds easy, right?

So, I have an NSPanel with an NSPopupButton, NSTextField, and two buttons
("Cancel" and "Use"). The NSPopupButton "content" is bound to
"ProductController", which is a special NSArrayController subclass whose
content is an array objects I am interested in, with key "arrangedObjects"
no key path. "Content values" is bound to same with key path "name".
"Selected value" is bound to same but with controller key "selection" and
key path "name". NSTextField "value" is bound to ProductController
"selection" key path "descrip".

Okeydoke. BTW, there are some popup items that I want disabled, so I turn
off autoenableitems in awakeFromNib and disable them before I display the
sheet. Peachy keen cool. Popup appears as expected. However, when I select
an item, the NSTextField doesn't update. Furthermore, all of the disabled
items automagically enable (that's bad too). Crazy, huh?

Any ideas, anyone?

Keary Suska
Esoteritech, Inc.
"Demystifying technology for your home or business"


_______________________________________________

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

  • Follow-Ups:
    • Re: NSPopupButton Bindings-Related Issue
      • From: Ken Thomases <email@hidden>
  • Prev by Date: Re: while loop with sleep(): logging works, but not UI events
  • Next by Date: Re: while loop with sleep(): logging works, but not UI events
  • Previous by thread: Re: while loop with sleep(): logging works, but not UI events
  • Next by thread: Re: NSPopupButton Bindings-Related Issue
  • Index(es):
    • Date
    • Thread