discuss-gnustep
[Top][All Lists]
Advanced

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

Re: Drag & Drop Problem


From: Fred Kiefer
Subject: Re: Drag & Drop Problem
Date: Tue, 23 Oct 2007 10:12:57 +0200
User-agent: Thunderbird 1.5.0.12 (X11/20060911)

Are you referring to the same view that started the drag? It is possible
that GNUstep excludes this view from getting drag notifications.
If you mean another view, is it in the same application, same window?

Is this the first time you use drag&drop and if nto, what is the difference?

Fred

Andreas Höschler wrote:
> 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?
> 
> Thanks,
> 
>   Andreas
> 
> 
> 
> 
> _______________________________________________
> Discuss-gnustep mailing list
> address@hidden
> http://lists.gnu.org/mailman/listinfo/discuss-gnustep
> 





reply via email to

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