Re: How to write a "function" in Cocoa?
Re: How to write a "function" in Cocoa?
- Subject: Re: How to write a "function" in Cocoa?
- From: Scott Anguish <email@hidden>
- Date: Sat, 4 Nov 2006 02:35:40 -0500
On Nov 4, 2006, at 2:31 AM, Joel Norvell wrote:
Dear Cocoa-dev People,
I've had to implement identical functions in unrelated classes to
manipulate
NSRects. These functions also use Cocoa objects. Doing a Category
doesn't
seem feasible here since NSRect is not a class. How can I factor
these
functions into a file like MyRectUtilities.h? Is there example
code that does
this? (I've looked around but haven't found anything.)
Thanks,
Joel
P.S. I'm calling them "functions" since they don't use/need "self".
it's no different than doing it in C (since Obj-C is just a superset).
You'll need to declare them, write them, and import the appropriate
header when you want to use them.
_______________________________________________
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