NSObject copy explanation
NSObject copy explanation
- Subject: NSObject copy explanation
- From: Thierry Bucco <email@hidden>
- Date: Fri, 12 Dec 2003 15:47:46 +0100
Hi,
I am 'playing' with ClockControl source code providing by Apple, in
order to insert my custom control in a NSTableView.
I did a modification on the class, since I want to pass a NSDictionary
to the control. All works like a charm, but in the setObjectValue
function (- (void)setObjectValue:(NSObject *)object) I need to copy the
dictionary sent by the NSTableView to my control.
My problem is when I use : newDictionary = [NSDictionary
dictionaryWithDictionary:(NSDictionary *)object];
I get a NULL object, but If I call : newDictionary = [(NSDictionary
*)object copy];
It works.
Can you explain to me the difference ?
Thanks.
Thierry
iconless.com
--
For April I will be in Montrial (as a permanent resident), if you know
a cool MacOS X company which is hiring a cool MacOS X developer, please
send me a mail...
http://www.iconless.com/site/aboutme/resume.html
--
_______________________________________________
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.