|
|
|
Re: Drag and Drop Between 2 View [message #436441 is a reply to message #436440] |
Thu, 08 September 2005 13:41 |
|
user@domain.invalid wrote:
> Thank you ,
> But it does not work , i made a class which implements
> DragSourceListener and dragSetData with a String(for the TableViewer)
> Then i add DropTarget to my Browser(which is a swt component and not
> JFace) and in the drop methed , i do
> that:myBrowser.setUrl((String)event.data));
> But it does not work,why?
Which transfers did you set up? TextTransfer?
1. post the code snippets for setting up your drag source and drop
target. Based on the information that you gave in this email, I can
only assume some setup is missing.
2. Change the drop() method to do something like a System.out.println(),
or set breakpoints in the dragSetData() and drop() methods, and re-run
your application. When dragSetData() was called, what was put into
event.data? When drop was called, what was available in event.data?
Later,
PW
Paul Webster
http://wiki.eclipse.org/Platform_Command_Framework
http://wiki.eclipse.org/Command_Core_Expressions
http://wiki.eclipse.org/Menu_Contributions
|
|
|
Re: Drag and Drop Between 2 View [message #436442 is a reply to message #436441] |
Thu, 08 September 2005 13:57 |
user Messages: 296 Registered: July 2009 |
Senior Member |
|
|
Paul Webster wrote:
> user@domain.invalid wrote:
>
>> Thank you ,
>> But it does not work , i made a class which implements
>> DragSourceListener and dragSetData with a String(for the TableViewer)
>> Then i add DropTarget to my Browser(which is a swt component and not
>> JFace) and in the drop methed , i do
>> that:myBrowser.setUrl((String)event.data));
>> But it does not work,why?
>
>
> Which transfers did you set up? TextTransfer?
>
> 1. post the code snippets for setting up your drag source and drop
> target. Based on the information that you gave in this email, I can
> only assume some setup is missing.
>
> 2. Change the drop() method to do something like a System.out.println(),
> or set breakpoints in the dragSetData() and drop() methods, and re-run
> your application. When dragSetData() was called, what was put into
> event.data? When drop was called, what was available in event.data?
>
> Later,
> PW
I made a lot of test and it did work on a lot of component (Button ,
TableViewer) But i think that it is impossible to make a Browser DropTarget!
Do you know if it is possible with the component Browser(swt)?
Thank you,
Sob,
|
|
|
Powered by
FUDForum. Page generated in 0.37902 seconds