[Xotcl] Re: [Xotcl] Re: [Xotcl] Re: [Xotcl] Widgets
Kristoffer Lawson
setok@fishpool.com
Tue, 6 Feb 2001 15:23:39 +0200 (EET)
On Tue, 6 Feb 2001, Gustaf Neumann wrote:
> understanding of e.g. the composite model (like tk). I have
> implemented most of my GUIs via Motif, which is some respects easier
> to integrate, since it follows the idea "every widget has an ID"
> rather than "every widget is a command" (like in tk). The latter
> leads to the "conflict" with XOTcl, which says "every Object is a
> command". OTOH, solving this conflict is quite an interesting and
> generic challenge.
Well would it be possible with the method I suggested using filters
and a TkClass metaclass? This only required that you have basically
a header file which makes the equivalent TkClass instances. The filter
can operate so that it creates the Tk commands in a separate namespace
so as not to conflict. It then just passes the XOTcl methods directly
to the Tk command. Some specific XOTcl methods could be added too
like "pack" or "update".
I believe this would be quite a neat solution. It requires very little
work then to wrap a Tk "class" into a new XOTcl class, and the objects
feel like real XOTcl objects in every sense. Even better: this same
solution can be used for ITcl and other object-like things that need
to be wrapped in XOTcl.
- ---------- = = ---------//--+
| / Kristoffer Lawson | www.fishpool.fi|.com
+-> | setok@fishpool.com | - - --+------
|-- Fishpool Creations Ltd - / |
+-------- = - - - = --------- /~setok/