Drop-N-Drop bet Motif apps and tcl/tk apps 
Author Message
 Drop-N-Drop bet Motif apps and tcl/tk apps

Currently tk doesn't support Motif-style Drop-N-Drop. That means you
cannot drag an object from a Motif pgm and drop to ciscoview, and vice
versa.

However I think allowing such communication can be done if a new tk widget is
added to support Xt level Drag-N-Drop using XtMoveWidget/XtMoveObject, and
add a similar counterpart in Motif apps - one might be able to achieve
that. However there is a problem since tk doesn't do Xt (if it were
there wouldn't be any problems for communicating w/ Motif apps, or
even subclass from Motif widgets).

Anybody had some experience/thoughts on this?



Sat, 11 Jul 1998 03:00:00 GMT  
 Drop-N-Drop bet Motif apps and tcl/tk apps

Quote:

> Currently tk doesn't support Motif-style Drop-N-Drop. That means you
> cannot drag an object from a Motif pgm and drop to ciscoview, and
> vice versa.

A large proportion of Motif apps (or at least the ones that I've
encountered) don't support Motif drag-n-drop either, as it is rather
bug-ridden, or so I have read...

Quote:
> However I think allowing such communication can be done if a new tk
> widget is added to support Xt level Drag-N-Drop using
> XtMoveWidget/XtMoveObject, and add a similar counterpart in Motif

              ^^^^^^^^^^^^^^
Is this part of the X11R6 distribution? It's not in my manpages...

Quote:
> apps - one might be able to achieve that. However there is a problem
> since tk doesn't do Xt (if it were there wouldn't be any problems
> for communicating w/ Motif apps, or even subclass from Motif
> widgets).

If only it were that simple. The problem is not heaving the displayed
bit of graphics about - that's easy - but rather establishing
communication between communicating apps, and doing so in a form that
both are happy with. This makes for a very good reason why no-one has
even bothered to try getting DnD between Tk and Motif working. In
simple terms, the languages they speak internally are so different,
that they might as well be completely unable to say anything to each
other.

Also, DnD with Motif is never going to be portable to WinDoze or the
Mac, and hence it is much less likely to get done now...

In short, there's far more worms in this particular can than you
imagined... :^)

Donal.
--
Donal K. Fellows, (at work)          |  Donal K. Fellows, (at home)
Dept. of Computer Science,           |  6, Randall Place, Heaton,
University of Manchester             |  Bradford, BD9 4AE
U.K.      Tel: ++44-161-275-6137     |  U.K.          Tel: ++44-1274-401017

-------------------------------------------------------------------------------
            <http://r8h.cs.man.ac.uk:8000/>  for my home page



Mon, 13 Jul 1998 03:00:00 GMT  
 Drop-N-Drop bet Motif apps and tcl/tk apps

Quote:

>> Currently tk doesn't support Motif-style Drop-N-Drop. That means you
>> cannot drag an object from a Motif pgm and drop to ciscoview, and
>> vice versa.
>If only it were that simple. The problem is not heaving the displayed
>bit of graphics about - that's easy - but rather establishing
>communication between communicating apps, and doing so in a form that
>both are happy with. This makes for a very good reason why no-one has
>even bothered to try getting DnD between Tk and Motif working. In
>simple terms, the languages they speak internally are so different,
>that they might as well be completely unable to say anything to each
>other.

>Also, DnD with Motif is never going to be portable to WinDoze or the
>Mac, and hence it is much less likely to get done now...

It is certainly true that the Macintosh, Windows and Motif environments
all use differnet drag and drop protocols. So, if you try to implement
drag and drop in Tk, you're left with a choice: should Tk drag and
drop only work with other Tk applications, or should it work with all
"native" applications on a given platform. I strongly support the latter.

In order for drag and drop to be useful for the user, you must be able
to drag something from one application and drop it in another. The
Unix/X world is far too full of stupid toolkit dependencies (try
explaining why some applications use a resource named "font" and
others one named "fontList", for example). Drag and drop is worthless
if it only works for applications compiled with a particular toolkit.

So, to work in the native environments, however flawed,
Tk drag and drop should interoperate with native applications.
This means making an abstraction over the drag and drop capabilities
common to all three platforms. The Unix/X Tk would then implement
Motif D-n-D under the hood from a high-level--portable--Tk command.
(The Motif D-n-D is the porrly documented de facto drag and drop
standard on X. The X Consortium failed miserably in its promise
to define an independent D-n-D standard.)

On Windows, you should be able to drag a file from the file manager
or Explorer and drop it into a Tk application. Under the hood, the
Windows version of Tk would deal with the Win32 drag and drop
issues. And so on.

Tough? Yes. But, I think this is the only realistic way to go if
you want to develop real applications with Tcl and Tk.

Have fun,
-Eric

--
Eric F. Johnson     URL: http://ourworld.compuserve.com:80/homepages/efjohnson/
CAMAX Manufacturing Tech., Inc.
7851 Metro Parkway           phone: +1 612 854 5300     fax: +1 612 854 6644



