FROM : George Lawrence Storm
DATE : Mon Oct 18 22:48:16 2004
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?
-----
George Lawrence Storm
Macintosh Applications Development
Snohomish (Seattle), Washington
E-mail: <<email_removed>>
DATE : Mon Oct 18 22:48:16 2004
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?
-----
George Lawrence Storm
Macintosh Applications Development
Snohomish (Seattle), Washington
E-mail: <<email_removed>>
| Related mails | Author | Date |
|---|---|---|
| George Lawrence St… | Oct 18, 22:48 | |
| George Lawrence St… | Oct 18, 23:01 | |
| Scott Anguish | Oct 18, 23:45 | |
| George Lawrence St… | Oct 19, 00:16 |






Cocoa mail archive

