Re: NSPasteboard issue
Re: NSPasteboard issue
- Subject: Re: NSPasteboard issue
- From: Michael Ash <email@hidden>
- Date: Thu, 26 Mar 2009 21:09:47 -0400
On Thu, Mar 26, 2009 at 7:53 PM, Michael Swan <email@hidden> wrote:
> if (data = nil)
> {
> return;
> }
> // Here data = NULL
Of course it is, you just assigned nil to it!
Two pieces of advice:
1) Turn on more warnings. Your compiler can tell you about basic
mistakes like this. I personally add "-W -Wall -Wno-unused-parameter"
to my Other Warnings Flags in Xcode.
2) Use the debugger when code doesn't do what you expect. Simply
stepping through this code and looking at the values of the variables
at each line would show you where the problem lies.
Mike
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden