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

DragDropImageView


  • Subject: DragDropImageView
  • From: Lorenzo <email@hidden>
  • Date: Tue, 09 Sep 2003 00:11:03 +0200

Hi,
I took this sample code from Apple. The name of the sample is
DragDropImageView. I wanted to implement it but it has a bug.
Is the 3rd time I ask here, but nobody replys to me.
Is anyone can help me to solve this bug?

If I drag an NSImage from the NSImageView onto a TextEdit document
or onto an Entourage HTML email, everything works fine.
But if I drag the *same* image to the Finder, the Finder freezes.
And if I drag the *same* image onto a Photoshop document, my application
quits unexpectedly. May you please explain me why? Here's the code.

Any help would be appreciated. Thank you.

----------------------------------------------------------------------
----------------------------------------------------------------------
- (void)pasteboard:(NSPasteboard *)sender provideDataForType:(NSString
*)type
{

if([type compare: NSTIFFPboardType] == NSOrderedSame){
[sender setData:[theImage TIFFRepresentation] forType:type];
}
else if([type compare: NSPDFPboardType] == NSOrderedSame){
[sender setData:[self dataWithPDFInsideRect:[self bounds]]
forType:type];
}
// I addes the following, but it freezes the same
else [sender setData: nil forType:type];


[self unregisterDraggedTypes];

isDragging = NO;
}
----------------------------------------------------------------------
----------------------------------------------------------------------

Also, I don't understand why, when quit, the routine above is being called
hundreds of times. It should be called once only (just to let the user copy,
quit and paste to other applications). No?


Best Regards
--
Lorenzo
email: email@hidden
_______________________________________________
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: DragDropImageView
      • From: "Alastair J.Houghton" <email@hidden>
  • Prev by Date: Re: Techniques for thread communication
  • Next by Date: Re: Techniques for thread communication
  • Previous by thread: benefits of introspection and loose typing
  • Next by thread: Re: DragDropImageView
  • Index(es):
    • Date
    • Thread