Google Grupper har inte längre stöd för nya Usenet-inlägg eller -prenumerationer. Historiskt innehåll förblir synligt.
Dismiss

tkdnd or buggy XDnD implementations

0 visningar
Hoppa till det första olästa meddelandet

Mats

oläst,
8 dec. 2007 11:14:142007-12-08
till
While I have had no problems with tkdnd on Windows I have seen several
weirdnesses with XDnD. For instance, I register a text widget as a
drop target for files (text/uri-list) which I verify as:

set win .jchat1.frall.fthr.m.pane.frtxtsnd.text
% dnd bindtarget $win
text/uri-list text/uri-list ... (long list with identical elements)

% dnd bindtarget $win text/uri-list <DragEnter>
::Chat::DnDFileEnter ::Chat::chat1 %W %A %D %T

% dnd bindtarget $win {text/plain;charset=UTF-8}
script not found

and drag text to it I get a <DragEnter> event with type text/
plain;charset=UTF-8 as:

::Chat::DnDFileEnter win=.jchat1.frall.fthr.m.pane.frtxtsnd.text,
action=copy, data=, type=text/plain;charset=UTF-8

Either I have misunderstood something fundamental or there is a
problem somewhere. I found the page: http://www.freedesktop.org/wiki/Draganddropwarts
which indicates that XDnD implementations aren't that compatible,

/Mats

George Petasis

oläst,
9 dec. 2007 18:34:292007-12-09
till Mats
Dear Mats,

What version of tkdnd are you using?

George

O/H Mats έγραψε:

Mats

oläst,
10 dec. 2007 05:35:112007-12-10
till
It is 1.0. Don't know if there is a patch level as well.
In any case I have only seen the problem with Gnome and Nautilus (?)
and there seem to be more problems related to XDnD in this
environment. It happens if I have a dragsource as:

dnd bindsource $win text/uri-list {
::RosterTree::DnDFileSource %W
}

and return a temporary file in /tmp that Nautilus crashes. I just
wonder if people have encountered problems with various XDnD
implementations before. KDE seems better in this respect.

/Mats

PS: I see there is a alpha 2.0 version of tkdnd. Perhaps I can have a
look at it for a MacOSX implementation. Any tips?

Georgios Petasis

oläst,
10 dec. 2007 05:50:162007-12-10
till Mats
O/H Mats έγραψε:

Dear Mats,

Yes there are problems regarding interoperability under XDND. You will
see a lot of crashes. The fact that kde works better, is that I use only
KDE for testing, as I don't use gnome at all :-)

George

Mats

oläst,
10 dec. 2007 06:14:392007-12-10
till
Thanks for the info.
Just so I know that I'm not always chasing my own bugs when things go
wrong. Then I will do my testing on KDE from now on. And what do you
say about:

"I see there is a alpha 2.0 version of tkdnd. Perhaps I can have a
look at it for a MacOSX implementation. Any tips?"

Just got a brand new MacBook Pro so it can be fun doing something
fresh for once.

/Mats

Georgios Petasis

oläst,
10 dec. 2007 07:05:022007-12-10
till Mats
O/H Mats έγραψε:

Actually regarding tkdnd 2.0, I never found the time to complete the
drag support under linux. I have also some guidelines on how to write
the OS X support send by Stéphane Conversy, but again no time :-)

If you would like to contribute, you are welcome of course :-)

But it would be better to:

a) Test tkdnd 2.0 under windows and see if it works for you (it should).
The API has changed since 1.0, but there is a compatibility layer for
code written for tkdnd 1.0. If you have not done complex things (like
having canvas object accept drops), it should work out of the box.

b) Under linux, check whether tkdnd 2.0 can accept drops without
problems (i.e. crashes). This may be an area that needs some
checking/improovements.

c) Under linux, there is no drag support at all. (instead an error is
returned) This is my first thing in the todo list.

d) Regarding mac os x, I cannot promise anything, as I don't own a mac.
So, I don't have the OS to compile/test. If you want to contribute in
there, you are welcomed.

The target for tkdnd 2.0 is to be very limited (i.e. provide only text &
files transfers) but stable. And to implement in tcl as much as possible
(instead of C/C++). This was not possible with windows (provides an API
for everything) - and I suspect the same happens for mac os x - but
under linux the XDND protocol must be implemented from scratch. What I
have done for linux was to code only bits in C (i.e. the handling of
XEvents) and do the rest from the tcl level. I want to do the same for
the drag support.

If you want to help with tkdnd (i.e. in mac os x support) just inform
me to place the latest sources at the sf svn server.

George

Mats

oläst,
10 dec. 2007 09:35:582007-12-10
till
Thanks for all your info. I'm a bit curios to see how DnD works for
MacOSX so perhaps I give it a chance.

/Mats

0 nya meddelanden