* Problems using Tcl/Tk to customize GUI
@ 2001-07-05 10:31 Left Spin
2001-07-06 0:08 ` Mo DeJong
0 siblings, 1 reply; 2+ messages in thread
From: Left Spin @ 2001-07-05 10:31 UTC (permalink / raw)
To: sourcenav
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
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Problems using Tcl/Tk to customize GUI
2001-07-05 10:31 Problems using Tcl/Tk to customize GUI Left Spin
@ 2001-07-06 0:08 ` Mo DeJong
0 siblings, 0 replies; 2+ messages in thread
From: Mo DeJong @ 2001-07-06 0:08 UTC (permalink / raw)
To: sourcenav
On Thu, 5 Jul 2001, Left Spin wrote:
> 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} {
That method should be getting called from the constructor of
the SymBr& class on line 84 of gui/symbolbrowser.tcl:
% grep -n sn_rc_symbolbrowser symbolbrowser.tcl
83- #call user function
84: catch {sn_rc_symbolbrowser $itk_component(hull)
$itk_component(hull).menu}
I would be willing to bet that your Interp does not know
that you defined the sn_rc_symbolbrowser method. You
might want to take a look at the sn_load_rc_file
in sninit.tcl to see if it is pulling in your rc.tcl
file. You should be able to just set the SN_DEBUG env
var to 9 and then look at the generated debug log
in your C:\Temp dir.
cheers
Mo DeJong
Red Hat Inc
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2001-07-06 0:08 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-07-05 10:31 Problems using Tcl/Tk to customize GUI Left Spin
2001-07-06 0:08 ` Mo DeJong
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).