[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Drag & Drop Problem

From: Andreas Höschler
Subject: Drag & Drop Problem
Date: Mon, 22 Oct 2007 21:31:08 +0200

Hi all,

in a NSView subclass I do

- (void)setDroppingEnabled:(BOOL)flag
   if (flag) [self registerForDraggedTypes:[self pboardTypes]];
   else [self unregisterDraggedTypes];

- (NSArray *)pboardTypes
   return [NSArray arrayWithObject:SOObjectsPboardType];

- (void)mouseDown:(NSEvent *)theEvent
            NSArray *pboardTypes = [self pboardTypes];
            [pboard declareTypes:pboardTypes owner:self];
[pboard setPropertyList:[array valueForKey:@"stringRepresentation"] forType:SOObjectsPboardType]; [self dragImage:dragImage at:mouseLoc offset:dragOffset event:theEvent pasteboard:pboard source:self slideBack:YES];

- (NSDragOperation)draggingEntered:(id <NSDraggingInfo>)sender
   NSLog(@"draggingEntered %@", sender);
   return NSDragOperationLink;

- (BOOL)performDragOperation:(id <NSDraggingInfo>)sender

This works under MacOSX as expected. Under GNUstep draggingEntered and performDragOperation is never called when I drag the object over the view and GNUstep shows the "do not enter sign".

What am i missing?



reply via email to

[Prev in Thread] Current Thread [Next in Thread]