Tcl/Tk Home
|
Overview
|
TclRCX
|
Tcl Plug-in
|
Apps.& Ext.
|
More Links
|
Plug-in:
+ Download
+ Demos
+ Documentation
+ FAQ

Important!: because of move from the sunscript.sun.com to this new home http://www.demailly.com/tcl/plugin/, not everything is updated or fully working yet... stay tuned...

Simple Remote Sourcing Tclet Demo

Source:

source.tcl:

# Home policy (required to get the getURL access to home server)
policy home

# We do "after idle" here because the blocking version of getURL,
# when used on Windows platform seems to hang when used directly
# from the main tclet code.
after idle {
  eval [browser::getURL remoteCode.tcl]
}

remoteCode.tcl:

# Just a sample
pack [button .b -text "Remote Sourced!"] -expand true -fill both

It is also possible to use the non blocking call:

proc sourceCB {reason data} {
  if {$reason != EOF} {
	error "geturl error $reason $data"
  }
  uplevel #0 $data
}
browser::getURL $url {} {} {} sourceCB



Tcl top | Overview | TclRCX | Tcl Plug-in | Apps.& Ext. | More Links

Last modified: Mon Apr 13 1998, 10:57, hosted by demailly.com