Message: 1
Date: Fri, 01 Apr 2005 10:05:59 +0300
From: nik boretos <[EMAIL PROTECTED]>
To: Nguyen Truong Luyen <[EMAIL PROTECTED]>
CC:  [email protected]
Subject: Re: [vtcl-user] I want to ask How Use TCL's Function  in VTCL

Nguyen Truong Luyen wrote:



I'm a newbie I read about TCL, but when I use VTCL, i don't know how to Use . Could U tell me the way to Use TCL's Functions in VTCL . It's possible if U can give me an example

Thanks




Hi,
While everyone has different approaches, what I usually do is build my interface w/ vtcl, and then bind (assign) tcl procedures,/commands
to the various widgets. The most direct way is to use the attribute editor's "command" facility.


e.g
1. Create a toplevel using the "Widget toolbar"
2. add a button to the toplevel, again using the Widget toolbar
3. in the Attribute editor, change the "text" to "Open File"
4. again in the attribute editor, click on the "command" button and type in
"set f [tk_getOpenFile]"
5. Click the "check mark" to save the command
6. In the main menu bar, click the edit/test toggle button
7. Clicking on your "Open File" button now should popup the file selector dialogue (a tcl/tk command)


etc..
I hope this helps...

regards,
nikos




I've hand written a couple of Tcl/Tk graphical interfaces for a machine tool controller system. I've also tried vtcl for some experiments with it. We have an extensive list of specific commands like "emc_mode" that pass values and commands from tickle to the running binaries. For this I wrote a quick and dirty library of processes in VTCL that have the same name as the commands we need to use for control. That way I can write the HMI using vtcl and then move it to to a running system.

Ray




------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click _______________________________________________ vtcl-user mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/vtcl-user

Reply via email to