FROM : Ondra Cada
DATE : Wed Nov 20 23:03:36 2002
On Wednesday, Nov 20, 2002, at 22:55 Europe/Prague, Sheehan Olver wrote:
> What if the class definition is split into multiple categories, which
> is used in a lot of cocoa class definition (ex. NSString is divided
> into categories NSStringPathExtensions, NSArrayPathExtensions, etc)?
> How can you ensure your implementation and not cocoa's is used?
Very simply: you subclass (and, if need be, poseAsClass:), instead of
using a category ;)
Also, you can put your category into a late-loaded bundle, but it's
kinda hack which depends on the current runtime implementation;
although I would bet something it won't change in this respect (just
since it is damn convenient just to place all those methods into tables
when a category is loaded, overriding anything which might have been
there before), I would not bet much!
(Matter of fact, I even haven't checked whether it still applies in the
current release ;)))
---
Ondra Cada
OCSoftware: <email_removed> http://www.ocs.cz
private <email_removed> http://www.ocs.cz/oc
_______________________________________________
cocoa-dev mailing list | <email_removed>
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.
DATE : Wed Nov 20 23:03:36 2002
On Wednesday, Nov 20, 2002, at 22:55 Europe/Prague, Sheehan Olver wrote:
> What if the class definition is split into multiple categories, which
> is used in a lot of cocoa class definition (ex. NSString is divided
> into categories NSStringPathExtensions, NSArrayPathExtensions, etc)?
> How can you ensure your implementation and not cocoa's is used?
Very simply: you subclass (and, if need be, poseAsClass:), instead of
using a category ;)
Also, you can put your category into a late-loaded bundle, but it's
kinda hack which depends on the current runtime implementation;
although I would bet something it won't change in this respect (just
since it is damn convenient just to place all those methods into tables
when a category is loaded, overriding anything which might have been
there before), I would not bet much!
(Matter of fact, I even haven't checked whether it still applies in the
current release ;)))
---
Ondra Cada
OCSoftware: <email_removed> http://www.ocs.cz
private <email_removed> http://www.ocs.cz/oc
_______________________________________________
cocoa-dev mailing list | <email_removed>
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.
| Related mails | Author | Date |
|---|---|---|
| Ondra Cada | Nov 20, 02:33 | |
| Ondra Cada | Nov 20, 03:24 | |
| Marco Binder | Nov 20, 12:23 | |
| Ondra Cada | Nov 20, 14:54 | |
| Andreas Mayer | Nov 20, 15:50 | |
| Clark S. Cox III | Nov 20, 20:46 | |
| Marcel Weiher | Nov 20, 22:39 | |
| Sheehan Olver | Nov 20, 22:55 | |
| Ondra Cada | Nov 20, 23:03 |






Cocoa mail archive

