• 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: Making my transition to bindings, how do I initilize my values & notifications?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Making my transition to bindings, how do I initilize my values & notifications?


  • Subject: Re: Making my transition to bindings, how do I initilize my values & notifications?
  • From: George Lawrence Storm <email@hidden>
  • Date: Mon, 18 Oct 2004 14:01:47 -0700

Opps, correction, I do have the ability to use -awakeFromNib: (I forgot it was an informal protocall) and have initilized my variables accordingly, however I still do not know how to tell the views to use their values.

-----

George Lawrence Storm
Macintosh Applications Development
Snohomish (Seattle), Washington
E-mail: <email@hidden>

-----

On Oct 18, 2004, at 1:48 PM, George Lawrence Storm wrote:

I have run through several tutorials and have read the documentation and I am now attempting to make my transition to the use of bindings.

I have run into my first road block:

-----

How do I set the initial values for my views to display? In the case of views using NSArrayControllers they seem to know what to do, however I am using a NSObjectController.

I am basing my controller on the "Currency Converter" example, in that example I see no place for my instance to receive a message that it is being instantiated and I do not see how to notify the views that they need to call the controller accessor(s) to lookup their value(s).

I have placed an -init in my class, however it is not being called, as I am attempting to follow "Currency Converter" which creates my object from its nib file and that my object is a NSObject and has no -awakeFromNib: is there any other place I can hook into to see when I am being instantiated?

As part of my testing I placed breakpoints in several of my accessors and they are not being called when the view(s) are created, so it appears that there is no automatic initialization.

All the examples I have found which initialize the views from stored data are based on NSArrayController, is there an example using NSObjectController?

-----

My next question concerns why "Currency Converter" calls +setKeys:triggerChangeNotificationsForDependentKey: from its class +initialization. I will be creation, destroying and will have multiple instances of the object which holds the data and its accessors, should I not be adding these notifications during the instantiation of my object and releasing them during their destruction?

_______________________________________________
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: Making my transition to bindings, how do I initilize my values & notifications?
      • From: Scott Anguish <email@hidden>
References: 
 >Making my transition to bindings, how do I initilize my values & notifications? (From: George Lawrence Storm <email@hidden>)

  • Prev by Date: Making my transition to bindings, how do I initilize my values & notifications?
  • Next by Date: Re: dictionaryWithContentsOfURL Questons
  • Previous by thread: Making my transition to bindings, how do I initilize my values & notifications?
  • Next by thread: Re: Making my transition to bindings, how do I initilize my values & notifications?
  • Index(es):
    • Date
    • Thread