Re: NSArray usage question.
Re: NSArray usage question.
- Subject: Re: NSArray usage question.
- From: Seth Willits <email@hidden>
- Date: Fri, 6 May 2005 13:39:41 -0700
On May 6, 2005, at 12:24 PM, Brian O'Brien wrote:
Is this the correct way to build and use an NSArray?
NSPoint ptArray[plist->getNPolys()];
...
NSArray *pts = [NSArray arrayWithObjects:ptArray count:i];
NSPoints aren't objects, they're structures so you won't be able to
put them in an NSArray. Only objects which derive from NSObject can.
What you can do is use NSValue to store a point in the NSArray if you
really want.
See:
<http://developer.apple.com/documentation/Cocoa/Reference/Foundation/
ObjC_classic/Classes/NSValue.html#//apple_ref/doc/uid/20000177-
valueWithPoint_>
Seth Willits
----------------------------------------------------------
Freak Software - http://www.freaksw.com/
ResExcellence - http://www.resexcellence.com/realbasic/
----------------------------------------------------------
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden