swarm-support
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Using the Tk/Tcl interpreter


From: Marcus G. Daniels
Subject: Re: Using the Tk/Tcl interpreter
Date: 14 Apr 2001 09:43:36 -0700
User-agent: Gnus/5.070084 (Pterodactyl Gnus v0.84) Emacs/20.4

>>>>> "JA" == jalex  <address@hidden> writes:

JA> Are there any sample programs which illustrate how to use the
JA> Tk/Tcl interpreter to create a custom control panel, hooking it to
JA> variables and methods in the model? 

Yes, in a sense -- most of the tkobjc/ module and some of the
simtoolsgui/ module.  Essentially the API is just an Objective C
veneer for a subset of Tk.  Get a book on Tcl/Tk and then pass
commands to [globalTkInterp eval:] in Swarm, from #import
<tkobjc/global.h>.  You'll probably find that you can do a lot with
what is in gui.h, without doing raw eval: calls.  I'd be happy to tweak
the gui.h APIs if you are interested in working on something of more
general utility than your models...

JA> I have in mind one which uses radio/check buttons to let the user
JA> set various runtime options, with buttons hooked to particular
JA> methods (including incorporating the standard control panel).

Sure, you could do that.  I get the impression you aren't inclined to
use Java?  If you want to do something new and shiny instead of old
and crufty, maybe you'd like to try some XBL/XUL programming in
Mozilla??  ;-)

Btw, a good project for a volunteer would be to make ProbeDisplays
show CheckButton for booleans.  That assumes a tolerance for Java, though,
since BOOLs in Objective C are not something preserved by reflection.

                  ==================================
   Swarm-Support is for discussion of the technical details of the day
   to day usage of Swarm.  For list administration needs (esp.
   [un]subscribing), please send a message to <address@hidden>
   with "help" in the body of the message.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]