• 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 conflicts with Tiger
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Category conflicts with Tiger


  • Subject: Re: Category conflicts with Tiger
  • From: glenn andreas <email@hidden>
  • Date: Sat, 7 May 2005 15:03:05 -0500


On May 7, 2005, at 2:25 PM, David Sinclair wrote:

I have a large collection of categories that I use for all my apps, extending the Cocoa classes. (I plan on releasing them publicly when I get time.)

Reading through the release notes for Tiger, I've noticed several new methods that conflict with my categories. For example, I have a NSPopUpButton category that adds the following method, which conflicts with a new Tiger method:

	- (int)selectItemWithTag:(int)aTag;

This one isn't too difficult to resolve (I just need to rename it to avoid the conflict, with corresponding changes to existing code), but there are others that are harder to resolve.

One such is a NSImageView category that implements -cut:, -copy:, -paste:, and -delete:. I see that NSImageView now implements those natively. I can't simply rename my editions, since then they wouldn't be used, and can't remove them, as then those functions wouldn't work when running under Panther. What is the best way to resolve this conflict? Would calling -setAllowsCutCopyPaste: with NO disable Cocoa's implementation but let mine continue, or would mine fail too (since it is a category rather than a subclass). Is implementing them in a subclass of NSImageView instead of a category the only feasible solution?



You could build a "Panther Only" framework that contains all these things, which you would dynamically load at start up on a Panther system, and then just use the default (Tiger) versions available on Tiger.



Glenn Andreas                      email@hidden  <http://www.gandreas.com/> oh my! quadrium | build, mutate, evolve | images, textures, backgrounds, art

_______________________________________________
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


References: 
 >Category conflicts with Tiger (From: David Sinclair <email@hidden>)

  • Prev by Date: Category conflicts with Tiger
  • Next by Date: Re: Category conflicts with Tiger
  • Previous by thread: Category conflicts with Tiger
  • Next by thread: Re: Category conflicts with Tiger
  • Index(es):
    • Date
    • Thread