• 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 Observe All attributes of a Class Object from the Controller.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to Observe All attributes of a Class Object from the Controller.


  • Subject: Re: How to Observe All attributes of a Class Object from the Controller.
  • From: mmalcolm crawford <email@hidden>
  • Date: Fri, 16 Dec 2005 10:23:12 -0800


On Dec 16, 2005, at 8:14 AM, Janakiram wrote:

I have a class name Student . My Controller is observing all the properties of the Student Objects. To Observe each attribute of Student , presently i am writing addObserver:forKeyPath:options:context: method. Is there any other way which helps me to reduce the number of lines if the class attributes increase.

There is no other API to add an observer for multiple properties simultaneously. Instead, you could define a method for your model class to return the relevant observable properties as an array, and iterate over that. See Graphics Bindings at <http://homepage.mac.com/ mmalc/CocoaExamples/controllers.html>.

mmalc

_______________________________________________
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
References: 
 >How to Observe All attributes of a Class Object from the Controller. (From: Janakiram <email@hidden>)

  • Prev by Date: Re: What does crash in setSelectedRanges:affinity:stillSelecting mean?
  • Next by Date: Re: Whre find safari style tabs in IB
  • Previous by thread: How to Observe All attributes of a Class Object from the Controller.
  • Next by thread: Using Localized Strings within a SecurityAgent Plugin
  • Index(es):
    • Date
    • Thread