• 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: Bindings: is there a better way to observe when an object changes?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Bindings: is there a better way to observe when an object changes?


  • Subject: Re: Bindings: is there a better way to observe when an object changes?
  • From: mmalc crawford <email@hidden>
  • Date: Mon, 10 Sep 2007 11:24:57 -0700


On Sep 10, 2007, at 11:15 AM, Simone Tellini wrote:

NSEntityDescription is 10.4+, apart from that it could have been what I was looking for.
I tried using -attributeKeys from NSClassDescription, but it always returned nil.


Core Data doesn't provide "automatic" support for class descriptions:

"It is important to note that there are no class descriptions by default. To use NSClassDescription objects in your code you have to implement them for your model classes. For all concrete subclasses, you must provide implementations for all instance methods of NSClassDescription. (NSClassDescription provides only the implementation for the class methods that maintain the cache of registered class descriptions.) Once created, you must register a class description with the NSClassDescription method registerClassDescription:forClass:."
<http://developer.apple.com/documentation/Cocoa/Reference/Foundation/Classes/NSClassDescription_Class/Reference/Reference.html >


You could use the entity description -- there are several ways to retrieve the relevant information (e.g. [propertiesByName allKeys]), but...


are you finding any other problems with this approach?
no, it works fine. I just don't think that it's very elegant ;-)
Anyway, I think that I'm doing the only possible thing at the moment, so I'll stop wasting my time on it.


I wouldn't say you're "doing the *only* possible thing at the moment" -- per Shawn's and my earlier replies, it may be that you can "future- proof" your implementation by defining dependent properties for attributes affecting drawing.

mmalc

_______________________________________________

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: Bindings: is there a better way to observe when an object changes?
      • From: Simone Tellini <email@hidden>
References: 
 >Re: Bindings: is there a better way to observe when an object changes? (From: Charles Steinman <email@hidden>)
 >Re: Bindings: is there a better way to observe when an object changes? (From: Simone Tellini <email@hidden>)

  • Prev by Date: Re: Mach ports and namespaces
  • Next by Date: Re: custom view won't update
  • Previous by thread: Re: Bindings: is there a better way to observe when an object changes?
  • Next by thread: Re: Bindings: is there a better way to observe when an object changes?
  • Index(es):
    • Date
    • Thread