SCIRun User Mailing List

Text archives Help

[SCIRUN-USERS] Passing a List Through SCIRun GuiInterface

Chronological Thread 
  • From: Stewart Dickson <>
  • To: Martin Cole <>
  • Cc:, "Ward, Richard C." <>
  • Subject: [SCIRUN-USERS] Passing a List Through SCIRun GuiInterface
  • Date: Wed, 26 Jan 2005 15:45:54 -0500


Please correct me if I'm wrong, but it appears to me that the only types we can pass through GuiInterface/GuiContext are:

typedef GuiSingle<string> GuiString;
typedef GuiSingle<double> GuiDouble;
typedef GuiSingle<int> GuiInt;
typedef GuiTriple<Point> GuiPoint;
typedef GuiTriple<Vector> GuiVector;

Here's my problem:  I want to use a Tcl/Tk listbox widget in my SCIRun GUI

Note that listbox -listvariable lets you bind a list to the widget so that when the contents of the list changes,
the contents of the widget are automatically updated (like 'entry -textvariable' and 'button -textvariable').

My SCIRun GUI would work if I could update the contents of the list in the Tcl GUI from my C++ module.
In my module code, I can:
GuiString gui_child1_(ctx->subVar("gui_child(1)"));
GuiString gui_child2_(ctx->subVar("gui_child(2)"));
GuiString gui_child8_(ctx->subVar("gui_child(8)"));

And in my Tcl GUI code, I can:
set $this-gui_child_list [list [set $this-gui_child(1)] \
                                  [set $this-gui_child(2)] \
                                  [set $this-gui_child(8)]]
listbox <name> -listvariable $this-gui_child_list

IT ALMOST WORKS! If I could only either bind the array to the list through some other means than 'set'
(any Tcl wizards know how to do this?) or set the elements of the list through the SCIRun GuiInterface.

Any ideas?



== The SCIRun Users mailing list: send email to   ==
== for more details.                                                     ==
== Please acknowledge use of SCIRun in your papers and reports:          ==
==   see         ==

  • [SCIRUN-USERS] Passing a List Through SCIRun GuiInterface, Stewart Dickson, 01/26/2005

Archive powered by MHonArc 2.6.16.

Top of page