• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: How to write a "function" in Cocoa?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: How to write a "function" in Cocoa?
      • From: Scott Ribe <email@hidden>
References: 
 >Re: How to write a "function" in Cocoa? (From: Joel Norvell <email@hidden>)

  • Prev by Date: Re: How to write a "function" in Cocoa?
  • Next by Date: Re: How to write a "function" in Cocoa?
  • Previous by thread: Re: How to write a "function" in Cocoa?
  • Next by thread: Re: How to write a "function" in Cocoa?
  • Index(es):
    • Date
    • Thread