Re: Serious class cluster/toll free bridging question (was: Newbie (to Cocoa) questions)
Re: Serious class cluster/toll free bridging question (was: Newbie (to Cocoa) questions)
- Subject: Re: Serious class cluster/toll free bridging question (was: Newbie (to Cocoa) questions)
- From: Ali Ozer <email@hidden>
- Date: Thu, 14 Mar 2002 09:15:40 -0800
>
What about _NEW_ versions of NSString, or NSMutableString, that are
>
created and returned by some other framework?
All subclasses of NSString and NSMutableString are automatically
toll-free bridged.
>
If a class CLUSTER is toll-free bridged, then one of these must be
>
true:
>
1. Only apple supplied members of the cluster is TFB, or
>
2. Frameworks can, and are expected to, provide CF*Ref equivalents of
>
any new NS-type class they add to a cluster
Neither one of these is true. When CFString functions are handed
objects which are not native CF instances, it dispatches the
corresponding ObjC method to the object. So, any subclass will work,
assuming it is a good subclass (that is, it implements the necessary
primitives, and anything else it needs for performance).
The reverse direction, that having CFString instances work in any
NSString context, works by making native CF instances look like
instances of a subclass of NSString.
Ali
_______________________________________________
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.