FROM : Martin-Gilles Lavoie
DATE : Thu Nov 21 08:48:00 2002
While I'm working out the details of a class-action suit against Scott
Anguish & Al for their wrist-breaking but otherwise excellent Cocoa
programming book (www.cocoaprogramming.net), I have a question
regarding what they refer to as "toll free bridged" classes.
In reference to NSData, NSStyring, NSDictionary, NSArray, NSDate,
NSRunLoopTimer, NSSet, NSCharacterSet and NSURL classes having their
exact CF* (eg CFString) correspondances, which are said to be castable
from one type to the other (page 186, first paragraph through third).
For those who don't have wrist pains yet, the book goes on to say that
NSString* myString = [[NSString alloc] initWithString: @"test"];
can then
CFStringRef myCFString = (CFStringRef) myString;
How much can I rely on NS* being actually cast-able to CF* objects?
Is this a documented design goal that can be expected for the futur, or
a fluke caused by the separation of what has become the Core Foundation
from the Cocoa private implementation?
______________________________________________________________________
Martin-Gilles Lavoie
http://www.oracle.com
DATE : Thu Nov 21 08:48:00 2002
While I'm working out the details of a class-action suit against Scott
Anguish & Al for their wrist-breaking but otherwise excellent Cocoa
programming book (www.cocoaprogramming.net), I have a question
regarding what they refer to as "toll free bridged" classes.
In reference to NSData, NSStyring, NSDictionary, NSArray, NSDate,
NSRunLoopTimer, NSSet, NSCharacterSet and NSURL classes having their
exact CF* (eg CFString) correspondances, which are said to be castable
from one type to the other (page 186, first paragraph through third).
For those who don't have wrist pains yet, the book goes on to say that
NSString* myString = [[NSString alloc] initWithString: @"test"];
can then
CFStringRef myCFString = (CFStringRef) myString;
How much can I rely on NS* being actually cast-able to CF* objects?
Is this a documented design goal that can be expected for the futur, or
a fluke caused by the separation of what has become the Core Foundation
from the Cocoa private implementation?
______________________________________________________________________
Martin-Gilles Lavoie
http://www.oracle.com
| Related mails | Author | Date |
|---|---|---|
| Martin-Gilles Lavo… | Nov 21, 08:48 | |
| Matt Watson | Nov 21, 08:59 | |
| Eric Peyton | Nov 21, 09:00 |






Cocoa mail archive

