Welcome Guest!
 Tkfp
 Previous Message All Messages Next Message 
Re: Here's a working vTcl data entry script  Alexander Caldwell
 Oct 11, 2007 16:10 PDT 

Jerry,

I don't think it can use a named address like
tkfp.homelinux.org, although it might if you put an
entry in /etc/hosts, but you might try it to see.
It does work with of course "localhost" which I think
it might get from /etc/hosts. As far as DHCP assigned
IP addresses - on a small network, I think the
machines get usually the same address somehow based on
the ehternet card's mac address or something like
that. On Kathy's router the different machines always
seem to get the same DHCP address from the router, so
I've still been able to just use that number in the
network_settings.tcl and on her small network, it has
been pretty stable. But of course you have to check
what number is assigned to the machine running
databaseserver.tcl.

BTW, I was opening ExpressScripts2.tcl in VTCL today.
What version of VTCL are you using again? I want to
get the same version. I noticed the commands for the
buttons in the "properties" on the buttons. I was
thinking we could use the editor window VTCL provides
for Tcl procedures to add some other code as procs.
We will want to do any editing of the code inside VTCL
instead of opening your script in a regular code
editor like ASED, so as to maintain it's compatibility
with VTCL. If you want to do the network stuff you
would need to for example source in Eval_Client.tcl
into your script, or else you could add a line adding
the directory where Eval_Client is stored to your tcl
lib PATH . I have just been sourcing it in. I'm not
sure how that would work in VTCL, but I could play
with it and see.

Alex




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

 Alex,

Hmmmmm........that was pretty clear -- thanks for
the succinct
explanation. I think I will try writing my stuff to
work on the
network rather than just locally. I'll go back and
see if I can get
the form stuff to work that way.

I guess it's OK to test applications written to use
Eval_Client and
Eval_Server on the local machine. I have plenty of
machines laying
around here, so maybe I will network a couple of
them just for trying
this stuff.

The Network settings applet in tree.tcl expects
databaseserver to have
a fixed IP address. Is it possible to have
databaseserver.tcl connect
to a domain name that is "following" a dynamic IP
address, as long as
databaseserver.tcl has access to a DNS server that
tells it how to
connect to the domain name? Like, would it work to
type in a domain
name instead of an IP address in the network
settings box? I doubt
it, but I'm just thinking.

I really do plan to take the IMP leap in the next
few years. There is
no way I can sustain the pounding I take at urgent
care when I get
older. I don't really like it much right now, but
financially I
cannot afford any drop in income for awhile.

Jerry


 Jerry,

It is very similar to send in a lot of ways. You
do
 have to think about any variables as to whether
they
 would be subsituted before or after the info is
"sent"
 the curly braces around {set rootirectory} cause
that
 to be delayed until after it gets to the
databaseserver.tcl so it gets evaluated in the
context
 of the databaseserver.tcl. If I had used [set
rootdirectory] it would have used the value on the
client side instead. This is all very similar to
how
 you have to think using send. On the server side,
there has to be a proc corresponding to whatever
command you want done. I have written some special
ones in Eval_Server.tcl for renaming files, moving
files etc.

The main differences you have to think about are
to
 change any commands that just write info to the
disk
 in your program like:
set filehandle [open
$rootdirectory/demographics/$filename r]
set mydata [read $filehandle]
close $filehandle

to something like:
set mydata [Eval_Remote $sock Eval_Read_File
[Eval_Remote $sock {set
rootdirectory}]/demographics/$filename]

The Eval_Read_File is my own proc I set up in
Eval_Server.tcl that opens the desired file, gets
the
 info and sends it back over the socket to the
client
 app.




Alex



       
____________________________________________________________________________________
Building a website is a piece of cake. Yahoo! Small Business gives you all the tools to get online.
http://smallbusiness.yahoo.com/webhosting
	
 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.