• 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: categories question...
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: categories question...


  • Subject: Re: categories question...
  • From: Gerard Iglesias <email@hidden>
  • Date: Sun, 13 Jul 2003 13:42:27 +0200

On Sunday, July 13, 2003, at 11:43 AM, Philip George wrote:

Can someone who has some categories experience lend a hand here. I have a
category set up that adds to NSLayoutManager. It was working before I tried
over-riding the "init" method.

There is something to be aware of:

Category permit to add methods to an existing class, but if you re-write an existing method you disable the existing one and [super init] will call the one in the super class not the one in the current class. Hence you are completely remove the current implementation of the NSLayoutManager init method, and trash the instance...

The rule is the last category loaded, the last taken in account, it does permit very powerfully application patches when you have the original code and want to correct some mistake in it, but very dangerous to do with class you don't have the code :)

Hope that this will help

Gerard
_______________________________________________
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.

References: 
 >categories question... (From: Philip George <email@hidden>)

  • Prev by Date: Bug in Xcode, File Inspector lies to me.. (was: Re: How to construct Unicode Safe Strings in the source?)
  • Next by Date: Re: Linking a function to NSButton
  • Previous by thread: categories question...
  • Next by thread: Re: categories question...
  • Index(es):
    • Date
    • Thread