• 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
Drag and drop: HELP PLEASE :)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Drag and drop: HELP PLEASE :)


  • Subject: Drag and drop: HELP PLEASE :)
  • From: email@hidden
  • Date: Thu, 18 Apr 2002 11:43:18 EDT

I still have a problem with drag and drop, i want to do some drag and drop
between 2 views. The problem is that the destination view doesn't send the
draggingEntered message when we drag the image over it, here's my code for
setting the source

@implementation DragView //subclass of NSImageView

- (void) mouseDown:(NSEvent *)event
{
NSPasteboard *dragPboard = [ NSPasteboard
pasteboardWithName:NSDragPboard ];

[dragPboard declareTypes:[NSArray arrayWithObject:NSTIFFPboardType]
owner:self];
[dragPboard setData:[[self image] TIFFRepresentation]
forType:NSTIFFPboardType];
[self dragImage:[self image] at:[self bounds].origin offset:NSZeroSize
event:event pasteboard:dragPboard source:self slideBack:YES];
}

- (NSDragOperation)draggingSourceOperationMaskForLocal:(BOOL)flag
{
return NSDragOperationCopy;
}

- (NSDragOperation)draggingEntered:(id <NSDragInfo>)sender
{
//I never enter here when i drag from another view of this same class
return NSDragOperationCopy;
}
_______________________________________________
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.

  • Prev by Date: Custom text container weirdness
  • Next by Date: Re: Porting a Win app to MAC 10
  • Previous by thread: Custom text container weirdness
  • Next by thread: Re: Porting a Win app to MAC 10
  • Index(es):
    • Date
    • Thread