Re: How to add my custom structure to NSMutable Array??Pls help.
Re: How to add my custom structure to NSMutable Array??Pls help.
- Subject: Re: How to add my custom structure to NSMutable Array??Pls help.
- From: Jeff Harrell <email@hidden>
- Date: Fri, 11 Jul 2003 12:50:58 -0500
On Friday, July 11, 2003, at 10:42 AM, M. Uli Kusterer wrote:
Well, it gets the job done. But what he should really be doing, I
suppose, is declare an Objective-C class derived from NSObject and
have that contain a myStruct member variable. And then he would put
that in the NSMutableArray. That would be more OOP.
I've never been of the opinion that you should do things the
object-oriented way just to say that you did. My opinion is that you
should do what works. Structs are nice, simple, lightweight constructs.
Heck, NSPoint, NSSize, and NSRange are all structs.
In this case, I would vote for Dylan's suggestion of an NSValue wrapped
around a pointer to a struct.
--
email@hidden
http://homepage.mac.com/jharrell
_______________________________________________
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.