discuss-gnustep
[Top][All Lists]
Advanced

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

Re: Drag & Drop Problem


From: Andreas Höschler
Subject: Re: Drag & Drop Problem
Date: Fri, 2 Nov 2007 14:56:58 +0100

Hoi Fred,

Mac OS X behaves differently here. The drop works with a pressed
Ctrl-Key. What exactly does a pressed Ctrl-Key mean to GNUstep?


Control changes the operation to link, see _updateOperationMask: in
GSDragView.m:

  if (mod & NSControlKeyMask)
    {
      operationMask = NSDragOperationLink;
    }

You may influence this behaviour by implementing
ignoreModifierKeysWhileDragging on your dragging source.

It is also possible that you see the wrong cursor due to the code in
_setCursor not being able to determine, which action you want. This is
rather probable, as the code there is programmed optimistically.

Thanks! After implementing

- (BOOL)ignoreModifierKeysWhileDragging
{
   return YES;
}

in my calenderview it worked (like on MacOSX). I will really have to look into this operationMask issue again as soon as time allows it. I expect potential to implement things nicer in my code and more OPENSTEP like. For now I have to live with the current approach (initiating drag with Ctrl and ignoring modifier keys while dragging).

Thanks a lot,

  Andreas








reply via email to

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