• 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/lifetime of class methods (concerns Threads)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Variable scope/lifetime of class methods (concerns Threads)


  • Subject: Re: Variable scope/lifetime of class methods (concerns Threads)
  • From: Ole Voß <email@hidden>
  • Date: Fri, 19 May 2006 09:40:36 +0200


But what happens to the variables within a class method? What is their
scope?
And what do you call them? :-))

Variables declared in class methods are local variables. There is no difference in local variable handling between class and instance methods, including scope, initialization, etc. Remember that ObjC is C--all methods essentially break down to standard C functions. The different types of methods (class/instance) have more to do with OOP style and calling semantics rather than anything fundamental.

This is essentially what repliers have been saying but in a different way,
e.g. no class variables etc.

Thank you everybody - I was boggled there by all the reading of the past weeks.


Thank you for bearing with me ;-)


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: 
 >Re: Variable scope/lifetime of class methods (concerns Threads) (From: Keary Suska <email@hidden>)

  • Prev by Date: Re: How can I create a PDF document from a string in a non-GUI application?
  • Next by Date: Right way to check system version?
  • Previous by thread: Re: Variable scope/lifetime of class methods (concerns Threads)
  • Next by thread: Re: How to get buttonType from NSButton
  • Index(es):
    • Date
    • Thread