Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  1. goodegod

    what the "on exit" binding?

    Nope. You can bind other windows with <destroy> and a command, but the program will exit before it executes the command on the toplevel "." window. What I do sometimes, is I set the WM_DELETE_COMMAND to do nothing, then I'll have an "Exit" button or menu choice that calls cleanup routines.
  2. goodegod

    ComboBox parse error on -label

    You must have been using an older version of BWidgets before. There is no longer a label option. I recommend creating your label and packing it before your combobox. The options available for the ComboBox are listed here: http://aspn.activestate.com/ASPN/docs/ActiveTcl/bwidget/ComboBox.html
  3. goodegod

    Retrieve combo box values

    I would recommend using either iwidgets or bwidgets for your combobox. These are supported by ActiveState and are simple to use. To return the value with a bwidget combobox, you would say: .combobox getvalue That returns an index. To get the text of that index: set text [lindex [.combobox...
  4. goodegod

    what the &quot;on exit&quot; binding?

    I'd use the window manager protocol command: wm protocol . WM_DELETE_WINDOW <command> Make sure that in command you call "exit." More information can be found here: http://aspn.activestate.com/ASPN/docs/ActiveTcl/tcl/TkCmd/wm.htm#M28
  5. goodegod

    Can TCL execute a process without loss of stdout?

    Look into using the "open" command with command piplines. You can then use file event commands on the channel created and send that directly to stdout. set chan [open | <command> <command args> r]
  6. goodegod

    string map

    Good call... How about: set result [string trim $form_variable $foo_element] where foo_element can have any number of "_" Just a thought...
  7. goodegod

    string map

    Maybe I'm missing something here, but couldn't you just do: set result [lindex [split $form_variable "_"] 1] in your loop?
  8. goodegod

    Help with Parsing a string

    That's how I would do it. :)
  9. goodegod

    Variables with the same name in one list - possible?

    Bob's right, but this sounds like a perfect time to use an itcl class, especially if you have a number of variables to be set for each person. You'll find this to be a lot more scalable in the future as the definition of "person" changes.
  10. goodegod

    Exit errors

    I think there might be more wrong with your code. Are you creating this inside of a class? I created the following program and it worked: package require BWidget pack [ButtonBox .test] set bbox .test $bbox add -text "HELLO WORLD" -highlightthickness 0 -takefocus 0 -relief link...
  11. goodegod

    calling shell name

    I'd add "$0", ie: /hmu/scripts/testit.tcl $0 and read it as the first arguement passed: [lindex $argv 0]
  12. goodegod

    Segmentation fault problem

    What packages are you loading? Only Bwidgets? I've found with programs that if a "puts" statement will prevent it from crashing, you most likely need to call "update" in your code. I would need to know more about your program and where it's crashing to help more.

Part and Inventory Search

Back
Top