Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 11 Apr 1996 17:27:53 -0700
From:      "Jordan K. Hubbard" <jkh@time.cdrom.com>
To:        Terry Lambert <terry@lambert.org>
Cc:        alk@Think.COM (Tony Kimball), hackers@freefall.freebsd.org
Subject:   Re: Lesstif (motif compatible) package. 
Message-ID:  <8945.829268873@time.cdrom.com>
In-Reply-To: Your message of "Thu, 11 Apr 1996 12:22:23 PDT." <199604111922.MAA04557@phaeton.artisoft.com> 

next in thread | previous in thread | raw e-mail | index | archive | help
> > I disagree profoundly.  Tk is the closest thing to a standard.
> > Moreover, Tk is portable to the major non-unix platforms, 
> > while Motif is not.
> 
> Tk is interpreted.  This is a *HUGE* drawback if what you are
> selling is a commercial product.

That's not actually a drawback if you're just trying to use it as a
Motif replacement.  Look at the TCL/Tk book, Terry, and you'll see
that there's a C API for all the Tk functions as well.  I can
construct user interfaces with Tk without writing a single line of TCL
code.  Naturally, I'll totally throw away my rapid prototyping
abilities as a result, but if this were really important for some
reason then that'd be an option.

There are also Tcl/Tk compilers on this horizon that promise to give
one the best of both worlds and, finally, if commercial protection is
all you want then you can also compile the Tcl or Tk code into your
final production binary as an encrypted string and have a little
bootstrap decrypt it before passing it to Tcl_Eval().

> Tk has Motif drag-and-drop interoperability?  This I have got to see...

I think you may be misinterpreting him.  Tk has a powerful D&D
mechanism, yes, though I doubt that it's Motif compatible.  This is
probably a feature. :-)

One thing people also frequently neglect is that Tk is a *much nicer*
environment than Motif!  I can't count the number of times that I've
had my interface 98% complete and then run smack into the boundry
cases where I've got something I want to represent graphically but
none of the available objects are going to do it for me.  I either end
up writing my own Motif widget, which is a real pain in the butt and
can easily take twice the time it takes me to write the code that USES
the damn thing, or I construct an inferior interface that makes a best
effort attempt with the existing stuff.  Tk gives me a very nice
"canvas" widget which allows me to create very arbitrarily rendered
interface objects and bind actions to them just like the higher level
objects.  Don't knock this one until you've tried it, seriously!

I know, you're now going to come back with the argument that one can
trivially write a blah blah blah widget in Motif (probably using the
word "virtualize" at least once :-) but that's not the point - I don't
WANT to have to write custom frobs for Motif each time I want to
display a triangular button or a flipping-page widget or whatever, nor
do I want to have to reinvent the generalized canvas widget there.

I also know about the "gadget" mechanism in Xt, but that presents a
much much lower level interface than Tk's canvas gives me.  I know
that I could also encapsulate the Tk canvas object into a Motif
application fairly easily, but if I'm going to drag libTk into my
application as it is then I might as well just throw out Motif and use
Tk for everything - such a huge application just to get the dubious
benefits of Motif I don't want or need.

					Jordan

P.S. And yes, I *have* used Motif in commercial software.  I know
very well what it can and cannot do.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?8945.829268873>