Re: Is it possible to call events in other .m classes?
Re: Is it possible to call events in other .m classes?
- Subject: Re: Is it possible to call events in other .m classes?
- From: Mark Townsend <email@hidden>
- Date: Tue, 27 Jan 2009 10:01:11 -0800
Arnaud,
Sounds like you have set File's Owner in your MainMenu.nib to be Main_TestPref and the ApplicationController is an object instance in your nib.
You want to have awakeFromNib: (which is what I think you are talking about when you say mainViewDidLoad:) to be in your ApplicationController.
I recommend two books that you should get in order to help get you started:
XCode 3 Unleashed
Cocoa Programming for Mac OS X by Aaron Hillegass
On Tue, Jan 27, 2009 at 7:22 AM, Arnaud Nicolet
<email@hidden> wrote:
Hello,
My configuration is somehow special: I have a Main_TestPref class and a ApplicationController class. The Main_TestPref class receives system events, like "mainViewDidLoad" when the interface is shown. The ApplicationController is the class whose outlets and actions are linked to (I couldn't link to the Main_TestPref class because Interface Builder don't know it exists).
When the application starts, I get the "mainViewDidLoad" in the Main_TestPref class. It's where I should update my controls to show saved values (read from a prefs file). My problem is that the class that knows my controls/outlets is the ApplicationController class, not the Main_TestPref class. So, in the "mainViewDidLoad" method of the Main_TestPref, I have to call a method in the instance of ApplicationController and I don't know how to do that.
I know it seems bad design but I think I haven't another choice.
I'm looking for some help, please.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden