• 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: where have all the IVARS gone? (long time passing...)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: where have all the IVARS gone? (long time passing...)


  • Subject: Re: where have all the IVARS gone? (long time passing...)
  • From: email@hidden
  • Date: Mon, 10 Jul 2006 16:13:26 +1000

@interface myClass (Private)
//Private variables
int iVar1;
float iVar2;

//Private methods
- (void)doSomething;
@end

This works perfectly fine, because I have used the same approach to hide the
private variables in a static library created by me. Where I need to expose
the .h file.
The static library is up and used in other application without any problems.
Successfully hiding the private variables.

You haven't "hidden" any instance variables - you've removed them and replaced them with globals. You haven't even declared them static to at least reduce them to file scope. You can now have just one instance at a time, since all instances share these globals.


Wade Tregaskis

    ICQ: 40056898
    AIM, Yahoo & Skype: wadetregaskis
    MSN: email@hidden
    iChat & email: email@hidden
    Jabber: email@hidden
    Google Talk: email@hidden

    http://homepage.mac.com/wadetregaskis/

-- Sed quis custodiet ipsos custodes?


_______________________________________________ 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: where have all the IVARS gone? (long time passing...) (From: Vinay Prabhu <email@hidden>)

  • Prev by Date: RE: question about -init methods
  • Next by Date: Re: question about -init methods
  • Previous by thread: RE: where have all the IVARS gone? (long time passing...)
  • Next by thread: Re: where have all the IVARS gone? (long time passing...)
  • Index(es):
    • Date
    • Thread