Re: No selectedObjects After Insert:
Re: No selectedObjects After Insert:
- Subject: Re: No selectedObjects After Insert:
- From: Scott Stevenson <email@hidden>
- Date: Fri, 3 Nov 2006 18:05:13 -0800
On Nov 3, 2006, at 2:30 PM, Keary Suska wrote:
I have an NSArrayController subclass, whose "selects on inert"
property is
on. The problem I am having is that after the -insert: is executed,
-selectedObjects is empty. I need to access the currently selected
object so
I can present an editing dialog for the selection contents. I can't
use
-selection (which I haven't checked for validity) since I need to
access
methods not supported by the proxy object.
I'm not sure what the direct answer is, but here are some things to
be aware of:
- Some NSController subclasses perform their actions in a delayed
manner, so that might be what you're seeing.
- You didn't specify if the UI had a selection but the -
selectedObject was empty, or if they were both empty.
- You *might* have some success setting up KVO observation on -
selectedObject
- You could also try using -selectedIndex as a way to fish the proper
object out of -arrangedObjects
- Scott
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden