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

Re: NSPopupButton Bindings


  • Subject: Re: NSPopupButton Bindings
  • From: Keary Suska <email@hidden>
  • Date: Sun, 20 Apr 2008 08:30:44 -0600
  • Thread-topic: NSPopupButton Bindings

on 4/20/08 7:27 AM, email@hidden purportedly said:

> When I pass the selection of the Array Controller to my method, all I
> get for the parameter in NSLog is
>
> victim: <_NSControllerObjectProxy: 0x1059790> for the first parameter
> that was passed to the method.
>
> and trying to log [victim selection] or [victim selectionIndex], since
> it claims that it is an arrayController proxy,  of course returns
> Unrecognized Selector.
>
> I just want to get either the index or the value of the array that my
> popupButton/NSArrayController combo has when the user selects an item
> from the popup. Anything that will just tell me which of the seven
> items the user chose from the popup (without using IBAction).
>
> What's the secret? If I could get an integer that is the array index,
> or the content of that selected array member, that's all that I need.
> The array is a mutable array of seven mutable dictionaries, and the
> same technique works fine for passing the selected item (i.e. the row)
> of a one-column tableView.

This is as documented. If you need the actual object, use -selectedObjects
instead.

HTH,

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

References: 
 >Re: NSPopupButton Bindings (From: Johnny Lundy <email@hidden>)

  • Prev by Date: Re: Should a Method set NSError* to nil when No Error?
  • Next by Date: Re: Implementing a Slightly Unusual NSTableView
  • Previous by thread: Re: NSPopupButton Bindings
  • Next by thread: KVO and Object Arrays
  • Index(es):
    • Date
    • Thread