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: Uli Kusterer <email@hidden>
- Date: Sat, 4 Nov 2006 10:27:08 +0100
Am 04.11.2006 um 09:56 schrieb Joel Norvell:
Scott A. and Scott S.,
Thanks!
Scott S.,
Yes, I'd been heading in the wrong direction.
You still are. First, if you really wanted to do your rect utility
stuff as methods, you'd want them to be class methods ("+"), so you
don't need to instantiate a useless MyRectUtilities object every time
you want to call this.
Second, you should just write a regular function. Don't create a
class, don't use ObjC method syntax, just create a function like in
C, but write ObjC code. There are lots of examples of that in Cocoa
already, e.g. NSStringFromRect(), NSHomeDirectory() etc.
Cheers,
-- M. Uli Kusterer
http://www.zathras.de
_______________________________________________
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