Re: Newbie Connections Question - Sorry!
Re: Newbie Connections Question - Sorry!
- Subject: Re: Newbie Connections Question - Sorry!
- From: Nate Murray <email@hidden>
- Date: Mon, 13 Sep 2004 18:39:37 -0700
Okay, then how do I get my objects to access any methods of any other
objects without using Interface Builder?
I know this is real basic stuff, but I cant seem to find the answer
anywhere.
I need to be able for all of my objects to access any other objects
that are created dynamically, not just the "freeze dried" objects of
interface builder.
On Sep 13, 2004, at 6:20 PM, Frederick Cheung wrote:
On 14 Sep 2004, at 03:10, Nate Murray wrote:
Summary: How can my object instances access my IB Outlets??
[snip]
The problem lies when I try to access adamView (or any other
IBOutlet) from the object that is created by something other than the
nib.
Let me re-phrase that: I have more than one AdamSprite object. One
for each sprite on the screen plus the one that the Nib file creates
when the program starts.
The AdamSprite object that the Nib file creates seems to have access
to all the IBOutlets but any other instances i create have a
"adamView" value of 0x0. Shouldnt all my instances have access to all
of the IB Outlets? If not, how to I give it to them?
I know this is a basic question but Ive spent a while looking it up
in the documentation and various tutorial sites (orielly, cocoa dev
central, etc). But I still cant figure it out!
Im assuming from what little I know of Objective-C that someone is
going to tell me that I need to have a (Controller?) class as an
intermediary between my instance objects and the class. Now if I
could just figure out how to do this...
Any help would be appreciated and I could certainly post the project
if anyone was that interested in helping.
Thanks,
So what you are saying is that you have an AdamSprite object
instatiated in your nib and connected the way you like it, but that
the AdamSprites you create afterwards aren't connected? If so, it's
normal. When you hook up the outltes on you instance of AdamSprite,
you are setting up one particular instance of that object, not some
general templatey type thing, since all a nib is is a bunch of freeze
dried objects.
You will need to set the variables when you create the instances.
Fred
_______________________________________________
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