Re: NEWBIE: Multiple class communication without DO
Re: NEWBIE: Multiple class communication without DO
- Subject: Re: NEWBIE: Multiple class communication without DO
- From: Andreas Mayer <email@hidden>
- Date: Sat, 6 Aug 2005 01:50:23 +0200
Am 05.08.2005 um 09:29 Uhr schrieb Benjamin D. Jones:
My problem is that even if I follow the examples I've been given I
don't think i truely understand how to correctly code the
communication. Any suggestions?
Please be more specific about what you actually want to do. There are
a lot of ways to communicate between objects.
Class name - Controller & PrefsController
Controller launches PrefsController's window and sends it a current
item list
PrefsController stores it in NSUserDefaults and loads the last 10
list items from the last session, along with the various values for
the actual preferences window. And sends the old list back to
Controller.
Usually you'd just have the main controller hold a reference to the
preference controller and use accessor methods to set and get the
values of the pref controller's instance variables.
But if it's just about NSUserDefaults you could also use bindings in
conjunction with NSUserDefaultsController. That's probably a lot less
work. (You will have to require at least Mac OS X 10.3 when using
bindings though.)
Andreas
_______________________________________________
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