Komodo: Accessing widgets in the auto generated _ui.tcl from the associated .tcl file



I am using Komodo.
I created a text widget and want to insert some text into it.

The below is my ui.tcl file (ie. Dialog_ui.tcl). In my Dialog.tcl file
I want to have access to the $base._text_log widget, so I can insert
text into it.
For eg. I've tried:

::Dialog::._text_log insert end "hello world!"

And other variations, but have not succeeded.

This seems to be something trivial, but I can't seem to figure it
out. I also tried to get to the BASE variable, but was also
unsuccessful. I guess my understanding of namespaces isn't correct.
Is it even possible?

Help is very very much appreciated. Thank you!


# Below is the gui code in Dialog_ui.tcl

# Declare the namespace for this dialog
namespace eval Dialog {}

package require Tk
# Dialog::ui --
#
# Create the UI for this dialog.
#
# ARGS:
# root the parent window for this form
# args a catch-all for other args, but none are expected
#
proc Dialog::ui {root args} {
# this handles '.' as a special case
set base [expr {($root == ".") ? "" : $root}]
variable ROOT $root
variable BASE $base


# Widget Initialization
text $base._text_log \
-height 0 \
-width 0 \
-xscrollcommand [namespace code [list _text_log_xscrollcommand]] \
-yscrollcommand [namespace code [list _text_log_yscrollcommand]]


# Geometry Management

grid $base._text_log -in $root -row 1 -column 1 \
-columnspan 1 \
-ipadx 0 \
-ipady 0 \
-padx 0 \
-pady 0 \
-rowspan 1 \
-sticky news

# Resize Behavior
grid rowconfigure $root 1 -weight 0 -minsize 40 -pad 0
grid rowconfigure $root 2 -weight 0 -minsize 40 -pad 0
grid columnconfigure $root 1 -weight 0 -minsize 40 -pad 0
grid columnconfigure $root 2 -weight 0 -minsize 40 -pad 0
}

.



Relevant Pages

  • Re: Embed the Tk Console in a Tcl/Tk application
    ... How can the Console be integrated into a Tcl program ... the text widget and behaves like a text widget: ... proc textConsole {widget args} { ... The default handler evals ...
    (comp.lang.tcl)
  • Re: Args getting written into text ouput
    ... But if I understand your most recent post, you also have tags ... > | args, it will be much easier to help you reach a satisfying solution. ... > dumping it into the text widget. ... > That's what I'm trying to shear off. ...
    (comp.lang.tcl)
  • TkInter: Problem with propagation of resize events through geometry manager hierarchy?
    ... I'm looking for help with a Tkinter program's handling of resize. ... The widget hierarchy is: ... have a label in a frame inside the root window; ... If the scroll bars are in place but I don't have the image ...
    (comp.lang.python)
  • Re: exiting chroot()
    ... > Only root can ptrace another process. ... ## Args: ebx -> status ... # ptrace_attach (pid) failed ...
    (comp.unix.programmer)
  • Re: Place and Place Forget
    ... wrong # args: ... use to get he config options, ... for using when trying to place the3 widget back. ... and the utilize the "grid remove" command which unmaps the widget ...
    (comp.lang.tcl)