• 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: How to tell if NSArrayController has a selected CoreData instance?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to tell if NSArrayController has a selected CoreData instance?


  • Subject: Re: How to tell if NSArrayController has a selected CoreData instance?
  • From: "Timothy Reaves" <email@hidden>
  • Date: Wed, 30 Sep 2009 08:31:11 -0400 (EDT)
  • Importance: Normal

> On Sep 29, 2009, at 7:10 AM, "Timothy Reaves"
> <email@hidden
>  > wrote:
>
>>     What makes you think you can?  Logically, you shouldn't be
>> able.  I'd
>> imagine selectedObjects is always going to return an index set; it'd
>> just be empty with no selection.  I did try comparing it to
>> NSNoSelectionMarker just in case, and that doesn't work.
>
>
> Perhaps instead of imagining it would be more helpful to read the
> documentation. -[NSObjectController selectedObjects] returns the
> actual objects.
>
> You also don't seem to understand how bindings work. Even if -
> selectedObjects did return an NSIndexPath, it's a KVO-compliant
> property and therefore perfectly suitable for binding to.
>
> --Kyle Sluder

     I mixed up selectedIndexes.  So, yes, it does return objects.
However, it does not in fact return the actual objects.  It returns
proxies.  Which is what I said in my original post.  So even if there
are no selected objects, you get back a non-empty array.

     You've read some documentation I haven't;  contrary to your
statement, I do understand KVO.  What I don't understand is what key
I would bind to to determine if that core data proxy is a proxy of a
real object, or not?  Which is the actual subject of the post.  How
to determine if the selected object returned from selection,
selectedObjects, etc., is a proxy or not.

     Kyle, I appreciate your expertise.



_______________________________________________

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: How to tell if NSArrayController has a selected CoreData instance?
      • From: Mike Abdullah <email@hidden>
References: 
 >How to tell if NSArrayController has a selected CoreData instance? (From: Timothy Reaves <email@hidden>)
 >Re: How to tell if NSArrayController has a selected CoreData instance? (From: Kyle Sluder <email@hidden>)
 >Re: How to tell if NSArrayController has a selected CoreData instance? (From: "Timothy Reaves" <email@hidden>)
 >Re: How to tell if NSArrayController has a selected CoreData instance? (From: Kyle Sluder <email@hidden>)
 >Re: How to tell if NSArrayController has a selected CoreData instance? (From: "Timothy Reaves" <email@hidden>)
 >Re: How to tell if NSArrayController has a selected CoreData instance? (From: Kyle Sluder <email@hidden>)

  • Prev by Date: Re: Temporarily disabling all input events while non-blocking animations are playing
  • Next by Date: Re: How to tell if NSArrayController has a selected CoreData instance?
  • Previous by thread: Re: How to tell if NSArrayController has a selected CoreData instance?
  • Next by thread: Re: How to tell if NSArrayController has a selected CoreData instance?
  • Index(es):
    • Date
    • Thread