NSColor Unable to be stored?
NSColor Unable to be stored?
- Subject: NSColor Unable to be stored?
- From: John Stringham <email@hidden>
- Date: Tue, 29 May 2001 23:52:47 -0400
Hi all,
Although I'm fairly sure this question must've been answered before I can't
find the answer in either Apple's documentation or other sites, so I'm
afraid I'm going to have to ask one of those patented "Dumb Questions":
Is it impossibly to store a NSColor in memory? What I've done is basically
the following: I declared
NSColor *storedColor;
In an object's header file. Afterwards, I put the function:
storedColor = [NSColor colorWithDeviceRed:1.0 Green:1.0 Blue:1.0 Alpha:1.0];
in the object's init function (obviously not with those values,) and then
finally in the object's drawRect function:
[storedColor set];
Now this seems pretty simple to me, and I cannot for the life of me
understand why it won't work. I get an error saying "NCSFString -set:
selector not recognized" or something similar. Is this a special case, or am
I missing something obvious? Any help is appreciated.
-John S.