Re: setHidden: on MacOS 10.2
Re: setHidden: on MacOS 10.2
- Subject: Re: setHidden: on MacOS 10.2
- From: Glenn Andreas <email@hidden>
- Date: Tue, 4 May 2004 10:31:00 -0500
Am 29.04.2004 um 19:13 schrieb Daniel Todd Currie:
Please, please, please, do yourself a favor and look at this sample
project I put together:
http://dtcurrie.dnsalias.org/public/HiddenTest.sit
This is the way to go fo me. Unfortunately it doesn't seem like I
could simply create a category of NSButton with a setHidden: method,
right? As far as I understand categories, I cannot create further
object variables, and so I cannot store my superview, right?
No, you can't add a variable in a category, but you can fake it.
Basically, you've got a parallel dictionary that maps between the
object and the "pseudo-instance var", using the object as the key
(note that you need to be careful about reference counting - removing
the object from the dictionary when you try to make it go away).
Wrap that all up in accessor methods and you're good to go.
--
Glenn Andreas email@hidden
mondo blobbo, Cythera, Theldrow, oh my!
Mad, Bad, and Dangerous to Know
_______________________________________________
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.