Re: Cocoa-dev Digest, Vol 5, Issue 648
Re: Cocoa-dev Digest, Vol 5, Issue 648
- Subject: Re: Cocoa-dev Digest, Vol 5, Issue 648
- From: Johnny Lundy <email@hidden>
- Date: Sun, 20 Apr 2008 13:21:48 -0400
That works. I did not use the selectedObjects before because my
understanding was that was for detail controllers of detail views.
It is passed wrapped in a one-element NSArray, and I can extract the
dictionary with objectAtIndex:0.
Thanks ever so much - two days struggling with this. I was literally
starting to write to dts and burn one of my Tech Support Incidents
when I saw your reply.
Johnny
On Apr 20, 2008, at 12:39 PM, email@hidden wrote:
Date: Sun, 20 Apr 2008 08:30:44 -0600
From: Keary Suska <email@hidden>
Subject: Re: NSPopupButton Bindings
To: "Cocoa-Dev (Apple)" <email@hidden>
Message-ID: <C430AFB4.216B8%email@hidden>
Content-Type: text/plain; charset="US-ASCII"
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