RE: fundamental question: how do I call controller methods from other classes?
RE: fundamental question: how do I call controller methods from other classes?
- Subject: RE: fundamental question: how do I call controller methods from other classes?
- From: "Matthew Youney" <email@hidden>
- Date: Thu, 22 May 2008 16:58:44 -0400
- Importance: Normal
Hal,
The controller instance is created by the IB. All I wanted to do is to be
able to call accessor methods on the controller (from other classes) to
manipulate the GUI (encapsulate the GUI stuff). I thought that this would be
a normal thing to do, but I guess not. I kinda think wiring sockets all
over the place is messy at best. I am new to Cocoa, and I am trying to
start out on the right paths with my projects.
Matt
Make sure you understand nil-targeted actions/File's Owner/responder
chain. That idiom might or might not be useful in this case. I can
picture sending various messages to nil that only the POSSocket class
will respond to, and have the POSSocket instance be the delegate of
your controller.
How is the controller being created? Right after creation might be
the time to tell it about objects it needs to know about.
Hal
_______________________________________________
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