Re: NSPasteboard issue



On Thu, Mar 26, 2009 at 7:53 PM, Michael Swan <michaelswan@xxxxxxx> 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 (Cocoa-dev@xxxxxxxxxxxxxxx)

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:
http://lists.apple.com/mailman/options/cocoa-dev/maillists%40codeha.us

This email sent to maillists@xxxxxxxxx

...



Privacy