• 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: No selectedObjects After Insert:
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: No selectedObjects After Insert:
      • From: Keary Suska <email@hidden>
    • Re: No selectedObjects After Insert:
      • From: Scott Anguish <email@hidden>
References: 
 >No selectedObjects After Insert: (From: Keary Suska <email@hidden>)

  • Prev by Date: Re: sendAction:to:from: fails when application is in background
  • Next by Date: Re: No selectedObjects After Insert:
  • Previous by thread: No selectedObjects After Insert:
  • Next by thread: Re: No selectedObjects After Insert:
  • Index(es):
    • Date
    • Thread