Linxux/GTK drop fails [message #438907] |
Fri, 02 July 2004 19:58 |
Mark Geib Messages: 432 Registered: July 2009 |
Senior Member |
|
|
I am cross posting this from GEF.
Mark
---------------------------------
After spending some time looking at this it looks like I mis-interpreted
the type of cursor during the drag-and-drop. The drag was starting fine,
it was a problem with my transfer and the drop data being null.
Now, everything is working fine, on windows....not on Linux/GTK.
After resolving the problems I moved over to a Linux/GTK machine and the
drop does not work. I am having trouble debugging this since as soon as
the drop starts, and my breakpoint in createTargetRequest is hit, I loose
control of my machine. The mouse is not functional...
I implemented all the methods in AbstractTransferDropListener and put
print statements in each.
I see the following:
updateTargetRequest
createTargetRequest
isEnabled
dragEnter
then multiple cycles of:
updateTargetRequest
createTargetRequest
isEnabled
as soon as I release the mouse I see one more:
updateTargetRequest
createTargetRequest
And thats it. That is the last method called. I never seen getNewObject in
my factor called...
I have tried other drag-and-drop on Linux and they seem to work, like from
the Package Explorer to the editor.
Also, I have tried a PalletRoot, and the drop onto my graphical editor
worked just fine.
Thanks for any help.
Mark.
Randy Hudson wrote:
> The TreeViewer has its own internal DragSources in addition to the one you
> are adding. What I think is supposed to happen is that all transfers are
> active during the Drag. But, depending on the DropTarget, only certain
> combinations (the intersection of source and target) will be active. see:
> AbstractEditPartViewer#refreshDragSourceAdpater(). this method should set
> the transfers on the DragSource. If that's happening correctly, most of the
> other code is either SWT or JFace.
> "Geib" <mark.geib@echostar.com> wrote in message
> news:cbpd1m$f41$1@eclipse.org...
> > Believe me, I have exhausted all the resources I could find. With no
> > result.
> >
> > I have followed Eric's article and extended
> > AbstractTransferDragSourceListener, implementing dragStart() and
> > dragSetData(). I have set a break in both methods, and when I start a drag
> > dragStart is called, but dragSetData is never called.
> >
> > My transfer extends SimpleObjectTransfer, and I implemented getTypeIds(),
> > getTypeNames(), isSupported(), etc. When the drag starts I can break in
> > isSupported(), but the data type of the TransferData is not the type I
> > registered in my transfer. I have tried returning 'true' blindly but still
> > no good.
> >
> > Mark
> >
> >
> > Randy Hudson wrote:
> >
> > > Please see Eric Bordeau's article on DND in GEF.
> >
> > > "Geib" <mark.geib@echostar.com> wrote in message
> > > news:cbo8bt$6bs$1@eclipse.org...
> > > > After some debugging it appears that the data type in the drag event
> is a
> > > > type that does not match my transfer. Can someone tell me where the
> data
> > > > type in the drag event is determined.?? My transfer creates a new type
> ID,
> > > > but how does this get set in the drag for an object in my
> treeviewer..?
> > > >
> > > > Thanks,
> > > > Mark.
> > > >
> > > > Geib wrote:
> > > >
> > > > > I want to support drag and drop between a GEF graphical editor and a
> GEF
> > > > > treeviewer. The drag source is in the treeviewer. I have created a
> new
> > > > > transfer by extending the simple transfer, and added the listener to
> the
> > > > > treeviewer.
> > > >
> > > > > The problem is that I can not seem to make the drag be enabled. As
> soon
> > > as
> > > > > I start a drag operation I get the circle/slash cursor.
> > > >
> > > > > Is there something I am missing to get my listener active..?
> > > >
> > > > > Thanks,
> > > > > Mark.
> > > >
> > > >
> >
> >
|
|
|
Powered by
FUDForum. Page generated in 0.04346 seconds