Re: Newbie: Referencing Objects
Re: Newbie: Referencing Objects
- Subject: Re: Newbie: Referencing Objects
- From: "john fogg" <email@hidden>
- Date: Sun, 26 Oct 2008 21:05:58 +0100
Hi again!
Thank you everybody for your answers.
On Sun, Oct 26, 2008 at 7:45 PM, Andy Lee <email@hidden> wrote:
> I don't know Actionscript but it looks like it has a global dictionary of
> objects that you can reference by name. There is nothing like "_root" in
> Objective-C.
I see, this is where I was wrong. Yes Actionscript has this global
dictionary. If you know the name of an object and its place in the
hierarchy you can access it.
In my game I think of having a sort of "controller object" that
controls the whole state of the game. So I'd like to access it from
almost every other object further down the hierarchy. How would you do
this?
Is there a way to create the controller object and store its reference
in a global variable? Or is there another common way to do this that
I'm not thinking of?
Sorry for asking such dumb questions but I'm still new to this.
Thanks again in advance!
_______________________________________________
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