Re: A Dictionary of NSRect?
Re: A Dictionary of NSRect?
- Subject: Re: A Dictionary of NSRect?
- From: j o a r <email@hidden>
- Date: Mon, 24 Sep 2001 15:07:15 -0700
On Monday, September 24, 2001, at 05:23 , email@hidden wrote:
I'm new to the whole object oriented scene and I'm trying to figure out
how to have a dictionary of NSRects. Dictionaries are for objects. How
do I make objects out of NSRects? Do I have to make a dummy class with
nothing in the datastructure but NSRects?
You can always encode the NSRect into a NSValue Object:
NSValue *myRectValue = [NSValue valueWithRect:myRect];
...and then fetch it using:
NSRect myRect = [myRectValue rectValue];
Have a look at NSNumber if you need to store int's, bool's and things in
a similar way.
Regards,
j o a r