• 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
Re: NSPasteboard issue
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

References: 
 >NSPasteboard issue (From: Michael Swan <email@hidden>)

  • Prev by Date: NSFileManager: can't set group ID on 10.4
  • Next by Date: User experiencing crash with no report/ log
  • Previous by thread: NSPasteboard issue
  • Next by thread: NSFileManager: can't set group ID on 10.4
  • Index(es):
    • Date
    • Thread