Welcome Guest!
 Tkfp
 Previous Message All Messages Next Message 
Re: I may try making Tkfp GUI into a vtcl script  Alexander Caldwell
 Dec 20, 2007 14:00 PST 
Jerry,
   
There is another concept in Tcl where you can have a "child" interpreter launched by
the main interpeter and have it perform some task or tasks. The parent interpreter can communicate with
it in various ways with a syntax that is very similar to the "send" command. They also have a related concept where the child interpreter is made into
a "safe" interpreter, in which it is only allowed to perform certain Tcl commands in order to
limit the damage a user can do to the system. For example the Tcl/Tk plugin
used safe intepreters to allow users to come in through the web and execute various
Tcl/Tk commands but it was limited to only commands they deemed safe, i.e. the plugin could not for example write to files except in a limited area and many other Tcl/Tk commands were disabled to make it less dangerous. The one limitation I noted when I tried the child interpreters, was that they could only do Tcl commands, they could not have their own separate Tk commands to manipulate the Tk gui. Thus, if they needed to do something to the GUI, they would have to send a command back to the parent interpreter to do that. I never used the child intepreter thing, but it sounded for a while like it might be useful instead of having completely separate Tcl interpreters that used the "send" command, since there was some flakiness about send on Windows. But the more recent version of the send on Windows we used seemed to work pretty good.
   
Alex

Jerry Park <park.-@gmail.com> wrote:
Alex,

Yes, I was thinking about note_gen.tcl and so forth running in the
background. I am thinking that I will re-wire the stuff that takes an
especially long time to execute, such as the fax incoming listbox to
either NoSQL or SQlite. That would be an ideal job for the speed of a
dedicated RDBMS such as SQlite.

My plan is to avoid having to have the Tkfp scripts embed themselves
in the tabnotebook at all. I have tried the tabnotebook with vtcl
and it just "extends" a single GUI script to switch the view between
individual pages. But the whole Tkfp GUI script would be all one
script. So demographics, note generator, prescriptions and everything
would be one massive vtcl GUI script where you view each page by
clicking on the tabnotebook tabs. The code that the entry boxes and
widget execute would be split into other scripts. True, some time
might be lost as one script is launched by it's Tcl interpreter and
connects to a data source. I'll probably have to do some
experimentation with that.

This should solve many problems on Windows I think, because the
tabnotebook would be like the Windows taskbar, but instead of just
being a controller than iconifies or deiconifies each application
window, the tabnotebook should now work the same in Windows as it does
in Linux.

I think instead of making a lot of multi-colored command boxes and
entry boxes, I will make this big vtcl GUI gray monotone using text
spacing, bolding, frames, and white background highlighting to make
stuff stand out.

Jerry


 Jerry,

Go for it. I am not familiar with how the Vtcl tabbed notebook widget
works.
I'm sure it should be fairly straight forward if one big Tcl application is
running everything inside all
the tabs. But when you get into embedding separate apps into each tab, each
one being run by a separate Tcl interpreter, then you may get into some
problems
similar to the ones in the Incr Tcl tabbed notebook I used for the current
Tkfp.
The reason I ended up with several small apps all running under different
Tcl intepreters
has to do with needing to do several different things or processes all at
one time.
If everything runs only under one Tcl/Tk interpreter, everything is
sequential and you have to wait until one
thing finishes before you can work on another thing. For example, with the
separate processes under multiple Tcl/Tk interpreters, I can be having
note_gen.tcl refresh the incoming fax listbox which may take quite a while,
meanwhile, I can be looking up a new name in the name list box, have a new
patient loaded and their med list parsed by the XML parser, and not have to
wait
until the incoming fax listbox finishes refreshing. Tcl now has
"multithreading" which
can deal with some of this, but I think programming a multithreading program
is harder
to do than just running separate Tcl interpreters to do different jobs that
may conflict
for demands on the processor's time and need to run simultaineously.

Alex


       
---------------------------------
Looking for last minute shopping deals? Find them fast with Yahoo! Search.
	
 Previous Message All Messages Next Message 
  Check It Out!

  Topica Channels
 Best of Topica
 Art & Design
 Books, Movies & TV
 Developers
 Food & Drink
 Health & Fitness
 Internet
 Music
 News & Information
 Personal Finance
 Personal Technology
 Small Business
 Software
 Sports
 Travel & Leisure
 Women & Family

  Start Your Own List!
Email lists are great for debating issues or publishing your views.
Start a List Today!

© 2001 Topica Inc. TFMB
Concerned about privacy? Topica is TrustE certified.
See our Privacy Policy.