• 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: Category Use
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Category Use


  • Subject: Re: Category Use
  • From: Lance Bland <email@hidden>
  • Date: Thu, 24 Jan 2002 18:44:56 -0500

On Thursday, January 24, 2002, at 05:36 PM, David Kopec wrote:

> I haven't really used Categories before. (I really should've, without
> them I've been forced to implement poor design.) Now that I've defined
> my category, do I need to import the category's header file or can I
> just use the standard class that it extends(NSMovie in this case)? If
> the answer is no, then how does the compiler/linker understand the
> category?

Most likely, you should import the category header file; although there
are plenty of examples where you don't have to. It is also considered
"good form" (by some) to import it if you use a method from the category.

... and lastly, for example, if you have something like a
#define
statement in the category header file then you must include it if you
want to use the precompiler symbol defined.

-lance
_______________________________________________
Lance Bland
System Administrator at VVI
mailto:email@hidden
http://www.vvi.com
Realtime, bulk and web data reporting and visualization


References: 
 >Category Use (From: David Kopec <email@hidden>)

  • Prev by Date: Re: Multiple invocations of awakeFromNib on a single instance?
  • Next by Date: Getting mouse events in an NSImageView
  • Previous by thread: Re: Category Use
  • Next by thread: Re: Category Use
  • Index(es):
    • Date
    • Thread