Tcl/Tk - developing XWindows apps 
Author Message
 Tcl/Tk - developing XWindows apps

A couple of questions -

I'm trying to develop a toolbar for use within X-Windows on a Linux system.
It will have several buttons, when you click one it should run a commonly
used application - eg Netscape Navigator.

The first problem I'm encountering is that when you click a button, the
application loads in but then the toolbar will not function while the
application is running. Is there anyway round this, so the toolbar is
always functional ?

The second problem is that I want to include a configuration file with it
so users can add there own buttons to the toolbar. What is the easiest way
to add a file which can be read by the program to produce new buttons if
they are added by the user ?

Thirdly where can I get the X-Windows development add-on for Tcl/Tk from ?

Thanks for all help in advance,

Paul
Please e-mail as well as post.



Wed, 27 Feb 2002 03:00:00 GMT  
 Tcl/Tk - developing XWindows apps
Re your first problem, are you launching the new application in background
mode (ie, with the "&" suffix)?

I believe that may solve that problem.

Quote:

>A couple of questions -

>I'm trying to develop a toolbar for use within X-Windows on a Linux system.
>It will have several buttons, when you click one it should run a commonly
>used application - eg Netscape Navigator.

>The first problem I'm encountering is that when you click a button, the
>application loads in but then the toolbar will not function while the
>application is running. Is there anyway round this, so the toolbar is
>always functional ?



Wed, 27 Feb 2002 03:00:00 GMT  
 Tcl/Tk - developing XWindows apps

Quote:

> The first problem I'm encountering is that when you click a button, the
> application loads in but then the toolbar will not function while the
> application is running. Is there anyway round this, so the toolbar is
> always functional ?

If the application is launched externally (as in your example, using
exec or
open) then you must place it in the background and not block on the app's
execution.  Use '&' for exec, or if using open then put the channels into
non-blocking mode.

If the button's function is executed internally then you must either call
update occasionally or use threads (except that Tk itself is not thread-safe).

Quote:
> The second problem is that I want to include a configuration file with it
> so users can add there own buttons to the toolbar. What is the easiest way
> to add a file which can be read by the program to produce new buttons if
> they are added by the user ?

I haven't seen a toolbar manager package yet (BWidget comes close, but
not for what
you want).  Actually, I have a need for this functionality in my own
product, Swish
(plugins need to be able to define toolbar buttons and menu entries).
So, I'll be
developing that code RSN.  Contact me if you're interested.

Quote:
> Thirdly where can I get the X-Windows development add-on for Tcl/Tk from ?

Huh?  Tcl/Tk runs on X Window just fine.  What more do you need?

Cheers,
Steve Ball

--
Steve Ball            |   Swish XML Editor    | Training & Seminars
Zveno Pty Ltd         |   Web Tcl Complete    |      XML XSL
http://www.zveno.com/ |    TclXML TclDOM      | Tcl, Web Development

Ph. +61 2 6242 4099   | Mobile (0413) 594 462 | Fax +61 2 6242 4099



Thu, 28 Feb 2002 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Problem running tcl/tk application while other XWindows apps running

2. TCL/TK & Xwindows Applications

3. converting Java app to Tcl/Tk ( new thread for all the tcl/tk itcl gurus)

4. tcl/tk 8.0 problem with Windows app that calls tcl/tk script

5. Help required with Tcl/TK for XWindows

6. shipping tcl/tk apps to users who don't have tcl/tk installed

7. Drop-N-Drop bet Motif apps and tcl/tk apps

8. Developing a GUI in tcl/tk

9. How to develop help systems in Tcl/Tk

10. Sony Job to develop multiple DSP simulator using Tcl/Tk and C++

11. Developing TCL/TK GUI application on Lynx 2.4 OS

12. Running Compiled tk/C apps on machines w/o tcl/tk installed

 

 
Powered by phpBB® Forum Software