• 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
Problem with NSDragPboard
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Problem with NSDragPboard


  • Subject: Problem with NSDragPboard
  • From: Jamie Phelps <email@hidden>
  • Date: Tue, 11 Mar 2008 22:13:21 -0500

Hi, all. I am working on the Hillegass chapter that covers drag and drop, and I have the following method in my code.

- (void)writeStringToPasteboard:(NSPasteboard *)pb {
    NSLog(@"Writing %@ to pasteboard %@.",self.string, pb);
    // Copy string data to the pasteboard.
    [pb setString:self.string
          forType:NSStringPboardType];
    NSLog(@"%@",[pb stringForType:NSStringPboardType]);
}

Copy and paste work as expected, but drag and drop does not. It pastes a J every time. (The code handles only one character at a time.) When using drag and drop, the above code writes out the correct string to the console in the first NSLog call but the last one prints the J again. Can anyone offer any thoughts about where I might be going wrong in implementing my drag and drop code?

Thanks,
Jamie
_______________________________________________

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


  • Follow-Ups:
    • Re: Problem with NSDragPboard
      • From: Jens Alfke <email@hidden>
    • Re: Problem with NSDragPboard
      • From: Dave Hersey <email@hidden>
  • Prev by Date: Re: Controlling line tightening
  • Next by Date: Re: NSURLDownload and userInfo
  • Previous by thread: Re: Controlling line tightening
  • Next by thread: Re: Problem with NSDragPboard
  • Index(es):
    • Date
    • Thread