• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag
 

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Variable Scope (again)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Variable Scope (again)


  • Subject: Re: Variable Scope (again)
  • From: Ole Voß <email@hidden>
  • Date: Sun, 31 Oct 2004 23:14:44 +0100


On Oct 31, 2004, at 12:24 AM, Ole Voss wrote:

I'm just wondering why variables defined in 'main.m' don't appear to my
'AppController' instantiated in 'MainMenu.nib'

I thought that if I defined a variable in 'main.m' it should be visible to
all my classes - irrelevant of where they get instantiated. But this doesn't
seem to be the case.


Where are they defined in main.m?

If they are outside of the scope of main() function, then they will be visible to the rest of the app.

Yes, it was declared outside the scope of main.m


Have you declared the variables in a .h file somewhere? Are you seeing compiler warnings or link errors?

No link errors.


I will follow up on the suggestions made by Chris & Finnlay - I hope that will get me somewhere...


Thank you,

Ole.

_______________________________________________
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
References: 
 >Variable Scope (again) (From: Ole Voss <email@hidden>)
 >Re: Variable Scope (again) (From: "b.bum" <email@hidden>)

  • Prev by Date: Re: What could prevent Deep Sleep?
  • Next by Date: Re: NSFontManager is ignoring my delegate methods...
  • Previous by thread: Re: Variable Scope (again)
  • Next by thread: Where to include header files - relates to last question on variable scope
  • Index(es):
    • Date
    • Thread