[Newbie] Binding an NSArrayController with/without NSObjectController
[Newbie] Binding an NSArrayController with/without NSObjectController
- Subject: [Newbie] Binding an NSArrayController with/without NSObjectController
- From: email@hidden
- Date: Thu, 14 May 2009 13:51:34 +0200
Hello list!
On my path to learning Cocoa, I am currently trying to get a grasp on
the "bindings thing".
Now I have run into a situation I can not solve myself, can not
google the solution to, and could not get an answer to browsing Cocoa-
Dev mailing list archive. I have the feeling it is very newb-ish
indeed, but from my end of the line it feels like rocket science at
the moment. :( Here goes:
I have stepped through the very excellent binding tutorial at http://
www.cocoadevcentral.com/articles/000080.php by Scott Stevenson. I
have followed the instructions and got it to run flawlessly.
I am also reading the very excellent introductory read "Cocoa
Programming for Mac OS X" by Aaron Hillegass and have followed the
instructions on his binding example.
Now here is what has me utterly confused and my actual question:
In his tutorial Scott is setting up an NSObjectController (named
"ControllerAlias" there) and binds that to the "MyController"
instance with the explanation:
<quote>
This little green box is your "bridge" between the code in
MyController.m and the bindings system.
</quote>
The two NSArrayControllers afterwards are bound to that
'ControllerAlias' NSObjectController.
Aaron in his book has me creating an NSArrayController and bind that
directly to the instance with the array to be controlled. Essentially
skipping the NSObjectController entirely. When I just thought it was
my "bridge to the bindings system"?
I would really like to understand the difference in approach between
these two methods and also if there are any implications by using or
skipping an NSObjectController in between. Would anyone find the time
and inclination to explain this to me, please?
Thank you!
Philipp
_______________________________________________
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