Problems using Tcl/Tk to customize GUI

Left Spin leftspin@hotmail.com
Thu Jul 5 10:31:00 GMT 2001


I'm trying to customize the SN GUI using Tcl/Tk under Win98.
I'm new to Tcl/Tk, and I'd sure appreciate some help
getting started using it with SN.

I put a file named rc.tcl in the following directories, it contains the 
sample code to add a shell button to the UI. Needless to say, the
button doesn't show up. What am I doing wrong? Thanks in advance..

c:\program files\source navigator\H-i386-pc-cygwin\share\etc\rc.tcl
c:\home\leftspin\.sn\rc.tcl

I have an environment variable:
HOME=c:\home\leftspin

rc.tcl contains:
proc sn_rc_symbolbrowser {top menu} {
  global tcl_platform

  set tool_frame $top.exp

  # Set a variable that identifies the text widget on
  # the status bar.
  set info $top.msg.msg

  # Create a new button on the toolbar. Note that the
  # button's command invokes the command line tool
  # in the background so that Source-Navigator is not
  # blocked while the tool is running. On Win32, we emulate
  # `xterm' with `cmd'.

  if {!$tcl_platform(platform) != "windows"} {
    set cmdline "exec xterm -T {Source-Navigator} &"
    set description xterm
  } else {
    set cmdline "exec cmd /c start cmd"
    set description shell
  }
  button $tool_frame.xterm -text $description \
      -command $cmdline

  # Set the main window's status bar to read "xterm"
  # or "shell" when the mouse pointer is over the region
  # of the button.
  balloon_bind_info $tool_frame.xterm \
      "Starts a new $description"
  bind $tool_frame.xterm <Leave> "set $top.msg {}"

  # Pack this button onto the toolbar.
  pack $tool_frame.xterm -side left
}

_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com



More information about the Sourcenav mailing list