• 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
NSObject copy explanation
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

  • Follow-Ups:
    • Re: NSObject copy explanation
      • From: p3consulting <email@hidden>
  • Prev by Date: Re: Drawing application dock icon from Cocoa?
  • Next by Date: Re: Drawing application dock icon from Cocoa?
  • Previous by thread: RE: Use a variable form an istance into another
  • Next by thread: Re: NSObject copy explanation
  • Index(es):
    • Date
    • Thread