• 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
NSObjectController add: Method RunLoop Deferral
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

NSObjectController add: Method RunLoop Deferral


  • Subject: NSObjectController add: Method RunLoop Deferral
  • From: Richard Somers <email@hidden>
  • Date: Mon, 2 Nov 2009 13:51:54 -0700

Consider a NSObjectController, controller, which is in entity mode and bound to a managed object context. The following code is in an initialization method.

     [controller add:self];
     id value = [controller valueForKeyPath:@"selection.numObj"];
     double num = [value doubleValue];

This produces an error: -[_NSStateMarker doubleValue]: unrecognized selector sent to instance.

I think the problem is with the add: method. The documentation states "Beginning with Mac OS X v10.4 the result of this method is deferred until the next iteration of the runloop so that the error presentation mechanism can provide feedback as a sheet."

I can not figure out how to work around this.

Richard

_______________________________________________

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: NSObjectController add: Method RunLoop Deferral
      • From: Jason Foreman <email@hidden>
  • Prev by Date: Re: Core Data not fulfill a fault (now: observer) after Save As
  • Next by Date: re: Core Data design question: receiving KVO notifications of partially mutated objects
  • Previous by thread: Re: Core Data not fulfill a fault (now: observer) after Save As
  • Next by thread: Re: NSObjectController add: Method RunLoop Deferral
  • Index(es):
    • Date
    • Thread