#!/usr/local/bin/wish -f

## begin boiler_header

global VERSION
set VERSION {3.6/2.0+}

if {[info exists env(JSTOOLS_LIB)]} {
  set jstools_library $env(JSTOOLS_LIB)
} else {
  set jstools_library /usr/local/lib/jstools
}

# add the jstools library to the library search path:

set auto_path [concat [list $jstools_library] $auto_path]

# check for ~/.tk and prepend it to the auto_path if it exists.
# that way the user can override and customise the jstools libraries.

if {[file isdirectory ~/.tk]} then {
  set auto_path [concat [list [glob ~/.tk]] $auto_path]
}

## end boiler_header

j:jstools_init

toplevel .foo
label .foo.l -text "This is a foolish label."
pack .foo.l -fill x

frame .foo.f -width 500 -height 200
pack propagate .foo.f 0
pack .foo.f

jedit:jedit -window .foo.f -file /etc/passwd -mode plain
