On 2008-01-16 11:49:32 +0100 Andreas Schik <[EMAIL PROTECTED]> wrote:
On 2008-01-14 13:10:17 +0100 Fred Kiefer <[EMAIL PROTECTED]> wrote:Andreas Schik wrote:On 2008-01-10 21:46:38 +0100 Fred Kiefer <[EMAIL PROTECTED]> wrote:Andreas Schik wrote:since I 'upgraded' to yesterdays SVN og GNUstep I do have problems with DnD in GNUMail. Have there been any changes in the underlying mechanisms making it necessary to change applications?The basic mechanism hasn't changed since April last year. What haschanged a bit was the implementation for NSTableVie and NSTextView. Areyou using subclasses of these?It looks like GNUMail is using a subclass of NSTableView in the mailwindow. This table is the source of the operation. What I found out so far is that the target of the operation (outline view) in the method -outlineView:validateDrop:proposedItem:proposedChildIndex: receives NSDragOperationNone in the NSDraggingInfo object ([infodraggingSourceOperationMask]), no matter which modifier I press down.There has been one important change for dragging in NSTableView, whichmay affect that code in some way. Now there are different drag masksettings for local and non-local dragging. The later by default is set to NSDragOperationNone. This behaviour matches, as far as I know, what Apple is doing. But why would the drag view see this as a non-local dragoperation? What you should do is debug into GSDragView (and it's subclass XX) to see, how the value for draggingSourceOperationMask is build up from dragMask (coming from the drag source) and operationMask (coming fromthe modifier keys). One of these two (most likely dragmask) must be wrong.Well, it is not a GNUMail problem, but a combination of GNUstep and Camaelon. Camaelon introduces a category for NSTableView that does not call the (assumedly new) selector -_initDefaults: Hence, the local dragging mask is 0. Fixing this remedies part of the problem. What remains is a quite strange behaviour: If I overlap the mailbox window and the mail window of GNUMail the operation works. As soon as there is a gap between the windows, i.e. the drag operation touches an external application, the operation again fails. It looks like GSDragView does not recognize that it must switch back from non-local to local operation. It did not debug this, though, and probabyl won't have time today to do so. But this might anyway help you to track it down.
This did let me sleep :-) Find a patch attached to this mail that fixes GSDragView. It finally came down to a missing ! operator. Cheers, Andreas <GSDragView.patch> -- Mail: andreas dot schik at web dot de Home: http://www.andreasheppel.de PGP Key is available from the MIT key server (pgp.mit.edu).
Index: Source/GSDragView.m
===================================================================
--- Source/GSDragView.m (Revision 25955)
+++ Source/GSDragView.m (Arbeitskopie)
@@ -900,7 +900,7 @@
{
unsigned int newMask;
- newMask = [dragSource draggingSourceOperationMaskForLocal: destExternal];
+ newMask = [dragSource draggingSourceOperationMaskForLocal: !destExternal];
if (newMask != dragMask)
{
dragMask = newMask;
pgpM8vnX7goJO.pgp
Description: PGP signature
_______________________________________________ Discuss-gnustep mailing list [email protected] http://lists.gnu.org/mailman/listinfo/discuss-gnustep
