• 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: Serious class cluster/toll free bridging question (was: Newbie (to Cocoa) questions)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

References: 
 >Serious class cluster/toll free bridging question (was: Newbie (to Cocoa) questions) (From: Michael Gersten <email@hidden>)

  • Prev by Date: DERIVED_SOURCES_DIR
  • Next by Date: How do I cancel beginSheet: before the next run loop?
  • Previous by thread: Serious class cluster/toll free bridging question (was: Newbie (to Cocoa) questions)
  • Next by thread: Re: Newbie (to Cocoa) questions
  • Index(es):
    • Date
    • Thread