Re: class variables and class methods
Re: class variables and class methods
- Subject: Re: class variables and class methods
- From: Robert Goldsmith <email@hidden>
- Date: Thu, 8 Jan 2004 01:09:29 +0000
>
If you need inheritance properties in class scope, do it using a class
>
accessor on the static variable, ie:
>
>
in .h file:
>
>
+ (int)myClassVariable;
>
>
in .m file:
>
>
static int myClassVariable = 0;
>
>
+ (int)myClassVariable {return myClassVariable;}
But this is the whole problem. If I then subclass this class and wish
myClassVariable to hold something different in the subclass but still
work with the inherited accessor / other methods, it won't. The
superclass's meClassVariable is used instead :(
Robert
---
GnuPG public key:
http://www.Far-Blue.co.uk
[demime 0.98b removed an attachment of type application/pgp-signature which had a name of PGP.sig]
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.