FROM : Hamish Allan
DATE : Thu Mar 27 22:05:05 2008
On Thu, Mar 27, 2008 at 8:44 PM, Justin Giboney
<<email_removed>> wrote:
> How can I get a variable that is static to each subclass, but that is
> declared in the super class?
In short, you can't. "static" in C means "within the scope of the
source file". Split your subclasses off into their own files, define
your static variables there, give them accessor methods, and use those
accessors in the superclass.
Hamish
DATE : Thu Mar 27 22:05:05 2008
On Thu, Mar 27, 2008 at 8:44 PM, Justin Giboney
<<email_removed>> wrote:
> How can I get a variable that is static to each subclass, but that is
> declared in the super class?
In short, you can't. "static" in C means "within the scope of the
source file". Split your subclasses off into their own files, define
your static variables there, give them accessor methods, and use those
accessors in the superclass.
Hamish
| Related mails | Author | Date |
|---|---|---|
| Justin Giboney | Mar 27, 21:44 | |
| Ken Thomases | Mar 27, 22:01 | |
| Hamish Allan | Mar 27, 22:05 | |
| Troy Stephens | Mar 27, 22:12 | |
| Jon Gordon | Mar 28, 02:47 |






Cocoa mail archive