Tue, 14 Jul 1998 03:00:00 GMT  
 Drop-N-Drop bet Motif apps and tcl/tk apps

Quote:
>Also, DnD with Motif is never going to be portable to WinDoze or the
>Mac, and hence it is much less likely to get done now...

yeah, but while your tcl-only solution is good in the short term,
it'll have to tie into the native handlers sometime.  and on unix,
supporting motif drag and drop will be important for some people.
the cross platform api stuff will likely evolve out of existing
implementations.. for example, when i did drag and drop for the
mac it was patterned (somewhat loosely) after blt.

mark

--
Mark Roseman, Research Associate         phone: (403) 220-3532 / 220-7259
Dept. of Computer Science                fax: (403) 284-4707

Calgary, Alta CANADA  T2N 1N4            http://www.cpsc.ucalgary.ca/~roseman



Tue, 14 Jul 1998 03:00:00 GMT  
 Drop-N-Drop bet Motif apps and tcl/tk apps

Quote:


>> Also, DnD with Motif is never going to be portable to WinDoze or the
>> Mac, and hence it is much less likely to get done now...

> yeah, but while your tcl-only solution is good in the short term,
> it'll have to tie into the native handlers sometime.  and on unix,
> supporting motif drag and drop will be important for some people.
> the cross platform api stuff will likely evolve out of existing
> implementations.. for example, when i did drag and drop for the
> mac it was patterned (somewhat loosely) after blt.

My code is extensible (and I'll even extend it if someone(s) will
describe the platform-dependant interfaces in such a way as I can
connect to them :^). Also, the problems I have with BLT are that it
doesn't permit only part of a widget to be a drop zone (something you
might want in a text or canvas widget) and that it statically
determines what widgets are drop zones without regard to the type of
the data (I think, though I might be wrong in this). This is all in
addition to the horrendous X-specificity in the underlying mechanism.

<ShamelessPlug>

As it is, I have implemented drag-and-drop for moving and copying text
between text/entry widgets and I also allow (some) copying between the
two types (though this is more restricted in form). This is also done
in such a way that it is still easy to extend the number of types of
data accepted and generated by these widget, and there is also support
for making an entire window into a drop zone.

</ShamelessPlug>

Donal.
--
Donal K. Fellows, (at work)          |  Donal K. Fellows, (at home)
Dept. of Computer Science,           |  6, Randall Place, Heaton,
University of Manchester             |  Bradford, BD9 4AE
U.K.      Tel: ++44-161-275-6137     |  U.K.          Tel: ++44-1274-401017

-------------------------------------------------------------------------------
            <http://r8h.cs.man.ac.uk:8000/>  for my home page



Fri, 17 Jul 1998 03:00:00 GMT  
 Drop-N-Drop bet Motif apps and tcl/tk apps


Quote:
>>> Also, DnD with Motif is never going to be portable to WinDoze or the
>>> Mac, and hence it is much less likely to get done now...

Yes, but it would be possible to make an extension that would have the same
API and work on all platforms.  I'd like to see this eventually...

Quote:
>connect to them :^). Also, the problems I have with BLT are that it
>doesn't permit only part of a widget to be a drop zone (something you
>might want in a text or canvas widget) and that it statically

This is an easy thing to manage with BLT's drag&drop.  Did it myself with
very nice success.

Quote:
>determines what widgets are drop zones without regard to the type of
>the data (I think, though I might be wrong in this). This is all in
>addition to the horrendous X-specificity in the underlying mechanism.

Not true, it does recognize for different data types.  Although I agree
that the BLT drag & drop mechanism is far from perfect...
--
     Jeffrey Hobbs                           Office: 541/346-3998

                URL: http://www.cs.uoregon.edu/~jhobbs/


Fri, 17 Jul 1998 03:00:00 GMT  
 Drop-N-Drop bet Motif apps and tcl/tk apps

Quote:
>My code is extensible (and I'll even extend it if someone(s) will
>describe the platform-dependant interfaces in such a way as I can
>connect to them :^).

deal.  look at http://www.cpsc.ucalgary.ca/~roseman/mactcl/ for
info on the package i did that supports drag and drop using the
mac drag manager.

and in your spare time...

--
Mark Roseman, Research Associate         phone: (403) 220-3532 / 220-7259
Dept. of Computer Science                fax: (403) 284-4707

Calgary, Alta CANADA  T2N 1N4            http://www.cpsc.ucalgary.ca/~roseman



Tue, 21 Jul 1998 03:00:00 GMT  
 
 [ 7 post ] 

 Relevant Pages 

1. Drag&Drop, multi fields from app to app

2. Drag/Drop between Motif and Tcl/Tk

3. Mac TCL drag and drop app question

4. Drag and drop between Tk and Motif applications

5. Drag & Drop from outside the app

6. Dropping files onto apps

7. Dropping files onto the app icon?

8. drag and drop other programs to clarion app

9. Drag and drop, Clarion to non-Clarion app

10. CW4/5 Drag and Drop from other apps

11. Drop combo on internetready app

12. App Wizard and drop down list boxes in C4b

 

 
Powered by phpBB® Forum Software