Index: /branches/multichoice/builder/scripts/templates/clang.tl
===================================================================
--- /branches/multichoice/builder/scripts/templates/clang.tl	(revision 6370)
+++ /branches/multichoice/builder/scripts/templates/clang.tl	(revision 6371)
@@ -180,4 +180,6 @@
 	$(CC) $(CFLAGS) $(INCLUDES) $< -o $@ $(LIBS)
 
+install:
+
 clean:
 	$(RM) @@FILEROOT@@c run*.xml
Index: /branches/multichoice/builder/scripts/templates/fortran77.tl
===================================================================
--- /branches/multichoice/builder/scripts/templates/fortran77.tl	(revision 6370)
+++ /branches/multichoice/builder/scripts/templates/fortran77.tl	(revision 6371)
@@ -179,4 +179,6 @@
 	$(FC) $(FCFLAGS) $(INCLUDES) $< -o $@ $(LIBS)
 
+install:
+
 clean:
 	$(RM) @@FILEROOT@@f77 run*.xml
Index: /branches/multichoice/builder/scripts/templates/java.tl
===================================================================
--- /branches/multichoice/builder/scripts/templates/java.tl	(revision 6370)
+++ /branches/multichoice/builder/scripts/templates/java.tl	(revision 6371)
@@ -126,4 +126,6 @@
 	$(JAVAC) $(CLASSPATH) $<
 
+install: 
+
 clean:
 	$(RM) @@FILEROOT@@.class run*.xml
Index: /branches/multichoice/examples/mapviewer/camera/camera_example.tcl
===================================================================
--- /branches/multichoice/examples/mapviewer/camera/camera_example.tcl	(revision 6370)
+++ /branches/multichoice/examples/mapviewer/camera/camera_example.tcl	(revision 6371)
@@ -1,2 +1,3 @@
+package require Tk
 package require Rappture
 package require RapptureGUI
Index: /branches/multichoice/examples/mapviewer/camera/camera_zoom_layer_example.tcl
===================================================================
--- /branches/multichoice/examples/mapviewer/camera/camera_zoom_layer_example.tcl	(revision 6370)
+++ /branches/multichoice/examples/mapviewer/camera/camera_zoom_layer_example.tcl	(revision 6371)
@@ -1,2 +1,3 @@
+package require Tk
 package require Rappture
 package require RapptureGUI
Index: /branches/multichoice/examples/mapviewer/colorramp/colorramp_geotiff_example.tcl
===================================================================
--- /branches/multichoice/examples/mapviewer/colorramp/colorramp_geotiff_example.tcl	(revision 6370)
+++ /branches/multichoice/examples/mapviewer/colorramp/colorramp_geotiff_example.tcl	(revision 6371)
@@ -1,2 +1,3 @@
+package require Tk
 package require Rappture
 package require RapptureGUI
Index: /branches/multichoice/examples/mapviewer/colorramp/colorramp_netcdf_example.tcl
===================================================================
--- /branches/multichoice/examples/mapviewer/colorramp/colorramp_netcdf_example.tcl	(revision 6370)
+++ /branches/multichoice/examples/mapviewer/colorramp/colorramp_netcdf_example.tcl	(revision 6371)
@@ -1,2 +1,3 @@
+package require Tk
 package require Rappture
 package require RapptureGUI
Index: /branches/multichoice/examples/mapviewer/feature/Makefile.in
===================================================================
--- /branches/multichoice/examples/mapviewer/feature/Makefile.in	(revision 6370)
+++ /branches/multichoice/examples/mapviewer/feature/Makefile.in	(revision 6371)
@@ -16,8 +16,12 @@
 destdir         = $(prefix)/examples/mapviewer/feature
 FILES           = \
-                  $(srcdir)/afr_countries.dbf \
-                  $(srcdir)/afr_countries.prj \
-                  $(srcdir)/afr_countries.shp \
-                  $(srcdir)/afr_countries.shx \
+                  $(srcdir)/afr_elas.dbf \
+                  $(srcdir)/afr_elas.prj \
+                  $(srcdir)/afr_elas.shp \
+                  $(srcdir)/afr_elas.shx \
+                  $(srcdir)/feature_layer_26_colors.tcl \
+                  $(srcdir)/feature_multiple_selection_by_callback.tcl \
+                  $(srcdir)/feature_multiple_selection_by_new_layer.tcl \
+                  $(srcdir)/feature_multiple_selection_by_updated_layer.tcl \
                   $(srcdir)/feature_selector_query.tcl
 
Index: anches/multichoice/examples/mapviewer/feature/afr_countries.prj
===================================================================
--- /branches/multichoice/examples/mapviewer/feature/afr_countries.prj	(revision 6370)
+++ 	(revision )
@@ -1,8 +1,0 @@
-GEOGCS["WGS 84",
-    DATUM["WGS_1984", 
-        SPHEROID["WGS 84",6378137,298.257223563,
-            AUTHORITY["EPSG","7030"]],
-        AUTHORITY["EPSG","6326"]],
-    PRIMEM["Greenwich",0],
-    UNIT["degree",0.0174532925199433],
-    AUTHORITY["EPSG","4326"]]
Index: /branches/multichoice/examples/mapviewer/feature/afr_elas.prj
===================================================================
--- /branches/multichoice/examples/mapviewer/feature/afr_elas.prj	(revision 6371)
+++ /branches/multichoice/examples/mapviewer/feature/afr_elas.prj	(revision 6371)
@@ -0,0 +1,1 @@
+GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137,298.257223563]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]]
Index: /branches/multichoice/examples/mapviewer/feature/feature_layer_26_colors.tcl
===================================================================
--- /branches/multichoice/examples/mapviewer/feature/feature_layer_26_colors.tcl	(revision 6371)
+++ /branches/multichoice/examples/mapviewer/feature/feature_layer_26_colors.tcl	(revision 6371)
@@ -0,0 +1,218 @@
+# This example demonstrates a problem that used to exist where
+# sending too much data along with the command to the server
+# would hit the command length limit. Data like stylesheets
+# and selector information should now be sent over the data channel.
+
+package require Tk
+package require Rappture
+package require RapptureGUI
+
+set colors25 {
+FF0000FF
+FF2A00FF
+FF5500FF
+FF8000FF
+FFAA00FF
+FFD500FF
+FFFF00FF
+D5FF00FF
+AAFF00FF
+80FF00FF
+55FF00FF
+2BFF00FF
+00FF00FF
+00FF2AFF
+00FF55FF
+00FF80FF
+00FFAAFF
+00FFD4FF
+00FFFFFF
+00D4FFFF
+00AAFFFF
+0080FFFF
+0055FFFF
+002BFFFF
+0000FFFF
+}
+
+set cutoffs25 {
+-141000
+5.65e+06
+1.13e+07
+1.70e+07
+2.26e+07
+2.83e+07
+3.39e+07
+3.96e+07
+4.52e+07
+5.09e+07
+5.65e+07
+6.22e+07
+6.79e+07
+7.35e+07
+7.92e+07
+8.48e+07
+9.05e+07
+9.61e+07
+1.02e+08
+1.07e+08
+1.13e+08
+1.19e+08
+1.24e+08
+1.30e+08
+1.36e+08
+1.41e+08
+}
+
+set colors26 {
+FF0000FF
+FF2900FF
+FF5200FF
+FF7A00FF
+FFA300FF
+FFCC00FF
+FFF500FF
+E0FF00FF
+B8FF00FF
+8FFF00FF
+66FF00FF
+3DFF00FF
+14FF00FF
+00FF14FF
+00FF3DFF
+00FF66FF
+00FF8FFF
+00FFB8FF
+00FFE0FF
+00F5FFFF
+00CCFFFF
+00A3FFFF
+007AFFFF
+0052FFFF
+0029FFFF
+0000FFFF
+}
+
+set cutoffs26 {
+-141000
+5.44e+06
+1.09e+07
+1.63e+07
+2.17e+07
+2.72e+07
+3.26e+07
+3.81e+07
+4.35e+07
+4.89e+07
+5.44e+07
+5.98e+07
+6.52e+07
+7.07e+07
+7.61e+07
+8.16e+07
+8.70e+07
+9.24e+07
+9.79e+07
+1.03e+08
+1.09e+08
+1.14e+08
+1.20e+08
+1.25e+08
+1.30e+08
+1.36e+08
+1.41e+08
+}
+
+
+proc generateStyleSheet {colors} {
+
+    set style_t {
+      sID {
+        fill: #COLOR;
+        stroke: #000000ff;
+        stroke-width: 3;
+        altitude-clamping: terrain-drape;
+      }
+    }
+    set stylesheet ""
+    for {set i 0} {$i < [llength $colors]} {incr i} {
+        set s $style_t
+        regsub ID $s $i s
+        regsub COLOR $s [lindex $colors $i] s
+        append stylesheet $s
+    }
+
+    return $stylesheet
+}
+
+proc generateSelectors {cutoffs} {
+    set selectors ""
+    set numSelectors [llength $cutoffs]
+    for {set i 0} {$i < $numSelectors-1} {incr i} {
+       set lower [lindex $cutoffs $i]
+       set upper [lindex $cutoffs [expr $i+1]]
+       lappend selectors [list id $i style s$i query "POP2005 >= $lower and POP2005 < $upper"]
+    }
+
+    return $selectors
+}
+
+
+
+Rappture::resources::load
+
+set commondir [file join [file dirname [info script]] .. common]
+source [file join $commondir geovis_settings.tcl]
+
+set width 400
+set height 300
+wm geometry . ${width}x${height}
+update
+
+set mapviewer [Rappture::MapViewer .g]
+
+pack .g -expand yes -fill both
+
+
+# Create a map object
+set map [Rappture::Map #auto]
+
+# Parameters for feature layer
+array set ogrParams {
+    url {file:///data/mygeohub/tools/landuse/afr_countries.shp}
+}
+array set countries {
+    label   "Countries"
+    opacity 1.0
+}
+
+set stylesheet [generateStyleSheet $colors25]
+set selectors [generateSelectors $cutoffs25]
+
+# Configure layers
+$map addLayer feature \
+    pop25 [array get countries] \
+    ogr [array get ogrParams] \
+    $stylesheet "" $selectors
+
+
+# Add map to viewer
+$mapviewer add $map
+$mapviewer scale $map
+
+
+after 5000 {
+    $map deleteLayer "pop25"
+
+    set stylesheet [generateStyleSheet $colors26]
+    set selectors [generateSelectors $cutoffs26]
+
+    # Configure layers
+    $map addLayer feature \
+        pop26 [array get countries] \
+        ogr [array get ogrParams] \
+        $stylesheet "" $selectors
+
+    $mapviewer refresh
+    puts "updating layer"
+}
Index: /branches/multichoice/examples/mapviewer/feature/feature_multiple_selection_by_callback.tcl
===================================================================
--- /branches/multichoice/examples/mapviewer/feature/feature_multiple_selection_by_callback.tcl	(revision 6371)
+++ /branches/multichoice/examples/mapviewer/feature/feature_multiple_selection_by_callback.tcl	(revision 6371)
@@ -0,0 +1,140 @@
+package require Tk
+package require Rappture
+package require RapptureGUI
+
+proc handleSelect {option {args ""}} {
+    global selectedFeatures
+
+    switch $option {
+        "annotation" {
+            # User clicked a map annotation (not a feature) like a user-added pin, etc.
+         }
+        "clear" {
+            # Clear any previous selection, user clicked on background where there is no feature
+            # No args
+            set selectedFeatures ""
+        }
+        "feature" {
+            # args: op featureIDList layerName
+            foreach {op featureIdList layerName} $args break
+
+            puts "select feature $op:\tfeatureIDList=\"$featureIdList\"\tlayerName=\"$layerName\""
+
+            # strip off the mapId from the layerName
+            regexp {([^-]*)-(.*)} $layerName matched mapId layerName
+
+            switch $op {
+                "add" {
+                    set selectedFeatures [concat $selectedFeatures $featureIdList]
+                }
+                "set" {
+                    set selectedFeatures $featureIdList
+                }
+                "remove" {
+                    foreach i $featureIdList {
+                        set id [lsearch -exact $selectedFeatures $i]
+                        if {$id > 0} {
+                            set selectedFeatures [lreplace $selectedFeatures $id $id]
+                        }
+                    }
+                }
+            }
+            updateHighlightedFeatures $layerName $selectedFeatures
+        }
+    }
+}
+
+proc updateHighlightedFeatures {layerName selectedFeatures} {
+    global map
+    global mapviewer
+    global selector2
+
+    $map deleteSelector $layerName $selector2(id)
+    set selector2(query) [concat "FID IN (" [join $selectedFeatures ","] ")"]
+    $map addSelector $layerName $selector2(id) [array get selector2]
+
+    puts "refreshing mapviewer"
+    $mapviewer refresh
+}
+
+
+Rappture::resources::load
+
+set commondir [file join [file dirname [info script]] .. common]
+source [file join $commondir geovis_settings.tcl]
+
+set width 400
+set height 300
+wm geometry . ${width}x${height}
+update
+
+set mapviewer [Rappture::MapViewer .g]
+
+pack .g -expand yes -fill both
+
+
+# Parameters for feature layer
+array set ogrParams {
+    url {local://afr_elas.shp}
+}
+array set countries {
+    label   "Countries"
+    opacity 1.0
+}
+set stylesheet {
+  s1 {
+    fill: #98AFC7;
+    stroke: #000000;
+    stroke-width: 3;
+    altitude-clamping: terrain-drape;
+  }
+  s2 {
+    fill: #00FFFF;
+    stroke: #000000;
+    stroke-width: 3;
+    altitude-clamping: terrain-drape;
+  }
+}
+array set selector1 {
+    id    1
+    style s1
+    query "POP2005 >= 0"
+}
+array set selector2 {
+    id    2
+    style s2
+    query "FID IN (0,1)"
+}
+set numSelectors 2
+for {set i 1} {$i <= $numSelectors} {incr i} {
+   lappend selectors [array get selector$i]
+}
+
+# Track of which feature ids have been selected
+set selectedFeatures "0 1"
+
+# Create a map object
+set map [Rappture::Map #auto]
+
+# Configure layers
+set layerId 0
+$map addLayer feature \
+    countries$layerId [array get countries] \
+    ogr [array get ogrParams] \
+    $stylesheet "" $selectors
+
+# Add map to viewer
+$mapviewer add $map
+$mapviewer scale $map
+
+$mapviewer setSelectCallback "handleSelect"
+
+after 2000 {
+    $mapviewer camera zoom layer $map countries$layerId
+}
+
+after 5000 {
+    # simulating selecting features from outside of the map
+    $mapviewer select feature add "44 48 43 21" $map-countries$layerId
+    puts "select feature add ..."
+}
Index: /branches/multichoice/examples/mapviewer/feature/feature_multiple_selection_by_new_layer.tcl
===================================================================
--- /branches/multichoice/examples/mapviewer/feature/feature_multiple_selection_by_new_layer.tcl	(revision 6371)
+++ /branches/multichoice/examples/mapviewer/feature/feature_multiple_selection_by_new_layer.tcl	(revision 6371)
@@ -0,0 +1,221 @@
+package require Tk
+package require Rappture
+package require RapptureGUI
+
+set colors23 {
+    FF0000FF
+    FF8000FF
+    FFAA00FF
+    FFD500FF
+    FFFF00FF
+    D5FF00FF
+    AAFF00FF
+    80FF00FF
+    55FF00FF
+    2BFF00FF
+    00FF00FF
+    00FF2AFF
+    00FF55FF
+    00FF80FF
+    00FFAAFF
+    00FFD4FF
+    00FFFFFF
+    00D4FFFF
+    00AAFFFF
+    0080FFFF
+    0055FFFF
+    002BFFFF
+    0000FFFF
+}
+
+set cutoffs24 {
+    0.019100
+    0.067600
+    0.083600
+    0.099600
+    0.116000
+    0.132000
+    0.148000
+    0.164000
+    0.180000
+    0.196000
+    0.212000
+    0.228000
+    0.244000
+    0.260000
+    0.276000
+    0.292000
+    0.308000
+    0.324000
+    0.340000
+    0.356000
+    0.372000
+    0.388000
+    0.404000
+    0.420000
+}
+
+
+proc handleSelect {option {args ""}} {
+    global selectedFeatures
+    switch $option {
+        "annotation" {
+            # User clicked a map annotation (not a feature) like a user-added pin, etc.
+         }
+        "clear" {
+            # Clear any previous selection, user clicked on background where there is no feature
+            # No args
+        }
+        "feature" {
+            # args: op featureIDList layerName
+            foreach {op featureIdList layerName} $args break
+            switch $op {
+                "add" {
+                }
+                "set" {
+                    foreach {op featureIdList layerName} $args break
+                    lappend selectedFeatures $featureIdList
+                    adjustLayerHighlight $op $selectedFeatures $layerName
+                }
+                "remove" {
+                }
+            }
+        }
+    }
+}
+
+
+proc adjustLayerHighlight {option featureIdList layerName} {
+    global map
+    global mapviewer
+    global stylesheet
+    global cutoffs24
+    set selectors [generateSelectors $cutoffs24 $featureIdList]
+    $map deleteLayer "countries"
+    set layerName "countries"
+    addCountryLayer $map $layerName $stylesheet $selectors
+    $mapviewer refresh
+}
+
+proc generateStyleSheet {colors} {
+
+    set style_t {
+      sID {
+        fill: #COLOR;
+        stroke: #000000ff;
+        stroke-width: 3;
+        altitude-clamping: terrain-drape;
+      }
+    }
+    set stylesheet ""
+    for {set i 0} {$i < [llength $colors]} {incr i} {
+        # append stylesheet "\n" [string map {ID $i COLOR [lindex $colors $i]} $style_t]
+        set s $style_t
+        regsub ID $s $i s
+        regsub COLOR $s [lindex $colors $i] s
+        append stylesheet $s
+    }
+
+    # add a color for fields marked as NA or -1 where there was no data
+    append stylesheet [string map {ID NA COLOR f2f2f2ff} $style_t]
+
+    # add a color for selected fields
+    append stylesheet [string map {ID SE COLOR 000000FF} $style_t]
+
+    return $stylesheet
+}
+
+proc generateSelectors {cutoffs {featureIdList {}}} {
+    set selectors ""
+    set numSelectors [llength $cutoffs]
+    for {set i 0} {$i < $numSelectors-1} {incr i} {
+       set lower [lindex $cutoffs $i]
+       set upper [lindex $cutoffs [expr $i+1]]
+       lappend selectors [list id $i style s$i query "elas >= $lower and elas < $upper"]
+    }
+
+    # add a selector for fields marked as NA or -1 where there was no data
+    incr i
+    lappend selectors [list id $i style sNA query "elas = -1"]
+
+    # add a selector for selected fields
+    incr i
+    lappend selectors [list id $i style sSE query "FID IN ([join $featureIdList ","])"]
+
+    return $selectors
+}
+
+proc addCountryLayer {map layerName stylesheet selectors} {
+    # Parameters for feature layer
+    array set ogrParams {
+        url {local://afr_elas.shp}
+    }
+    array set countries {
+        label   "Countries"
+        opacity 1.0
+    }
+
+    # Configure layers
+    $map addLayer feature \
+        $layerName [array get countries] \
+        ogr [array get ogrParams] \
+        $stylesheet "" $selectors
+}
+
+
+
+Rappture::resources::load
+
+set commondir [file join [file dirname [info script]] .. common]
+source [file join $commondir geovis_settings.tcl]
+
+set width 400
+set height 300
+wm geometry . ${width}x${height}
+update
+
+set mapviewer [Rappture::MapViewer .g]
+
+pack .g -expand yes -fill both
+
+# setup a global variable to accumulate selected features
+set selectedFeatures {0 1 2 3 4}
+
+set stylesheet [generateStyleSheet $colors23]
+set selectors [generateSelectors $cutoffs24 $selectedFeatures]
+
+# Create a map object
+set map [Rappture::Map #auto]
+
+set layerName "countries"
+addCountryLayer $map $layerName $stylesheet $selectors
+
+# Configure the placard
+set placardAttributes [list \
+    name "Country Name" \
+    ISO3 "Country Code" \
+    elas "Elasticity" \
+]
+set placardStyle {
+    fill: #B6B6B688;
+    text-fill: #000000;
+    text-size: 12.0;
+}
+set placardPadding 5
+$map setPlacardConfig countries \
+    $placardAttributes \
+    $placardStyle \
+    $placardPadding
+
+
+# Add map to viewer
+$mapviewer add $map
+$mapviewer scale $map
+
+# setup feature callback
+$mapviewer setSelectCallback "handleSelect"
+
+after 2000 {
+    $mapviewer camera zoom layer $map $layerName
+}
+
Index: /branches/multichoice/examples/mapviewer/feature/feature_multiple_selection_by_updated_layer.tcl
===================================================================
--- /branches/multichoice/examples/mapviewer/feature/feature_multiple_selection_by_updated_layer.tcl	(revision 6371)
+++ /branches/multichoice/examples/mapviewer/feature/feature_multiple_selection_by_updated_layer.tcl	(revision 6371)
@@ -0,0 +1,125 @@
+package require Tk
+package require Rappture
+package require RapptureGUI
+
+Rappture::resources::load
+
+set commondir [file join [file dirname [info script]] .. common]
+source [file join $commondir geovis_settings.tcl]
+
+set width 400
+set height 300
+wm geometry . ${width}x${height}
+update
+
+set mapviewer [Rappture::MapViewer .g]
+
+pack .g -expand yes -fill both
+
+
+# Parameters for feature layer
+array set ogrParams {
+    url {local://afr_elas.shp}
+}
+array set countries {
+    label   "Countries"
+    opacity 1.0
+}
+set stylesheet {
+  s1 {
+    fill: #98AFC7;
+    stroke: #000000;
+    stroke-width: 3;
+    altitude-clamping: terrain-drape;
+  }
+  s2 {
+    fill: #00FFFF;
+    stroke: #000000;
+    stroke-width: 3;
+    altitude-clamping: terrain-drape;
+  }
+}
+array set selector1 {
+    id    1
+    style s1
+    query "POP2005 >= 0"
+}
+array set selector2 {
+    id    2
+    style s2
+    query "FID IN (0,1)"
+}
+set numSelectors 2
+for {set i 1} {$i <= $numSelectors} {incr i} {
+   lappend selectors [array get selector$i]
+}
+
+# Create a map object
+set map [Rappture::Map #auto]
+
+# Configure layers
+set layerId 0
+$map addLayer feature \
+    countries$layerId [array get countries] \
+    ogr [array get ogrParams] \
+    $stylesheet "" $selectors
+
+# Add map to viewer
+$mapviewer add $map
+$mapviewer scale $map
+
+after 2000 {
+    $mapviewer camera zoom layer $map countries$layerId
+}
+
+after 5000 {
+    puts "updating layer: reusing layer name (delete/add)"
+
+    $map deleteLayer countries$layerId
+
+    set selector2(query) "FID IN (0,1,2,3,4,5,6,7,8,12,15,44)"
+    set selectors ""
+    for {set i 1} {$i <= $numSelectors} {incr i} {
+       lappend selectors [array get selector$i]
+    }
+
+    $map addLayer feature \
+        countries$layerId [array get countries] \
+        ogr [array get ogrParams] \
+        $stylesheet "" $selectors
+
+    puts "refreshing mapviewer"
+    $mapviewer refresh
+}
+
+
+after 10000 {
+    puts "updating layer: new layer name"
+
+    set selector2(query) "FID IN (7,8,12,15,44)"
+    set selectors ""
+    for {set i 1} {$i <= $numSelectors} {incr i} {
+       lappend selectors [array get selector$i]
+    }
+
+    incr layerId
+    $map addLayer feature \
+        countries$layerId [array get countries] \
+        ogr [array get ogrParams] \
+        $stylesheet "" $selectors
+
+    puts "refreshing mapviewer"
+    $mapviewer refresh
+}
+
+
+after 15000 {
+    puts "updating layer selectors using addSelector/deleteSelector"
+
+    $map deleteSelector countries$layerId $selector2(id)
+    set selector2(query) "FID IN (33,34,35,36,37,38,39,4,48,21,43)"
+    $map addSelector countries$layerId $selector2(id) [array get selector2]
+
+    puts "refreshing mapviewer"
+    $mapviewer refresh
+}
Index: /branches/multichoice/examples/mapviewer/feature/feature_selector_query.tcl
===================================================================
--- /branches/multichoice/examples/mapviewer/feature/feature_selector_query.tcl	(revision 6370)
+++ /branches/multichoice/examples/mapviewer/feature/feature_selector_query.tcl	(revision 6371)
@@ -1,2 +1,3 @@
+package require Tk
 package require Rappture
 package require RapptureGUI
@@ -27,5 +28,5 @@
 # Parameters for feature layer
 array set ogrParams {
-    url {local://afr_countries.shp}
+    url {local://afr_elas.shp}
 }
 array set countries {
Index: /branches/multichoice/examples/mapviewer/gdal/gdal_example.tcl
===================================================================
--- /branches/multichoice/examples/mapviewer/gdal/gdal_example.tcl	(revision 6370)
+++ /branches/multichoice/examples/mapviewer/gdal/gdal_example.tcl	(revision 6371)
@@ -1,2 +1,3 @@
+package require Tk
 package require Rappture
 package require RapptureGUI
Index: /branches/multichoice/examples/mapviewer/layers/add_remove_layers.tcl
===================================================================
--- /branches/multichoice/examples/mapviewer/layers/add_remove_layers.tcl	(revision 6370)
+++ /branches/multichoice/examples/mapviewer/layers/add_remove_layers.tcl	(revision 6371)
@@ -1,2 +1,3 @@
+package require Tk
 package require Rappture
 package require RapptureGUI
@@ -79,6 +80,5 @@
 
     # Update map
-    $mapviewer delete
-    $mapviewer add $map
+    $mapviewer refresh
     puts stderr "Deleted OSM Layer, Added colorramp"
 }
@@ -94,6 +94,5 @@
 
     # Update map
-    $mapviewer delete
-    $mapviewer add $map
+    $mapviewer refresh
     puts stderr "Deleted colorramp Layer, Added line layer"
 }
@@ -110,6 +109,5 @@
 
     # Update map
-    $mapviewer delete
-    $mapviewer add $map
+    $mapviewer refresh
     puts stderr "Deleted line Layer, Added OSM layer"
 }
@@ -122,6 +120,5 @@
 
     # Update map
-    $mapviewer delete
-    $mapviewer add $map
+    $mapviewer refresh
     puts stderr "Added colorramp layer"
 }
@@ -134,6 +131,5 @@
 
     # Update map
-    $mapviewer delete
-    $mapviewer add $map
+    $mapviewer refresh
     puts stderr "Added line layer"
 }
Index: /branches/multichoice/examples/mapviewer/layers/coord1.csv
===================================================================
--- /branches/multichoice/examples/mapviewer/layers/coord1.csv	(revision 6371)
+++ /branches/multichoice/examples/mapviewer/layers/coord1.csv	(revision 6371)
@@ -0,0 +1,9 @@
+latitude,longitude,name
+48.66080825,10.28323850,Point1
+48.66074700,10.28292000,Point2
+48.66075045,10.28249425,Point3
+48.66075395,10.28249175,Point4
+48.66077113,10.28233356,Point5
+48.66080136,10.28213118,Point6
+48.66079620,10.28196900,Point7
+
Index: /branches/multichoice/examples/mapviewer/layers/coord2.csv
===================================================================
--- /branches/multichoice/examples/mapviewer/layers/coord2.csv	(revision 6371)
+++ /branches/multichoice/examples/mapviewer/layers/coord2.csv	(revision 6371)
@@ -0,0 +1,8 @@
+latitude,longitude,z
+15.744,20.511,0
+24.512,-7.345,0
+45.505,-18.969,0
+32.418,15.51,0
+13.136,1.800,0
+20.992,-32.322,0
+-7.8895,32.271,0
Index: /branches/multichoice/examples/mapviewer/layers/remove_single_layer.tcl
===================================================================
--- /branches/multichoice/examples/mapviewer/layers/remove_single_layer.tcl	(revision 6370)
+++ /branches/multichoice/examples/mapviewer/layers/remove_single_layer.tcl	(revision 6371)
@@ -1,2 +1,3 @@
+package require Tk
 package require Rappture
 package require RapptureGUI
@@ -84,6 +85,5 @@
 
     # Update the map
-    $mapviewer delete
-    $mapviewer add $map
+    $mapviewer refresh
 }
 
Index: /branches/multichoice/examples/mapviewer/layers/repeated_layer_names.tcl
===================================================================
--- /branches/multichoice/examples/mapviewer/layers/repeated_layer_names.tcl	(revision 6371)
+++ /branches/multichoice/examples/mapviewer/layers/repeated_layer_names.tcl	(revision 6371)
@@ -0,0 +1,86 @@
+package require Rappture
+package require RapptureGUI
+
+Rappture::resources::load
+
+set commondir [file join [file dirname [info script]] .. common]
+source [file join $commondir geovis_settings.tcl]
+
+set width 400
+set height 300
+wm geometry . ${width}x${height}
+update
+
+set mapviewer [Rappture::MapViewer .g]
+
+pack .g -expand yes -fill both
+
+# create xyz layer
+array set xyzParams {
+    url {http://otile[1234].mqcdn.com/tiles/1.0.0/map/{z}/{x}/{y}.jpg}
+}
+array set osm {
+    label "OSM"
+    cache false
+}
+
+# create an feature icon layer from a csv file using the OGR driver
+# the longitude and latitude fields must be named "longitude" and
+# "latitude" respectively
+#
+# we add the local:// prefix to tell the map viewer widget that
+# the file exists locally and needs to be transferred to the
+# geovis server.
+# set path "local://coord.csv"
+set path "local://coord1.csv"
+array set ogrParams1 [subst {
+    url {$path}
+}]
+array set iconParams1 {
+    label  "CSV data 1"
+    description "using OGR data provider to load data from a CSV file"
+    style "-icon pin3"
+}
+
+set path "local://coord2.csv"
+array set ogrParams2 [subst {
+    url {$path}
+}]
+array set iconParams2 {
+    label  "CSV data 2"
+    description "using OGR data provider to load data from a CSV file"
+    style "-icon pin7"
+}
+
+# create a map object
+set map [Rappture::Map #auto]
+
+# add a layer to the map object
+$map addLayer image \
+    osm [array get osm] \
+    xyz [array get xyzParams]
+
+# add csv layer 1 to the map object
+$map addLayer icon \
+    csvdata [array get iconParams1] \
+    ogr [array get ogrParams1]
+
+$mapviewer scale $map
+$mapviewer add $map
+
+
+after 5000 {
+    # remove csv layer 1 from the map object
+    $map deleteLayer csvdata
+
+    # add csv layer 2 to the map object
+    # with the same layer name as our previous layer
+    $map addLayer icon \
+        csvdata [array get iconParams2] \
+        ogr [array get ogrParams2]
+
+    # Update map viewer
+    $mapviewer clear
+    $mapviewer add $map
+    puts stderr "Deleted csv layer 1, Added csv layer 2"
+}
Index: /branches/multichoice/examples/mapviewer/ogr/ogr_csv_icon_example.tcl
===================================================================
--- /branches/multichoice/examples/mapviewer/ogr/ogr_csv_icon_example.tcl	(revision 6370)
+++ /branches/multichoice/examples/mapviewer/ogr/ogr_csv_icon_example.tcl	(revision 6371)
@@ -1,2 +1,3 @@
+package require Tk
 package require Rappture
 package require RapptureGUI
@@ -25,5 +26,5 @@
 }
 
-# create an feature point layer from a csv file using the OGR driver
+# create a feature icon layer from a csv file using the OGR driver
 # the longitude and latitude fields must be named "longitude" and
 # "latitude" respectively
Index: /branches/multichoice/examples/mapviewer/ogr/ogr_csv_points_example.tcl
===================================================================
--- /branches/multichoice/examples/mapviewer/ogr/ogr_csv_points_example.tcl	(revision 6370)
+++ /branches/multichoice/examples/mapviewer/ogr/ogr_csv_points_example.tcl	(revision 6371)
@@ -1,2 +1,3 @@
+package require Tk
 package require Rappture
 package require RapptureGUI
Index: /branches/multichoice/examples/mapviewer/ogr/ogr_csv_to_shp_icon_example.tcl
===================================================================
--- /branches/multichoice/examples/mapviewer/ogr/ogr_csv_to_shp_icon_example.tcl	(revision 6370)
+++ /branches/multichoice/examples/mapviewer/ogr/ogr_csv_to_shp_icon_example.tcl	(revision 6371)
@@ -1,2 +1,3 @@
+package require Tk
 package require Rappture
 package require RapptureGUI
Index: /branches/multichoice/examples/mapviewer/ogr/ogr_shape_line_example.tcl
===================================================================
--- /branches/multichoice/examples/mapviewer/ogr/ogr_shape_line_example.tcl	(revision 6370)
+++ /branches/multichoice/examples/mapviewer/ogr/ogr_shape_line_example.tcl	(revision 6371)
@@ -1,2 +1,3 @@
+package require Tk
 package require Rappture
 package require RapptureGUI
Index: /branches/multichoice/examples/mapviewer/placard/Makefile.in
===================================================================
--- /branches/multichoice/examples/mapviewer/placard/Makefile.in	(revision 6370)
+++ /branches/multichoice/examples/mapviewer/placard/Makefile.in	(revision 6371)
@@ -17,4 +17,5 @@
 FILES           = \
                   $(srcdir)/placard_example.tcl \
+                  $(srcdir)/placard_disable_example.tcl \
                   $(srcdir)/station_clean.csv
 
Index: /branches/multichoice/examples/mapviewer/placard/placard_disable_example.tcl
===================================================================
--- /branches/multichoice/examples/mapviewer/placard/placard_disable_example.tcl	(revision 6371)
+++ /branches/multichoice/examples/mapviewer/placard/placard_disable_example.tcl	(revision 6371)
@@ -0,0 +1,78 @@
+package require Tk
+package require Rappture
+package require RapptureGUI
+
+Rappture::resources::load
+
+set commondir [file join [file dirname [info script]] .. common]
+source [file join $commondir geovis_settings.tcl]
+
+set width 400
+set height 300
+wm geometry . ${width}x${height}
+update
+
+set mapviewer [Rappture::MapViewer .g]
+
+pack .g -expand yes -fill both
+
+# create an XYZ world layer
+array set xyzParams {
+    url {http://otile[1234].mqcdn.com/tiles/1.0.0/map/{z}/{x}/{y}.jpg}
+}
+array set osm {
+    label "OSM Map"
+    description "MapQuest OpenStreetMap Street base layer"
+}
+
+# create an feature point layer from a csv file using the OGR driver
+# the longitude and latitude fields must be named "longitude" and
+# "latitude" respectively
+#
+# we add the local:// prefix to tell the map viewer widget that
+# the file exists locally and needs to be transferred to the
+# geovis server.
+# set path "local://[file join [file dirname [info script]] coord.csv]"
+set path "local://station_clean.csv"
+array set ogrParams [subst {
+    url {$path}
+}]
+array set stations {
+    label "CSV data"
+    description "using OGR data provider to load data from a CSV file"
+}
+array set placardAttributes {
+    latitude Lat
+    longitude Lon
+}
+set placardStyle {
+    fill: #B6B6B688;
+    text-fill: #000000;
+    text-size: 12.0;
+}
+set placardPadding 5
+
+# create a map object
+set map [Rappture::Map #auto]
+
+# add all layers to the map object
+$map addLayer image \
+    osm [array get osm] \
+    xyz [array get xyzParams]
+$map addLayer icon \
+    stations [array get stations] \
+    ogr [array get ogrParams]
+$map setPlacardConfig stations \
+    [array get placardAttributes] \
+    $placardStyle \
+    $placardPadding
+
+# add a map to the vis client
+$mapviewer scale $map
+$mapviewer add $map
+
+# Make sure the MapViewer rebuilds the map
+$mapviewer refresh
+
+# disable the placard for the "stations" layer of $map
+$mapviewer placard enable off "$map-stations"
Index: /branches/multichoice/examples/mapviewer/placard/placard_example.tcl
===================================================================
--- /branches/multichoice/examples/mapviewer/placard/placard_example.tcl	(revision 6370)
+++ /branches/multichoice/examples/mapviewer/placard/placard_example.tcl	(revision 6371)
@@ -1,2 +1,3 @@
+package require Tk
 package require Rappture
 package require RapptureGUI
Index: /branches/multichoice/examples/mapviewer/select/select_feature_example.tcl
===================================================================
--- /branches/multichoice/examples/mapviewer/select/select_feature_example.tcl	(revision 6370)
+++ /branches/multichoice/examples/mapviewer/select/select_feature_example.tcl	(revision 6371)
@@ -1,2 +1,3 @@
+package require Tk
 package require Rappture
 package require RapptureGUI
@@ -7,38 +8,49 @@
 source [file join $commondir geovis_settings.tcl]
 
-# this method is called when a user clicks on a icon in the map
-# the method is used at the bottom of this example
-# the callback is called with two arguments:
-# option - should be one of "annotation", "clear", "feature"
-proc handler {option {args ""}} {
+# This method is called when a user modifies the selection in the map view.
+# This callback is installed in the viewer using setSelectCallback in the code below.
+# The callback has two arguments:
+#   option - should be one of "annotation", "clear", "feature", "region"
+#   args - depends on option, see below
+proc selectHandler {option {args ""}} {
     switch $option {
         "annotation" {
-            # pass
+            # An annotation (not in a feature layer) was selected, the single argument
+            # is a list of the selected annotation names.
         }
         "clear" {
-            # previously selected features have been unselected.
-            # no arguments associated with this option.
+            # Previously selected features or annotations have been deselected.
+            # No arguments.
+            puts "select clear"
         }
         "feature" {
-            # a feature was selected, the server returns 4 values about the feature
-            # that are held in args:
-            # globalObjId - the global object identifier
-            # featureIdList - a single value or list of feature identifiers.
-            #                 if multiple features are returned, they arei
-            #                 enclosed in curly brackets.
-            # numFeaturesInLayer - the number of features in the layer
-            # layerName - the name of the layer the features were found in.
-            #             only features from a single layer can be selected
-            #             at a time.
-            foreach {globalObjId featureIdList numFeaturesInLayer layerName} $args break
-            puts "handler caught\
-                globalObjId=\"$globalObjId\"\
-                featureIdList=\"$featureIdList\"\
-                numFeaturesInLayer=\"$numFeaturesInLayer\"\
-                layerName=\"$layerName\""
+            # The feature selection set changed, the arguments are:
+            #   op - "add", "delete" or "set"
+            #   featureIdList - a list of feature identifiers.
+            #   layerName - the name of the layer the features were found in.
+            foreach {op featureIdList layerName} $args break
+            switch $op {
+                "add" {
+                    puts "select feature add:\nfeatureIDList=\"$featureIdList\"\nlayerName=\"$layerName\""
+                }
+                "delete" {
+                    puts "select feature delete:\nfeatureIDList=\"$featureIdList\"\nlayerName=\"$layerName\""
+                }
+                "set" {
+                    puts "select feature set:\nfeatureIDList=\"$featureIdList\"\nlayerName=\"$layerName\""
+                }
+                default {
+                    error "bad op \"$op\": should be one of: add, delete or set"
+                }
+            }
+        }
+        "region" {
+            # An area defined by two wgs84 corner points was selected.
+            # Here x is wgs84 decimal degrees longitude and y is wgs84 decimal degrees latitude.
+            foreach {xmin ymin xmax ymax} $args break
+            puts "select region: ($xmin, $ymin) - ($xmax, $ymax)"
         }
         default {
-            error "bad option \"$option\": should be one of annotation,\
-                clean, or feature"
+            error "bad option \"$option\": should be one of: annotation, clear, feature or region"
         }
     }
@@ -87,8 +99,8 @@
 "
 
-# create a map object
+# Create a map object
 set map [Rappture::Map #auto]
 
-# add all layers to the map object
+# Add all layers to the map object
 $map addLayer image \
     osm [array get osmParams] \
@@ -102,13 +114,13 @@
     $stylesheet
 
-# add a map to the vis client
+# Add a map to the vis client
 $mapviewer scale $map
 $mapviewer add $map
 
 
-# set the proc/method to be called when a feature is selected on the map.
-# in this case we give the full path to the previously defined
-# procedure named "handler". for an itcl class method, you may need to
-# use itcl::code to get the full path of the  callback method:
-# for example: [itcl::code $this handler]
-$mapviewer setSelectCallback ::handler
+# Set the proc/method to be called when a feature is selected on the map.
+# In this case we give the full path to the previously defined
+# procedure named "selectHandler". For an itcl class method, you may need to
+# use itcl::code to get the full path of the callback method, e.g.
+# [itcl::code $this selectHandler]
+$mapviewer setSelectCallback ::selectHandler
Index: /branches/multichoice/examples/mapviewer/tms/tms_example.tcl
===================================================================
--- /branches/multichoice/examples/mapviewer/tms/tms_example.tcl	(revision 6370)
+++ /branches/multichoice/examples/mapviewer/tms/tms_example.tcl	(revision 6371)
@@ -1,2 +1,3 @@
+package require Tk
 package require Rappture
 package require RapptureGUI
Index: /branches/multichoice/examples/mapviewer/wms/wms_example.tcl
===================================================================
--- /branches/multichoice/examples/mapviewer/wms/wms_example.tcl	(revision 6370)
+++ /branches/multichoice/examples/mapviewer/wms/wms_example.tcl	(revision 6371)
@@ -1,2 +1,3 @@
+package require Tk
 package require Rappture
 package require RapptureGUI
Index: /branches/multichoice/examples/mapviewer/xyz/xyz_example.tcl
===================================================================
--- /branches/multichoice/examples/mapviewer/xyz/xyz_example.tcl	(revision 6370)
+++ /branches/multichoice/examples/mapviewer/xyz/xyz_example.tcl	(revision 6371)
@@ -1,2 +1,3 @@
+package require Tk
 package require Rappture
 package require RapptureGUI
Index: /branches/multichoice/gui/apps/launcher.tcl
===================================================================
--- /branches/multichoice/gui/apps/launcher.tcl	(revision 6370)
+++ /branches/multichoice/gui/apps/launcher.tcl	(revision 6371)
@@ -42,4 +42,6 @@
 set params(execute) ""
 set params(input) ""
+
+set rapptureInfo(cwd) [pwd]
 
 if {[info exists env(TOOL_PARAMETERS)]} {
Index: /branches/multichoice/gui/scripts/Makefile.in
===================================================================
--- /branches/multichoice/gui/scripts/Makefile.in	(revision 6370)
+++ /branches/multichoice/gui/scripts/Makefile.in	(revision 6371)
@@ -78,4 +78,5 @@
 		$(srcdir)/mainwin.tcl \
 		$(srcdir)/map.tcl \
+		$(srcdir)/mapentry.tcl \
 		$(srcdir)/mapviewer.tcl \
 		$(srcdir)/mesh.tcl \
Index: /branches/multichoice/gui/scripts/controls.tcl
===================================================================
--- /branches/multichoice/gui/scripts/controls.tcl	(revision 6370)
+++ /branches/multichoice/gui/scripts/controls.tcl	(revision 6371)
@@ -178,4 +178,7 @@
         drawing {
             Rappture::DrawingEntry $w $_owner $path
+        }
+        map {
+            Rappture::MapEntry $w $_owner $path
         }
         image {
@@ -280,5 +283,5 @@
     $_owner widgetfor $path $w
 
-    if {[lsearch {control group drawing separator note} $type] < 0} {
+    if {[lsearch {control group drawing map separator note} $type] < 0} {
         # make a label for this control
         set label [$w label]
Index: /branches/multichoice/gui/scripts/flowvisviewer.tcl
===================================================================
--- /branches/multichoice/gui/scripts/flowvisviewer.tcl	(revision 6370)
+++ /branches/multichoice/gui/scripts/flowvisviewer.tcl	(revision 6371)
@@ -127,24 +127,24 @@
 
     private variable _arcball ""
-    private variable _dlist ""         ;# list of data objects
-    private variable _obj2ovride       ;# maps dataobj => style override
-    private variable _datasets         ;# contains all the dataobj-component
-                                       ;# to volumes in the server
-    private variable _dataset2style    ;# maps dataobj-component to transfunc
-    private variable _style2datasets   ;# maps tf back to list of
+    private variable _dlist "";         # list of data objects
+    private variable _obj2ovride;       # maps dataobj => style override
+    private variable _datasets;         # maps dataobj-component
+                                        # to volumes in the server
+    private variable _dataset2style;    # maps dataobj-component to transfunc
+    private variable _style2datasets;   # maps tf back to list of
                                         # dataobj-components using the tf.
-    private variable _dataset2flow     ;# Maps dataobj-component to a flow.
-
-    private variable _reset 1          ;# Connection to server has been reset.
-    private variable _click            ;# Info used for rotate operations.
-    private variable _limits           ;# Autoscale min/max for all axes
-    private variable _view             ;# View params for 3D view
-    private variable _isomarkers       ;# array of isosurface level values 0..1
+    private variable _dataset2flow;     # Maps dataobj-component to a flow.
+
+    private variable _reset 1;          # Connection to server has been reset.
+    private variable _click;            # Info used for rotate operations.
+    private variable _limits;           # Autoscale min/max for all axes
+    private variable _view;             # View params for 3D view
+    private variable _isomarkers;       # array of isosurface level values 0..1
     private variable _settings
-    private variable _activeTf ""      ;# Currently active transfer function
-    private variable _first ""         ;# This is the topmost volume.
-    private variable _volcomponents    ;# Maps component name to list of
-                                       ;# dataobj-component tags
-    private variable _componentsList   ;# List of components found
+    private variable _activeTf "";      # Currently active transfer function
+    private variable _first "";         # This is the topmost volume.
+    private variable _volcomponents;    # Maps component name to list of
+                                        # dataobj-component tags
+    private variable _componentsList;   # List of components found
     private variable _nextToken 0
     private variable _icon 0
@@ -156,5 +156,5 @@
     private variable _gotoPending 0
 
-    private common _downloadPopup      ;# download options from popup
+    private common _downloadPopup;      # download options from popup
     private common _hardcopy
 }
@@ -641,5 +641,5 @@
     set op [lindex $args 0]
     switch -- $op {
-        -objects {
+        "-objects" {
             # put the dataobj list in order according to -raise options
             set dlist $_dlist
@@ -656,5 +656,5 @@
             return $dlist
         }
-        -image {
+        "-image" {
             if {[llength $args] != 2} {
                 error "wrong # args: should be \"get -image view|legend\""
@@ -1095,5 +1095,7 @@
         DoResize
     }
-
+    if { $_reset } {
+        InitSettings -background -axesvisible -gridvisible
+    }
     set _first ""
     foreach dataobj [get -objects] {
@@ -1148,6 +1150,5 @@
 
     if { $_reset } {
-        InitSettings -axesvisible -gridvisible \
-            -opacity -light2side -isosurfaceshading \
+        InitSettings -opacity -light2side -isosurfaceshading \
             -ambient -diffuse -specularlevel -specularexponent
 
@@ -2815,5 +2816,5 @@
     radiobutton $inner.image_button -text "Image File" \
         -variable [itcl::scope _downloadPopup(format)] \
-        -font "Arial 9 " \
+        -font "Arial 9" \
         -value image
     Rappture::Tooltip::for $inner.image_button \
Index: /branches/multichoice/gui/scripts/gauge.tcl
===================================================================
--- /branches/multichoice/gui/scripts/gauge.tcl	(revision 6370)
+++ /branches/multichoice/gui/scripts/gauge.tcl	(revision 6371)
@@ -636,4 +636,7 @@
     $itk_component(spindn) configure -state $itk_option(-state)
     $itk_component(presets) configure -state $itk_option(-state)
+    if { [info exists itk_component(uq)] } {
+        $itk_component(uq) configure -state $itk_option(-state)
+    }
     _redraw  ;# fix gauge
 }
@@ -756,5 +759,5 @@
 
         $popup configure \
-        -deactivatecommand [itcl::code $this _pop_uq_deactivate]
+            -deactivatecommand [itcl::code $this _pop_uq_deactivate]
     }
     update
Index: /branches/multichoice/gui/scripts/map.tcl
===================================================================
--- /branches/multichoice/gui/scripts/map.tcl	(revision 6370)
+++ /branches/multichoice/gui/scripts/map.tcl	(revision 6371)
@@ -31,8 +31,21 @@
 
     public method addLayer { type name paramArray driver driverParamArray {stylesheet {}} {script {}} {selectors {}} }
+    public method addSelector { layerName selectorName paramArray }
     public method addViewpoint { name props }
     public method clearExtents {}
     public method deleteLayer { layerName }
+    public method deleteSelector { layerName selectorName }
     public method deleteViewpoint { viewpointName }
+    public method dirty { key args } {
+        if {[llength $args] == 0} {
+            if { [info exists _dirty($key)] } {
+                return $_dirty($key)
+            } else {
+                return 0
+            }
+        } else {
+            set _dirty($key) [lindex $args 0]
+        }
+    }
     public method getPlacardConfig { layerName }
     public method hasLayer { layerName }
@@ -50,9 +63,13 @@
     public method setAttribution { attribution }
     public method setCamera { camera }
+    public method setColormap { layerName colormap }
+    public method setDescription { description }
     public method setExtents { xmin ymin xmax ymax {srs "wgs84"} }
     public method setLabel { label }
     public method setPlacardConfig { layerName attrlist style padding }
     public method setProjection { projection }
+    public method setScript { layerName script }
     public method setStyle { style }
+    public method setStylesheet { layerName stylesheet }
     public method setToolInfo { id name command title revision }
     public method setType { type }
@@ -69,4 +86,8 @@
     private variable _tree "";         # Tree of information about the map.
     private variable _isValid 0;
+    private variable _dirty;
+    array set _dirty {
+        viewpoints 0
+    }
     private common _nextSelector 0;
     private common _layerTypes
@@ -147,4 +168,5 @@
     # Set global map properties
     setLabel [$map get "about.label"]
+    setDescription [$map get "about.description"]
     setAttribution [$map get "about.attribution"]
 
@@ -506,4 +528,8 @@
 }
 
+itcl::body Rappture::Map::setDescription { description } {
+    $_tree set root "description" $description
+}
+
 itcl::body Rappture::Map::setAttribution { attribution } {
     $_tree set root "attribution" $attribution
@@ -623,9 +649,9 @@
             array set selector $selectorItem
             if { [info exists selector(id)] } {
-                set id $selector(id)
+                set selectorId $selector(id)
             } else {
-                set id "selector[incr _nextSelector]"
-            }
-            set snode [$_tree insert $sparent -label $id]
+                set selectorId "selector[incr _nextSelector]"
+            }
+            set snode [$_tree insert $sparent -label $selectorId]
             foreach key { name style styleExpression query queryBounds queryOrderBy } {
                 if {[info exists selector($key)]} {
@@ -759,4 +785,5 @@
         }
     }
+    set _dirty($id) 1
     return $id
 }
@@ -798,4 +825,5 @@
     }
     $_tree delete $id
+    array unset _dirty $layerName
 }
 
@@ -862,4 +890,31 @@
 }
 
+itcl::body Rappture::Map::setScript { layerName script } {
+    set id [$_tree findchild root->"layers" $layerName]
+    if { $id < 0 } {
+        error "unknown layer \"$layerName\""
+    }
+    $_tree set $id "script" $script
+    set _dirty($layerName) 1
+}
+
+itcl::body Rappture::Map::setStylesheet { layerName stylesheet } {
+    set id [$_tree findchild root->"layers" $layerName]
+    if { $id < 0 } {
+        error "unknown layer \"$layerName\""
+    }
+    $_tree set $id "stylesheet" $stylesheet
+    set _dirty($layerName) 1
+}
+
+itcl::body Rappture::Map::setColormap { layerName colormap } {
+    set id [$_tree findchild root->"layers" $layerName]
+    if { $id < 0 } {
+        error "unknown layer \"$layerName\""
+    }
+    $_tree set $id "colorramp.colormap" $colormap
+    set _dirty($layerName) 1
+}
+
 # ----------------------------------------------------------------------
 # USAGE: selectors
@@ -898,4 +953,37 @@
         return 1
     }
+}
+
+itcl::body Rappture::Map::addSelector { layerName name params } {
+    set nodeid $name
+    set layerid [$_tree findchild root->"layers" $layerName]
+    if { $layerid < 0 } {
+        error "unknown layer \"$layerName\""
+    }
+    if {[hasSelector $layerName $nodeid]} {
+        error "Selector '$nodeid' already exists"
+    }
+    set parent [$_tree findchild root->"layers"->"$layerName" "selectors"]
+    if { $parent == "" } {
+        set parent [$_tree insert $layerid -label "selectors"]
+    }
+    set child [$_tree insert $parent -label $nodeid]
+    array set info $params
+    foreach key { name style styleExpression query queryBounds queryOrderBy } {
+        if { [info exists info($key)] &&
+             $info($key) != ""} {
+            $_tree set $child $key $info($key)
+        }
+    }
+    set _dirty($layerName) 1
+}
+
+itcl::body Rappture::Map::deleteSelector { layerName selectorName } {
+    set id [$_tree findchild root->"layers"->"$layerName"->"selectors" $selectorName]
+    if { $id < 0 } {
+        error "unknown selector \"$selectorName\""
+    }
+    $_tree delete $id
+    set _dirty($layerName) 1
 }
 
@@ -965,4 +1053,5 @@
         $_tree set $child z $info(altitude)
     }
+    set _dirty(viewpoints) 1
 }
 
@@ -973,4 +1062,5 @@
     }
     $_tree delete $id
+    set _dirty(viewpoints) 1
 }
 
Index: /branches/multichoice/gui/scripts/mapentry.tcl
===================================================================
--- /branches/multichoice/gui/scripts/mapentry.tcl	(revision 6371)
+++ /branches/multichoice/gui/scripts/mapentry.tcl	(revision 6371)
@@ -0,0 +1,136 @@
+# -*- mode: tcl; indent-tabs-mode: nil -*-
+# ----------------------------------------------------------------------
+#  COMPONENT: MapEntry - widget for viewing map as input control
+#
+# ======================================================================
+#  AUTHOR:  Leif Delgass, Purdue University
+#  Copyright (c) 2016  HUBzero Foundation, LLC
+#
+#  See the file "license.terms" for information on usage and
+#  redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+# ======================================================================
+package require Itk
+
+itcl::class Rappture::MapEntry {
+    inherit itk::Widget
+
+    itk_option define -state state State "normal"
+
+    constructor {owner path args} {
+        # defined below
+    }
+    public method label {}
+    public method tooltip {}
+    public method value {args}
+
+    private variable _owner ""      ;# thing managing this control
+    private variable _path ""       ;# path in XML to this input
+    private variable _xmlobj ""
+    private variable _mapviewer ""  ;# MapViewer widget
+}
+
+itk::usual MapEntry {
+}
+
+# ----------------------------------------------------------------------
+# CONSTRUCTOR
+# ----------------------------------------------------------------------
+itcl::body Rappture::MapEntry::constructor {owner path args} {
+    if {[catch {$owner isa Rappture::ControlOwner} valid] != 0 || !$valid} {
+        error "bad object \"$owner\": should be Rappture::ControlOwner"
+    }
+    set _owner $owner
+    set _path $path
+    set _xmlobj [$_owner xml object]
+
+    itk_component add map {
+        Rappture::MapViewer $itk_interior.map
+    }
+    pack $itk_component(map) -expand yes -fill both
+    set _mapviewer $itk_component(map)
+
+    eval itk_initialize $args
+
+    value $_xmlobj
+}
+
+# ----------------------------------------------------------------------
+# USAGE: value ?-check? ?<newval>?
+#
+# Clients use this to query/set the value for this widget.  With
+# no args, it returns the current value for the widget.  If the
+# <newval> is specified, it sets the value of the widget and
+# sends a <<Value>> event.  If the -check flag is included, the
+# new value is not actually applied, but just checked for correctness.
+# ----------------------------------------------------------------------
+itcl::body Rappture::MapEntry::value {args} {
+    set onlycheck 0
+    set i [lsearch -exact $args -check]
+    if {$i >= 0} {
+        set onlycheck 1
+        set args [lreplace $args $i $i]
+    }
+
+    if {[llength $args] == 1} {
+        set newval [lindex $args 0]
+
+        if {!$onlycheck && $_xmlobj != "" && $_xmlobj != $newval} {
+            # delete any existing object
+            itcl::delete object $_xmlobj
+            set _xmlobj ""
+        }
+        if {$newval != ""} {
+            if {![Rappture::library isvalid $newval]} {
+                error "bad value \"$newval\": should be Rappture::Library"
+            }
+            if {$onlycheck} {
+                return
+            }
+            set _xmlobj $newval
+        }
+        set dataobjs [$_mapviewer get]
+        $_mapviewer configure -map [Rappture::Map ::#auto $_xmlobj $_path]
+        foreach dataobj $dataobjs {
+            itcl::delete object $dataobj
+        }
+        event generate $itk_component(hull) <<Value>>
+    } elseif {[llength $args] != 0} {
+        error "wrong # args: should be \"value ?-check? ?newval?\""
+    }
+    return ""
+}
+
+# ----------------------------------------------------------------------
+# USAGE: label
+#
+# Clients use this to query the label associated with this widget.
+# Reaches into the XML and pulls out the appropriate label string.
+# ----------------------------------------------------------------------
+itcl::body Rappture::MapEntry::label {} {
+    set label [string trim [$_owner xml get $_path.about.label]]
+    return $label
+}
+
+# ----------------------------------------------------------------------
+# USAGE: tooltip
+#
+# Clients use this to query the tooltip associated with this widget.
+# Reaches into the XML and pulls out the appropriate description
+# string.  Returns the string that should be used with the
+# Rappture::Tooltip facility.
+# ----------------------------------------------------------------------
+itcl::body Rappture::MapEntry::tooltip {} {
+    set str [string trim [$_owner xml get $_path.about.description]]
+    return $str
+}
+
+# ----------------------------------------------------------------------
+# CONFIGURATION OPTION: -state
+# ----------------------------------------------------------------------
+itcl::configbody Rappture::MapEntry::state {
+    set valid {normal disabled}
+    if {[lsearch -exact $valid $itk_option(-state)] < 0} {
+        error "bad value \"$itk_option(-state)\": should be [join $valid {, }]"
+    }
+    #$_mapviewer configure -state $itk_option(-state)
+}
Index: /branches/multichoice/gui/scripts/mapviewer.tcl
===================================================================
--- /branches/multichoice/gui/scripts/mapviewer.tcl	(revision 6370)
+++ /branches/multichoice/gui/scripts/mapviewer.tcl	(revision 6371)
@@ -36,4 +36,5 @@
     inherit Rappture::VisViewer
 
+    itk_option define -map map Map ""
     itk_option define -plotforeground plotForeground Foreground ""
     itk_option define -plotbackground plotBackground Background ""
@@ -52,10 +53,19 @@
     public method add {dataobj {settings ""}}
     public method camera {option args}
-    public method delete {args}
+    public method clear {args}
+    public method delete {args} { eval hide $args }
     public method disconnect {}
     public method download {option args}
     public method get {args}
+    public method hide {args}
     public method isconnected {}
     public method parameters {title args} { # do nothing }
+    public method placard {option args}
+    public method refresh {} {
+        Rebuild
+        # Temporary hack to fix one frame delay in update
+        SendCmd "imgflush"
+        SendCmd "renderer render"
+    }
     public method scale {args}
     public method select {option {args ""}}
@@ -103,5 +113,5 @@
     private method GetImage { args }
     private method GetNormalizedMouse { x y }
-    private method GoToViewpoint { dataobj viewpoint }
+    private method GoToViewpoint { dataobj viewpoint {duration 2.0} }
     private method InitSettings { args  }
     private method MapIsGeocentric {}
@@ -689,16 +699,15 @@
 
 # ----------------------------------------------------------------------
-# USAGE: delete ?<dataobj1> <dataobj2> ...?
-#
-# Clients use this to delete a dataobj from the plot.  If no dataobjs
-# are specified, then all dataobjs are deleted.  No data objects are
-# deleted.  They are only removed from the display list.
-# ----------------------------------------------------------------------
-itcl::body Rappture::MapViewer::delete {args} {
+# USAGE: hide ?<dataobj1> <dataobj2> ...?
+#
+# Clients use this to hide a dataobj from the plot.  If no dataobjs are
+# specified, then all dataobjs are hidden.
+# ----------------------------------------------------------------------
+itcl::body Rappture::MapViewer::hide {args} {
     DebugTrace "Enter"
     if { [llength $args] == 0} {
         set args $_dlist
     }
-    # Delete all specified dataobjs
+    # Mark all specified dataobjs as hidden
     set changed 0
     foreach dataobj $args {
@@ -715,4 +724,62 @@
         }
         array unset _obj2ovride $dataobj-*
+        set changed 1
+    }
+    # If anything changed, then rebuild the plot
+    if { $changed } {
+        $_dispatcher event -idle !rebuild
+    }
+}
+
+# ----------------------------------------------------------------------
+# USAGE: clear ?<dataobj1> <dataobj2> ...?
+#
+# Clients use this to permanently clear a dataobj from the plot and the
+# render server.  If no dataobjs are specified, then all dataobjs are 
+# cleared.
+# ----------------------------------------------------------------------
+itcl::body Rappture::MapViewer::clear {args} {
+    DebugTrace "Enter"
+    if { [llength $args] == 0} {
+        set args [concat $_dlist $_hidden]
+    }
+    # Delete all specified dataobjs
+    set changed 0
+    foreach dataobj $args {
+        set found 0
+        set dpos [lsearch -exact $_dlist $dataobj]
+        if { $dpos >= 0 } {
+            set found 1
+        }
+        set hpos [lsearch -exact $_hidden $dataobj]
+        if { $hpos >= 0 } {
+            set found 1
+        }
+        if { !$found } {
+            continue
+        }
+        foreach tag [array names _layers -glob $dataobj-*] {
+            SendCmd "map layer delete $tag"
+        }
+        if { [info commands $dataobj] == $dataobj } {
+            # Remove the layers from the client and server.
+            foreach layer [$dataobj layers] {
+                if { ![$dataobj layer $layer shared] } {
+                    # Remove shared layer if no other objects have it?
+                }
+            }
+        }
+        if { $dpos >= 0 } {
+            # Remove it from the dataobj list.
+            set _dlist [lreplace $_dlist $dpos $dpos]
+        }
+        if { $hpos >= 0 } {
+            # Remove it from the hidden list.
+            set _hidden [lreplace $_hidden $hpos $hpos]
+        }
+        array unset _obj2ovride $dataobj-*
+        array unset _layers $dataobj-*
+        array unset _opacity $dataobj-*
+        array unset _visibility $dataobj-*
         set changed 1
     }
@@ -797,5 +864,5 @@
             return $dlist
         }
-        -image {
+        "-image" {
             if {[llength $args] < 2} {
                 error "wrong # args: should be \"get -image view|legend\""
@@ -989,4 +1056,32 @@
 
 # ----------------------------------------------------------------------
+# USAGE: placard enable <state> <layerName>
+# 
+# Clients use this method to enable/disable display of a feature placard
+# when a feature is clicked/selected.
+# ----------------------------------------------------------------------
+itcl::body Rappture::MapViewer::placard {option args} {
+    switch $option {
+        enable {
+            if {[llength $args] != 2} {
+                error "wrong $ args: should be \"enable <boolean> <layerName>\""
+            }
+            set state [lindex $args 0]
+            set layerName [lindex $args 1]
+            if {![info exists _layers($layerName)]} {
+                error "Unknown layer \"$layerName\""
+            }
+            if {![string is boolean $state]} {
+                error "argument to placard enable must be boolean"
+            }
+            SendCmd "placard enable $state $layerName"
+        }
+        default {
+            error "bad option \"$option\": should be enable"
+        }
+    }
+}
+
+# ----------------------------------------------------------------------
 # USAGE: download coming
 # USAGE: download controls <downloadCommand>
@@ -1378,5 +1473,11 @@
                 set _layers($tag) 1
                 SetLayerStyle $dataobj $layer
-            }
+            } elseif { [$dataobj dirty $layer] } {
+                # Recreate layer
+                # FIXME: retain layer order
+                SendCmd "map layer delete $tag"
+                SetLayerStyle $dataobj $layer
+            }
+            $dataobj dirty $layer 0
             # Don't change visibility of shared/base layers
             if { !$info(shared) } {
@@ -1761,4 +1862,6 @@
                 $_click(y) == $y} {
                 SendCmd "map box clear"
+            } else {
+                SendCmd "map box end $x $y"
             }
         }
@@ -2280,4 +2383,22 @@
             Camera reset
         }
+        "viewpoint" {
+            if {[llength $args] < 1} {
+                error "wrong # args to camera viewpoint"
+            }
+            set vpopt [lindex $args 0]
+            switch -- $vpopt {
+                "go" {
+                    if {[llength $args] < 3} {
+                        error "wrong # of args to camera viewpoint go"
+                    }
+                    foreach {dataobj viewpoint} [lrange $args 1 end] break
+                    GoToViewpoint $dataobj $viewpoint
+                }
+                default {
+                    error "Unknown camera viewpoint option \"$vpopt\""
+                }
+            }
+        }
         "zoom" {
             if {[llength $args] < 1} {
@@ -2415,5 +2536,5 @@
 }
 
-itcl::body Rappture::MapViewer::GoToViewpoint { dataobj viewpoint } {
+itcl::body Rappture::MapViewer::GoToViewpoint { dataobj viewpoint {duration 2.0}} {
     array set view [subst {
         x 0
@@ -2436,5 +2557,4 @@
         set _view(pitch) -90
     }
-    set duration 2.0
     SendCmd [list camera set $_view(x) $_view(y) $_view(z) $_view(heading) $_view(pitch) $_view(distance) $duration $_view(srs) $_view(verticalDatum)]
 }
@@ -2694,20 +2814,52 @@
                 }
             }
-            set format ""
-            set wfsType ""
             SendStylesheetFiles $info(stylesheet)
-            if { [info exists info(ogr.connection)] } {
-                set cmd [list map layer add $tag feature db $format $info(ogr.layer) $info(ogr.connection) $info(cache) $info(stylesheet) $script $selectors]
-                if {[info exists style(-minrange)] && [info exists style(-maxrange)]} {
-                    lappend cmd $style(-minrange) $style(-maxrange)
-                }
-            } else {
-                set cmd [list map layer add $tag feature $info(driver) $format $wfsType $info(ogr.url) $info(cache) $info(stylesheet) $script $selectors]
-                if {[info exists style(-minrange)] && [info exists style(-maxrange)]} {
-                    lappend cmd $style(-minrange) $style(-maxrange)
-                }
-                SendFiles $info(ogr.url)
+            set ssSize [string length $info(stylesheet)]
+            set scriptSize [string length $script]
+            set selectorsSize [string length $selectors]
+            switch -- $info(driver) {
+                "ogr" {
+                    if { [info exists info(ogr.connection)] } {
+                        set cmd [list map layer add $tag feature db {} $info(ogr.layer) $info(ogr.connection) $info(cache) $ssSize $scriptSize $selectorsSize]
+                        if {[info exists style(-minrange)] && [info exists style(-maxrange)]} {
+                            lappend cmd $style(-minrange) $style(-maxrange)
+                        }
+                    } else {
+                        set cmd [list map layer add $tag feature $info(driver) {} {} $info(ogr.url) $info(cache) $ssSize $scriptSize $selectorsSize]
+                        if {[info exists style(-minrange)] && [info exists style(-maxrange)]} {
+                            lappend cmd $style(-minrange) $style(-maxrange)
+                        }
+                        SendFiles $info(ogr.url)
+                    }
+                }
+                "tfs" {
+                    set format "json"
+                    if {[info exists info(tfs.format)]} {
+                        set format $info(tfs.format)
+                    }
+                    set cmd [list map layer add $tag feature $info(driver) $format {} $info(tfs.url) $info(cache) $ssSize $scriptSize $selectorsSize]
+                    if {[info exists style(-minrange)] && [info exists style(-maxrange)]} {
+                        lappend cmd $style(-minrange) $style(-maxrange)
+                    }
+                }
+                "wfs" {
+                    set format "json"
+                    if {[info exists info(wfs.format)]} {
+                        set format $info(wfs.format)
+                    }
+                    set wfsType ""
+                    if {[info exists info(wfs.typename)]} {
+                        set wfsType $info(wfs.typename)
+                    }
+                    set cmd [list map layer add $tag feature $info(driver) $format $wfsType $info(wfs.url) $info(cache) $ssSize $scriptSize $selectorsSize]
+                    if {[info exists style(-minrange)] && [info exists style(-maxrange)]} {
+                        lappend cmd $style(-minrange) $style(-maxrange)
+                    }
+                }
             }
             SendCmd $cmd
+            if { $ssSize > 0 }        { SendData $info(stylesheet) }
+            if { $scriptSize > 0 }    { SendData $script }
+            if { $selectorsSize > 0 } { SendData $selectors }
             SendCmd "map layer opacity $style(-opacity) $tag"
         }
@@ -3142,2 +3294,22 @@
     }
 }
+
+# ----------------------------------------------------------------------
+# OPTION: -map
+# ----------------------------------------------------------------------
+itcl::configbody Rappture::MapViewer::map {
+    if {$itk_option(-map) != "" } {
+        if {[catch {$itk_option(-map) isa Rappture::Map} valid] != 0 || !$valid} {
+            error "bad value \"$itk_option(-map)\": should be Rappture::Map object"
+        }
+        $this clear
+        $this add $itk_option(-map)
+        $this scale $itk_option(-map)
+    } else {
+        $this clear
+    }
+
+    if { [isconnected] } {
+        $_dispatcher event -idle !rebuild
+    }
+}
Index: /branches/multichoice/gui/scripts/mesh.tcl
===================================================================
--- /branches/multichoice/gui/scripts/mesh.tcl	(revision 6370)
+++ /branches/multichoice/gui/scripts/mesh.tcl	(revision 6371)
@@ -211,4 +211,5 @@
         set result [ReadUnstructuredGrid $path]
     } elseif {[$_mesh element "node"] != "" && [$_mesh element "element"] != ""} {
+        puts stderr "WARNING: <node>/<element> mesh is deprecated.  Please use an unstructured mesh instead."
         set result [ReadNodesElements $path]
     }
@@ -1438,5 +1439,5 @@
     array set node2celltype {
         3 5
-        4 10
+        4 9
         8 12
         6 13
@@ -1452,13 +1453,25 @@
         set numNodes [llength $nodeList]
         if { ![info exists node2celltype($numNodes)] } {
-            puts stderr "WARNING: bad nodes/elements mesh \$path\": unknown number of indices \"$_numNodes\": should be 3, 4, 5, 6, or 8"
+            puts stderr "WARNING: bad node/element mesh \$path\": unknown number of nodes \"$numNodes\": should be 3, 4, 5, 6, or 8"
             return 0
         }
         set celltype $node2celltype($numNodes)
+        if { $_dim == 3 && $numNodes == 4 } {
+            # If mesh is 3D, assume a tetrahedron (default is quad)
+            # XXX: Does prophet output tets, and if so what is the node order?
+            set celltype 10
+        }
         append celltypes "$celltype\n"
-        if { $celltype == 12 } {
-            # Formerly used voxels instead of hexahedrons. We're converting
-            # it here to be backward compatible and still fault-tolerant of
-            # non-axis aligned cells.
+        if { $celltype == 9 } {
+            # Fix the node order for quad cells
+            # (this converts from PROPHET convention to VTK convention)
+            set newList {}
+            foreach i { 0 1 3 2 } {
+                lappend newList [lindex $nodeList $i]
+            }
+            set nodeList $newList
+        } elseif { $celltype == 12 } {
+            # Fix the node order for hexahedron cells
+            # (this converts from PROPHET convention to VTK convention)
             set newList {}
             foreach i { 0 1 3 2 4 5 7 6 } {
Index: /branches/multichoice/gui/scripts/nanovisviewer.tcl
===================================================================
--- /branches/multichoice/gui/scripts/nanovisviewer.tcl	(revision 6370)
+++ /branches/multichoice/gui/scripts/nanovisviewer.tcl	(revision 6371)
@@ -119,21 +119,21 @@
 
     private variable _arcball ""
-    private variable _dlist ""         ;# list of data objects
-    private variable _obj2ovride       ;# maps dataobj => style override
-    private variable _datasets         ;# contains all the dataobj-component
-                                       ;# to volumes in the server
-
-    private variable _reset 1          ;# Connection to server has been reset.
-    private variable _click            ;# Info used for rotate operations.
-    private variable _limits           ;# Autoscale min/max for all axes
-    private variable _view             ;# View params for 3D view
+    private variable _dlist "";         # list of data objects
+    private variable _obj2ovride;       # maps dataobj => style override
+    private variable _datasets;         # maps dataobj-component
+                                        # to volumes in the server
+
+    private variable _reset 1;          # Connection to server has been reset.
+    private variable _click;            # Info used for rotate operations.
+    private variable _limits;           # Autoscale min/max for all axes
+    private variable _view;             # View params for 3D view
     private variable _parsedFunction
     private variable _transferFunctionEditors
     private variable _settings
-    private variable _first ""         ;# This is the topmost volume.
-    private variable _current ""       ;# Currently selected component
-    private variable _volcomponents    ;# Maps component name to list of
-                                       ;# dataobj-component tags
-    private variable _componentsList   ;# List of components found
+    private variable _first "";         # This is the topmost volume.
+    private variable _current "";       # Currently selected component
+    private variable _volcomponents;    # Maps component name to list of
+                                        # dataobj-component tags
+    private variable _componentsList;   # List of components found
     private variable _cname2transferFunction
     private variable _cname2defaultcolormap
@@ -143,5 +143,5 @@
     private variable _resizeLegendPending 0
 
-    private common _downloadPopup      ;# download options from popup
+    private common _downloadPopup;      # download options from popup
     private common _hardcopy
 }
@@ -462,5 +462,5 @@
     set op [lindex $args 0]
     switch -- $op {
-        -objects {
+        "-objects" {
             # put the dataobj list in order according to -raise options
             set dlist $_dlist
@@ -477,5 +477,5 @@
             return $dlist
         }
-        -image {
+        "-image" {
             if {[llength $args] != 2} {
                 error "wrong # args: should be \"get -image view|legend\""
@@ -871,5 +871,7 @@
         DoResize
     }
-
+    if { $_reset } {
+        InitSettings -background -axesvisible -gridvisible
+    }
     set _first ""
     SendCmd "volume state 0"
@@ -926,6 +928,5 @@
 
     if { $_reset } {
-        InitSettings -axesvisible -gridvisible \
-            -opacity -light2side -isosurfaceshading \
+        InitSettings -opacity -light2side -isosurfaceshading \
             -ambient -diffuse -specularlevel -specularexponent \
             -current
@@ -1549,5 +1550,5 @@
         } else {
             # $n : absolute value, compute relative
-            lappend list  [expr {(double($value)-$min)/($max-$min)]}
+            lappend list [expr {(double($value)-$min)/($max-$min)}]
         }
     }
@@ -2029,5 +2030,5 @@
     radiobutton $inner.image_button -text "Image File" \
         -variable [itcl::scope _downloadPopup(format)] \
-        -font "Arial 9 " \
+        -font "Arial 9" \
         -value image
     Rappture::Tooltip::for $inner.image_button \
Index: /branches/multichoice/gui/scripts/probdisteditor.tcl
===================================================================
--- /branches/multichoice/gui/scripts/probdisteditor.tcl	(revision 6370)
+++ /branches/multichoice/gui/scripts/probdisteditor.tcl	(revision 6371)
@@ -19,10 +19,12 @@
 option add *ProbDistEditor*Entry.width 10 widgetDefault
 
-    itcl::class Rappture::ProbDistEditor {
+itcl::class Rappture::ProbDistEditor {
     inherit itk::Widget
 
     itk_option define -fillcolor fillColor FillColor ""
 
-    constructor {args} { # defined below }
+    constructor {args} {
+        # defined below
+    }
     public method value {{newval ""}}
     public method mode {{newval ""}}
@@ -33,11 +35,11 @@
     protected method _apply {op {widget ""}}
 
-    protected variable _dispatcher ""   ;# dispatcher for !events
-    protected variable _mode ""         ;# type of distribution function
-    protected variable _value           ;# data values for mode-detail
-    protected variable _uvalue          ;# data values for mode-detail with units
-    protected variable _umin             ;# minimum allowed value for tool with units
-    protected variable _umax             ;# maximum allowed value for tool with units
-    protected variable _units           ;# units for min and max
+    protected variable _dispatcher "";  # dispatcher for !events
+    protected variable _mode "";        # type of distribution function
+    protected variable _value;          # data values for mode-detail
+    protected variable _uvalue;         # data values for mode-detail with units
+    protected variable _umin;           # minimum allowed value for tool with units
+    protected variable _umax;           # maximum allowed value for tool with units
+    protected variable _units;          # units for min and max
 }
 
Index: /branches/multichoice/gui/scripts/responseviewer.tcl
===================================================================
--- /branches/multichoice/gui/scripts/responseviewer.tcl	(revision 6370)
+++ /branches/multichoice/gui/scripts/responseviewer.tcl	(revision 6371)
@@ -147,14 +147,14 @@
 
 itcl::body Rappture::ResponseViewer::_plot_response {var1 var2} {
-    #puts "plotting $var1 vs $var2"
-
-    set fname response_result.xml
-
-    set rs $_response
-    if {[catch {exec puq get_response $fname $rs $var1 $var2 $_label} res]} {
+    #puts stderr "plotting $var1 vs $var2"
+    global rapptureInfo 
+    set fname [file join $rapptureInfo(cwd) "response_result.xml"]
+    if { [catch {
+        exec puq.sh get_response $fname $_response $var1 $var2 $_label
+    } res] != 0 } {
         set fp [open "response.err" r]
         set rdata [read $fp]
         close $fp
-        puts "Surrogate Model failed: $res\n$rdata"
+        puts stderr "Surrogate Model failed: $res\n$rdata"
         error "Sampling of Surrogate Model failed: $res\n$rdata"
         # FIXME: Maybe put in text box instead of error()?
@@ -163,5 +163,5 @@
 
     set xmlobj [Rappture::library $fname]
-    #puts "xmlobj=$xmlobj"
+    #puts stderr "xmlobj=$xmlobj"
     set w $itk_component(frame).field
 
Index: /branches/multichoice/gui/scripts/transferfunctioneditor.tcl
===================================================================
--- /branches/multichoice/gui/scripts/transferfunctioneditor.tcl	(revision 6370)
+++ /branches/multichoice/gui/scripts/transferfunctioneditor.tcl	(revision 6371)
@@ -42,6 +42,6 @@
     private method GetScreenPosition { name }
     private method LeaveTick { name }
-    private method SetRelativeValue  { name x }
-    private method GetRelativeValue  { name }
+    private method SetRelativeValue { name x }
+    private method GetRelativeValue { name }
     private method RemoveDuplicateMarkers {name x y}
     private method SetScreenPosition { name }
@@ -225,9 +225,14 @@
 }
 
-itcl::body Rappture::TransferFunctionEditor::GetRelativeValue  { name } {
+itcl::body Rappture::TransferFunctionEditor::GetRelativeValue { name } {
     return $_values($name)
 }
 
-itcl::body Rappture::TransferFunctionEditor::SetRelativeValue  { name value } {
+itcl::body Rappture::TransferFunctionEditor::SetRelativeValue { name value } {
+    if {$value < 0.0} {
+        set value 0.0
+    } elseif {$value > 1.0} {
+        set value 1.0
+    }
     set _values($name) $value
     set x [GetScreenPosition $name]
Index: /branches/multichoice/gui/scripts/visviewer.tcl
===================================================================
--- /branches/multichoice/gui/scripts/visviewer.tcl	(revision 6370)
+++ /branches/multichoice/gui/scripts/visviewer.tcl	(revision 6371)
@@ -20,46 +20,4 @@
     itk_option define -receivecommand receiveCommand ReceiveCommand ""
 
-    private common _servers         ;# array of visualization server lists
-    set _servers(geovis)  "localhost:2015"
-    set _servers(nanovis) "localhost:2000"
-    set _servers(pymol)   "localhost:2020"
-    set _servers(vmdmds)  "localhost:2018"
-    set _servers(vtkvis)  "localhost:2010"
-
-    private common _done            ;   # Used to indicate status of send.
-    private variable _buffer        ;   # buffer for incoming/outgoing commands
-    private variable _outbuf       ;    # buffer for outgoing commands
-    private variable _blockOnWrite 0;   # Should writes to socket block?
-    private variable _initialized
-    private variable _isOpen 0
-    private variable _afterId -1
-    private variable _icon 0
-    private variable _trace 0        ;    # Protocol tracing for console
-    private variable _logging 0      ;    # Command logging to file
-    # Number of milliseconds to wait before idle timeout.  If greater than 0,
-    # automatically disconnect from the visualization server when idle timeout
-    # is reached.
-    private variable _idleTimeout 43200000; # 12 hours
-    #private variable _idleTimeout 5000;    # 5 seconds
-    #private variable _idleTimeout 0;       # No timeout
-
-    protected variable _debug 0
-    protected variable _serverType "???";# Type of server.
-    protected variable _sid ""      ;   # socket connection to server
-    protected variable _maxConnects 100
-    protected variable _buffering 0
-    protected variable _cmdSeq 0     ;    # Command sequence number
-    protected variable _dispatcher "";  # dispatcher for !events
-    protected variable _hosts ""    ;   # list of hosts for server
-    protected variable _parser ""   ;   # interpreter for incoming commands
-    protected variable _image
-    protected variable _hostname
-    protected variable _numConnectTries 0
-    protected variable _debugConsole 0
-    protected variable _reportClientInfo 1
-    # Number of milliscends to wait for server reply before displaying wait
-    # dialog.  If set to 0, dialog is never displayed.
-    protected variable _waitTimeout 0
-
     constructor { args } {
         # defined below
@@ -68,16 +26,33 @@
         # defined below
     }
-    # Used internally only.
-    private method BuildConsole {}
-    private method DebugConsole {}
-    private method HideConsole {}
-    private method ReceiveHelper {}
-    private method SendDebugCommand {}
-    private method SendHelper {}
-    private method ServerDown {}
-    private method Shuffle { servers }
-    private method TraceComm { channel {data {}} }
-    private method WaitDialog { state }
-    private method Waiting { option widget }
+    public proc GetServerList { type } {
+        return $_servers($type)
+    }
+    public proc SetServerList { type namelist } {
+        # Convert the comma separated list into a Tcl list.  OGRE also adds
+        # a trailing comma that we want to ignore.
+        regsub -all "," $namelist " " namelist
+        CheckNameList $namelist
+        set _servers($type) $namelist
+    }
+    public proc RemoveServerFromList { type server } {
+        if { ![info exists _servers($type)] } {
+            error "unknown server type \"$type\""
+        }
+        set i [lsearch $_servers($type) $server]
+        if { $i < 0 } {
+            return
+        }
+        set _servers($type) [lreplace $_servers($type) $i $i]
+    }
+    public proc SetPymolServerList { namelist } {
+        SetServerList "pymol" $namelist
+    }
+    public proc SetNanovisServerList { namelist } {
+        SetServerList "nanovis" $namelist
+    }
+    public proc SetVtkServerList { namelist } {
+        SetServerList "vtk" $namelist
+    }
 
     protected method CheckConnection {}
@@ -117,4 +92,34 @@
     protected method ToggleConsole {}
 
+    protected variable _debug 0
+    protected variable _serverType "???";# Type of server.
+    protected variable _sid "";         # socket connection to server
+    protected variable _maxConnects 100
+    protected variable _buffering 0
+    protected variable _cmdSeq 0;       # Command sequence number
+    protected variable _dispatcher "";  # dispatcher for !events
+    protected variable _hosts "";       # list of hosts for server
+    protected variable _parser "";      # interpreter for incoming commands
+    protected variable _image
+    protected variable _hostname
+    protected variable _numConnectTries 0
+    protected variable _debugConsole 0
+    protected variable _reportClientInfo 1
+    # Number of milliscends to wait for server reply before displaying wait
+    # dialog.  If set to 0, dialog is never displayed.
+    protected variable _waitTimeout 0
+
+    private method BuildConsole {}
+    private method DebugConsole {}
+    private method HideConsole {}
+    private method ReceiveHelper {}
+    private method SendDebugCommand {}
+    private method SendHelper {}
+    private method ServerDown {}
+    private method Shuffle { servers }
+    private method TraceComm { channel {data {}} }
+    private method WaitDialog { state }
+    private method Waiting { option widget }
+
     private proc CheckNameList { namelist }  {
         foreach host $namelist {
@@ -125,33 +130,28 @@
         }
     }
-    public proc GetServerList { type } {
-        return $_servers($type)
-    }
-    public proc SetServerList { type namelist } {
-        # Convert the comma separated list into a Tcl list.  OGRE also adds
-        # a trailing comma that we want to ignore.
-        regsub -all "," $namelist " " namelist
-        CheckNameList $namelist
-        set _servers($type) $namelist
-    }
-    public proc RemoveServerFromList { type server } {
-        if { ![info exists _servers($type)] } {
-            error "unknown server type \"$type\""
-        }
-        set i [lsearch $_servers($type) $server]
-        if { $i < 0 } {
-            return
-        }
-        set _servers($type) [lreplace $_servers($type) $i $i]
-    }
-    public proc SetPymolServerList { namelist } {
-        SetServerList "pymol" $namelist
-    }
-    public proc SetNanovisServerList { namelist } {
-        SetServerList "nanovis" $namelist
-    }
-    public proc SetVtkServerList { namelist } {
-        SetServerList "vtk" $namelist
-    }
+
+    private variable _buffer;           # buffer for incoming/outgoing commands
+    private variable _outbuf;           # buffer for outgoing commands
+    private variable _blockOnWrite 0;   # Should writes to socket block?
+    private variable _initialized
+    private variable _isOpen 0
+    private variable _afterId -1
+    private variable _icon 0
+    private variable _trace 0;          # Protocol tracing for console
+    private variable _logging 0;        # Command logging to file
+    # Number of milliseconds to wait before idle timeout.  If greater than 0,
+    # automatically disconnect from the visualization server when idle timeout
+    # is reached.
+    private variable _idleTimeout 43200000; # 12 hours
+    #private variable _idleTimeout 5000;# 5 seconds
+    #private variable _idleTimeout 0;   # No timeout
+
+    private common _servers;            # array of visualization server lists
+    set _servers(geovis)  "localhost:2015"
+    set _servers(nanovis) "localhost:2000"
+    set _servers(pymol)   "localhost:2020"
+    set _servers(vmdmds)  "localhost:2018"
+    set _servers(vtkvis)  "localhost:2010"
+    private common _done;               # Used to indicate status of send.
 }
 
@@ -864,5 +864,5 @@
                 -xscrollmode auto -yscrollmode auto
             text $inner.scrl.text \
-                -font "Arial 9 " -background white -relief sunken -bd 1 \
+                -font "Arial 9" -background white -relief sunken -bd 1 \
                 -height 5 -wrap word -width 60
             $inner.scrl contents $inner.scrl.text
Index: /branches/multichoice/gui/scripts/vtkglyphviewer.tcl
===================================================================
--- /branches/multichoice/gui/scripts/vtkglyphviewer.tcl	(revision 6370)
+++ /branches/multichoice/gui/scripts/vtkglyphviewer.tcl	(revision 6371)
@@ -102,5 +102,5 @@
     private method ReceiveDataset { args }
     private method ReceiveImage { args }
-    private method ReceiveLegend { colormap title vmin vmax size }
+    private method ReceiveLegend { colormap title min max size }
     private method RequestLegend {}
     private method Rotate {option x y}
@@ -151,10 +151,9 @@
     private variable _rotatePending 0
     private variable _cutplanePending 0
-    private variable _field      ""
-    private variable _colorMode "vmag"; # Mode of colormap (vmag or scalar)
     private variable _fields
     private variable _curFldName ""
     private variable _curFldLabel ""
     private variable _curFldComp 3
+    private variable _colorMode "vmag"; # Mode of colormap (vmag or scalar)
     private variable _mouseOver "";     # what called LegendRangeAction:
                                         # vmin or vmax
@@ -591,7 +590,4 @@
     }
     array set params $settings
-    set params(-description) ""
-    set params(-param) ""
-    array set params $settings
 
     if {$params(-color) == "auto" || $params(-color) == "autoreset"} {
@@ -630,5 +626,4 @@
         set _dlist [lreplace $_dlist $pos $pos]
         array unset _obj2ovride $dataobj-*
-        array unset _settings $dataobj-*
         set changed 1
     }
@@ -691,5 +686,5 @@
             return $dlist
         }
-        -image {
+        "-image" {
             if {[llength $args] != 2} {
                 error "wrong # args: should be \"get -image view\""
@@ -705,5 +700,5 @@
         }
         default {
-            error "bad option \"$op\": should be -objects or -image"
+            error "bad option \"$op\": should be -objects, -visible or -image"
         }
     }
@@ -1323,8 +1318,4 @@
 itcl::body Rappture::VtkGlyphViewer::InitSettings { args } {
     foreach spec $args {
-        if { [info exists _settings($_first${spec})] } {
-            # Reset global setting with dataobj specific setting
-            set _settings($spec) $_settings($_first${spec})
-        }
         AdjustSetting $spec
     }
@@ -2212,5 +2203,5 @@
                     SendCmd "camera zoom $_view($what)"
                 }
-             }
+            }
         }
     }
@@ -2246,10 +2237,10 @@
     radiobutton $inner.vtk_button -text "VTK data file" \
         -variable [itcl::scope _downloadPopup(format)] \
-        -font "Arial 9 " \
+        -font "Arial 9" \
         -value vtk
     Rappture::Tooltip::for $inner.vtk_button "Save as VTK data file."
     radiobutton $inner.image_button -text "Image File" \
         -variable [itcl::scope _downloadPopup(format)] \
-        -font "Arial 9 " \
+        -font "Arial 9" \
         -value image
     Rappture::Tooltip::for $inner.image_button \
Index: /branches/multichoice/gui/scripts/vtkheightmapviewer.tcl
===================================================================
--- /branches/multichoice/gui/scripts/vtkheightmapviewer.tcl	(revision 6370)
+++ /branches/multichoice/gui/scripts/vtkheightmapviewer.tcl	(revision 6371)
@@ -71,5 +71,4 @@
     private method BuildDownloadPopup { widget command }
     private method CameraReset {}
-    private method Combo { option }
     private method Connect {}
     private method CurrentDatasets {args}
@@ -88,4 +87,5 @@
     private method IsValidObject { dataobj }
     private method LeaveLegend {}
+    private method LegendTitleAction { option }
     private method MotionLegend { x y }
     private method Pan {option x y}
@@ -103,4 +103,5 @@
     private method Rotate {option x y}
     private method SetCurrentColormap { color }
+    private method SetCurrentFieldName { dataobj }
     private method SetLegendTip { x y }
     private method SetObjectStyle { dataobj comp }
@@ -214,8 +215,8 @@
 
     array set _settings {
-        -axisflymode            "static"
+        -axesvisible            1
         -axislabels             1
         -axisminorticks         1
-        -axisvisible            1
+        -axismode               "static"
         -colormap               BCGYR
         -colormapdiscrete       0
@@ -243,6 +244,12 @@
     array set _changed {
         -colormap               0
+        -colormapdiscrete       0
+        -colormapvisible        0
+        -edges                  0
+        -isolinecolor           0
+        -isolinesvisible        0
         -numisolines            0
         -opacity                0
+        -wireframe              0
     }
     itk_component add view {
@@ -255,7 +262,5 @@
 
     itk_component add fieldmenu {
-        menu $itk_component(plotarea).menu \
-            -relief flat \
-            -tearoff 0
+        menu $itk_component(plotarea).menu -relief flat -tearoff 0
     } {
         usual
@@ -286,5 +291,6 @@
     }
     pack $itk_component(reset) -side top -padx 2 -pady { 2 0 }
-    Rappture::Tooltip::for $itk_component(reset) "Reset the view to the default zoom level"
+    Rappture::Tooltip::for $itk_component(reset) \
+        "Reset the view to the default zoom level"
 
     itk_component add zoomin {
@@ -483,7 +489,4 @@
     }
     array set params $settings
-    set params(-description) ""
-    set params(-param) ""
-    array set params $settings
 
     if {$params(-color) == "auto" || $params(-color) == "autoreset"} {
@@ -523,5 +526,4 @@
         set _dlist [lreplace $_dlist $pos $pos]
         array unset _obj2ovride $dataobj-*
-        array unset _settings $dataobj-*
         set changed 1
     }
@@ -583,5 +585,5 @@
             return $dlist
         }
-        -image {
+        "-image" {
             if {[llength $args] != 2} {
                 error "wrong # args: should be \"get -image view\""
@@ -597,5 +599,5 @@
         }
         default {
-            error "bad option \"$op\": should be -objects or -image"
+            error "bad option \"$op\": should be -objects, -visible or -image"
         }
     }
@@ -920,5 +922,7 @@
         # Reset the camera and other view parameters
         #
-        InitSettings -isheightmap -background
+        InitSettings -isheightmap -background \
+            -xgrid -ygrid -zgrid -axismode \
+            -axesvisible -axislabels -axisminorticks
 
         # Setting a custom exponent and label format for axes is causing
@@ -933,4 +937,5 @@
         #SendCmd "axis exp 0 0 0 1"
 
+        SendCmd "axis tickpos outside"
         SendCmd "axis lrot z 90"
         $_arcball quaternion [ViewToQuaternion]
@@ -951,5 +956,5 @@
 
     set _first ""
-    # Start off with no datasets are visible.
+    # Start off with no datasets visible.
     SendCmd "dataset visible 0"
     set scale [GetHeightmapScale]
@@ -957,4 +962,5 @@
         if { [info exists _obj2ovride($dataobj-raise)] &&  $_first == "" } {
             set _first $dataobj
+            SetCurrentFieldName $dataobj
         }
         foreach comp [$dataobj components] {
@@ -998,39 +1004,7 @@
         }
     }
-    if { $_first != "" } {
-        $itk_component(field) choices delete 0 end
-        $itk_component(fieldmenu) delete 0 end
-        array unset _fields
-        set _curFldName ""
-        foreach cname [$_first components] {
-            foreach fname [$_first fieldnames $cname] {
-                if { [info exists _fields($fname)] } {
-                    continue
-                }
-                foreach { label units components } \
-                    [$_first fieldinfo $fname] break
-                $itk_component(field) choices insert end "$fname" "$label"
-                $itk_component(fieldmenu) add radiobutton -label "$label" \
-                    -value $label -variable [itcl::scope _curFldLabel] \
-                    -selectcolor red \
-                    -activebackground $itk_option(-plotbackground) \
-                    -activeforeground $itk_option(-plotforeground) \
-                    -font "Arial 8" \
-                    -command [itcl::code $this Combo invoke]
-                set _fields($fname) [list $label $units $components]
-                if { $_curFldName == "" } {
-                    set _curFldName $fname
-                    set _curFldLabel $label
-                }
-            }
-        }
-        $itk_component(field) value $_curFldLabel
-    }
+
     InitSettings -stretchtofit -outline
-
     if { $_reset } {
-        SendCmd "axis tickpos outside"
-        #SendCmd "axis lformat all %g"
-
         foreach axis { x y z } {
             set label ""
@@ -1089,7 +1063,5 @@
         }
         PanCamera
-        InitSettings -xgrid -ygrid -zgrid \
-            -axisvisible -axislabels -heightmapscale -field -isheightmap \
-            -numisolines
+        InitSettings -heightmapscale -field -isheightmap -numisolines
         if { [array size _fields] < 2 } {
             catch {blt::table forget $itk_component(field) $itk_component(field_l)}
@@ -1331,8 +1303,4 @@
 itcl::body Rappture::VtkHeightmapViewer::InitSettings { args } {
     foreach spec $args {
-        if { [info exists _settings($_first${spec})] } {
-            # Reset global setting with dataobj specific setting
-            set _settings($spec) $_settings($_first${spec})
-        }
         AdjustSetting $spec
     }
@@ -1351,9 +1319,7 @@
     }
     switch -- $what {
-        "-axisflymode" {
-            set mode [$itk_component(axisflymode) value]
-            set mode [$itk_component(axisflymode) translate $mode]
-            set _settings($what) $mode
-            SendCmd "axis flymode $mode"
+        "-axesvisible" {
+            set bool $_settings($what)
+            SendCmd "axis visible all $bool"
         }
         "-axislabels" {
@@ -1365,7 +1331,9 @@
             SendCmd "axis minticks all $bool"
         }
-        "-axisvisible" {
-            set bool $_settings($what)
-            SendCmd "axis visible all $bool"
+        "-axismode" {
+            set mode [$itk_component(axismode) value]
+            set mode [$itk_component(axismode) translate $mode]
+            set _settings($what) $mode
+            SendCmd "axis flymode $mode"
         }
         "-background" {
@@ -1391,4 +1359,5 @@
             if { $color == "none" } {
                 if { $_settings(-colormapvisible) } {
+                    set _changed(-colormapvisible) 1
                     SendCmd "heightmap surface 0"
                     set _settings(-colormapvisible) 0
@@ -1396,4 +1365,5 @@
             } else {
                 if { !$_settings(-colormapvisible) } {
+                    set _changed(-colormapvisible) 1
                     SendCmd "heightmap surface 1"
                     set _settings(-colormapvisible) 1
@@ -1408,9 +1378,6 @@
             EventuallyRequestLegend
         }
-        "-colormapvisible" {
-            set bool $_settings($what)
-            SendCmd "heightmap surface $bool"
-        }
         "-colormapdiscrete" {
+            set _changed($what) 1
             set bool $_settings($what)
             set numColors [expr $_settings(-numisolines) + 1]
@@ -1428,5 +1395,11 @@
             EventuallyRequestLegend
         }
+        "-colormapvisible" {
+            set _changed($what) 1
+            set bool $_settings($what)
+            SendCmd "heightmap surface $bool"
+        }
         "-edges" {
+            set _changed($what) 1
             set bool $_settings($what)
             SendCmd "heightmap edges $bool"
@@ -1574,12 +1547,16 @@
         }
         "-isolinecolor" {
+            set _changed($what) 1
             set color [$itk_component(isolinecolor) value]
             if { $color == "none" } {
                 if { $_settings(-isolinesvisible) } {
+                    set _changed(-isolinesvisible) 1
                     SendCmd "heightmap isolines 0"
                     set _settings(-isolinesvisible) 0
                 }
             } else {
+                set _settings($what) $color
                 if { !$_settings(-isolinesvisible) } {
+                    set _changed(-isolinesvisible) 1
                     SendCmd "heightmap isolines 1"
                     set _settings(-isolinesvisible) 1
@@ -1590,5 +1567,10 @@
         }
         "-isolinesvisible" {
+            set _changed($what) 1
             set bool $_settings($what)
+            set color [$itk_component(isolinecolor) value]
+            if { $bool && $color != $_settings(-isolinecolor)} {
+                $itk_component(isolinecolor) value $_settings(-isolinecolor)
+            }
             SendCmd "heightmap isolines $bool"
             DrawLegend
@@ -1634,4 +1616,5 @@
         }
         "-outline" {
+            set _changed($what) 1
             if { $_settings(-isheightmap) } {
                 SendCmd "outline visible 0"
@@ -1657,4 +1640,5 @@
         }
         "-wireframe" {
+            set _changed($what) 1
             set bool $_settings($what)
             SendCmd "heightmap wireframe $bool"
@@ -1717,6 +1701,6 @@
         set cmap $_currentColormap
         if { ![info exists _colormaps($cmap)] } {
-           BuildColormap $cmap
-           set _colormaps($cmap) 1
+            BuildColormap $cmap
+            set _colormaps($cmap) 1
         }
         #SendCmd "legend $cmap scalar $_curFldName {} $w $h 0"
@@ -2034,6 +2018,6 @@
     checkbutton $inner.visible \
         -text "Axes" \
-        -variable [itcl::scope _settings(-axisvisible)] \
-        -command [itcl::code $this AdjustSetting -axisvisible] \
+        -variable [itcl::scope _settings(-axesvisible)] \
+        -command [itcl::code $this AdjustSetting -axesvisible] \
         -font "Arial 9"
     checkbutton $inner.labels \
@@ -2066,5 +2050,5 @@
     label $inner.mode_l -text "Mode" -font "Arial 9"
 
-    itk_component add axisflymode {
+    itk_component add axismode {
         Rappture::Combobox $inner.mode -width 10 -editable 0
     }
@@ -2074,6 +2058,6 @@
         "furthest_triad"  "farthest" \
         "outer_edges"     "outer"
-    $itk_component(axisflymode) value $_settings(-axisflymode)
-    bind $inner.mode <<Value>> [itcl::code $this AdjustSetting -axisflymode]
+    $itk_component(axismode) value $_settings(-axismode)
+    bind $inner.mode <<Value>> [itcl::code $this AdjustSetting -axismode]
 
     blt::table $inner \
@@ -2212,10 +2196,10 @@
     radiobutton $inner.vtk_button -text "VTK data file" \
         -variable [itcl::scope _downloadPopup(format)] \
-        -font "Arial 9 " \
+        -font "Arial 9" \
         -value vtk
     Rappture::Tooltip::for $inner.vtk_button "Save as VTK data file."
     radiobutton $inner.image_button -text "Image File" \
         -variable [itcl::scope _downloadPopup(format)] \
-        -font "Arial 9 " \
+        -font "Arial 9" \
         -value image
     Rappture::Tooltip::for $inner.image_button \
@@ -2258,7 +2242,17 @@
     set tag $dataobj-$comp
     array set style {
-        -color BCGYR
-        -levels 10
-        -opacity 1.0
+        -color            BCGYR
+        -colormapdiscrete 0
+        -colormapvisible  1
+        -edgecolor        black
+        -edges            0
+        -isolinecolor     black
+        -isolinesvisible  1
+        -isolinewidth     1.0
+        -levels           10
+        -linewidth        1.0
+        -opacity          1.0
+        -outline          0
+        -wireframe        0
     }
     set stylelist [$dataobj style $comp]
@@ -2298,18 +2292,38 @@
         DrawLegend
     }
+    foreach setting {-edges -outline -wireframe -colormapdiscrete \
+                     -colormapvisible -isolinecolor -isolinesvisible} {
+        if {$_changed($setting)} {
+            # User-modified UI setting overrides style
+            set style($setting) $_settings($setting)
+        } else {
+            # Set UI control to style setting (tool provided or default)
+            set _settings($setting) $style($setting)
+        }
+    }
+
     SendCmd "outline add $tag"
     SendCmd "outline color [Color2RGB $itk_option(-plotforeground)] $tag"
-    SendCmd "outline visible $_settings(-outline) $tag"
+    SendCmd "outline visible $style(-outline) $tag"
+
     set scale [GetHeightmapScale]
     SendCmd "[list heightmap add contourlist $_contourList $scale $tag]"
     set _comp2scale($tag) $_settings(-heightmapscale)
-    SendCmd "heightmap edges $_settings(-edges) $tag"
-    SendCmd "heightmap wireframe $_settings(-wireframe) $tag"
+    SendCmd "heightmap edges $style(-edges) $tag"
+    SendCmd "heightmap linecolor [Color2RGB $style(-edgecolor)] $tag"
+    SendCmd "heightmap linewidth $style(-linewidth) $tag"
+    SendCmd "heightmap wireframe $style(-wireframe) $tag"
     SetCurrentColormap $style(-color)
-    set color [$itk_component(isolinecolor) value]
-    SendCmd "heightmap isolinecolor [Color2RGB $color] $tag"
+    if {$style(-colormapdiscrete)} {
+        SendCmd "heightmap preinterp 1 $tag"
+        set numColors [expr $style(-levels) + 1]
+        SendCmd "colormap res $numColors $style(-color)"
+    }
+    SendCmd "heightmap isolinecolor [Color2RGB $style(-isolinecolor)] $tag"
+    $itk_component(isolinecolor) value $style(-isolinecolor)
+    SendCmd "heightmap isolinewidth $style(-isolinewidth) $tag"
     SendCmd "heightmap lighting $_settings(-isheightmap) $tag"
-    SendCmd "heightmap isolines $_settings(-isolinesvisible) $tag"
-    SendCmd "heightmap surface $_settings(-colormapvisible) $tag"
+    SendCmd "heightmap isolines $style(-isolinesvisible) $tag"
+    SendCmd "heightmap surface $style(-colormapvisible) $tag"
     SendCmd "heightmap opacity $style(-opacity) $tag"
     set _settings(-opacity) [expr $style(-opacity) * 100.0]
@@ -2349,5 +2363,5 @@
 # DrawLegend --
 #
-# Draws the legend in the own canvas on the right side of the plot area.
+# Draws the legend in its own canvas on the right side of the plot area.
 #
 itcl::body Rappture::VtkHeightmapViewer::DrawLegend {} {
@@ -2437,7 +2451,7 @@
     }
 
-    $c bind title <ButtonPress> [itcl::code $this Combo post]
-    $c bind title <Enter> [itcl::code $this Combo activate]
-    $c bind title <Leave> [itcl::code $this Combo deactivate]
+    $c bind title <ButtonPress> [itcl::code $this LegendTitleAction post]
+    $c bind title <Enter> [itcl::code $this LegendTitleAction enter]
+    $c bind title <Leave> [itcl::code $this LegendTitleAction leave]
     # Reset the item coordinates according the current size of the plot.
     if { [info exists _limits($_curFldName)] } {
@@ -2553,15 +2567,17 @@
 
 # ----------------------------------------------------------------------
-# USAGE: _dropdown post
-# USAGE: _dropdown unpost
-# USAGE: _dropdown select
-#
-# Used internally to handle the dropdown list for this combobox.  The
-# post/unpost options are invoked when the list is posted or unposted
-# to manage the relief of the controlling button.  The select option
-# is invoked whenever there is a selection from the list, to assign
-# the value back to the gauge.
-# ----------------------------------------------------------------------
-itcl::body Rappture::VtkHeightmapViewer::Combo {option} {
+# USAGE: LegendTitleAction post
+# USAGE: LegendTitleAction enter
+# USAGE: LegendTitleAction leave
+# USAGE: LegendTitleAction save
+#
+# Used internally to handle the dropdown list for the fields menu combobox.
+# The post option is invoked when the field title is pressed to launch the
+# dropdown.  The enter option is invoked when the user mouses over the field
+# title. The leave option is invoked when the user moves the mouse away
+# from the field title.  The save option is invoked whenever there is a
+# selection from the list, to alert the visualization server.
+# ----------------------------------------------------------------------
+itcl::body Rappture::VtkHeightmapViewer::LegendTitleAction {option} {
     set c $itk_component(view)
     switch -- $option {
@@ -2573,16 +2589,16 @@
             tk_popup $itk_component(fieldmenu) $x $y
         }
-        activate {
+        enter {
             $c itemconfigure title -fill red
         }
-        deactivate {
+        leave {
             $c itemconfigure title -fill $itk_option(-plotforeground)
         }
-        invoke {
+        save {
             $itk_component(field) value $_curFldLabel
             AdjustSetting -field
         }
         default {
-            error "bad option \"$option\": should be post, unpost, select"
+            error "bad option \"$option\": should be post, enter, leave or save"
         }
     }
@@ -2634,2 +2650,33 @@
     blt::vector destroy $v
 }
+
+itcl::body Rappture::VtkHeightmapViewer::SetCurrentFieldName { dataobj } {
+    set _first $dataobj
+    $itk_component(field) choices delete 0 end
+    $itk_component(fieldmenu) delete 0 end
+    array unset _fields
+    set _curFldName ""
+    foreach cname [$_first components] {
+        foreach fname [$_first fieldnames $cname] {
+            if { [info exists _fields($fname)] } {
+                continue
+            }
+            foreach { label units components } \
+                [$_first fieldinfo $fname] break
+            $itk_component(field) choices insert end "$fname" "$label"
+            $itk_component(fieldmenu) add radiobutton -label "$label" \
+                -value $label -variable [itcl::scope _curFldLabel] \
+                -selectcolor red \
+                -activebackground $itk_option(-plotbackground) \
+                -activeforeground $itk_option(-plotforeground) \
+                -font "Arial 8" \
+                -command [itcl::code $this LegendTitleAction save]
+            set _fields($fname) [list $label $units $components]
+            if { $_curFldName == "" } {
+                set _curFldName $fname
+                set _curFldLabel $label
+            }
+        }
+    }
+    $itk_component(field) value $_curFldLabel
+}
Index: /branches/multichoice/gui/scripts/vtkimageviewer.tcl
===================================================================
--- /branches/multichoice/gui/scripts/vtkimageviewer.tcl	(revision 6370)
+++ /branches/multichoice/gui/scripts/vtkimageviewer.tcl	(revision 6371)
@@ -70,5 +70,4 @@
     private method BuildImageTab {}
     private method BuildDownloadPopup { widget command }
-    private method Combo { option }
     private method Connect {}
     private method CurrentDatasets {args}
@@ -86,4 +85,5 @@
     private method IsValidObject { dataobj }
     private method LeaveLegend {}
+    private method LegendTitleAction { option }
     private method MotionLegend { x y }
     private method Pan {option x y}
@@ -100,4 +100,5 @@
     private method Rotate {option x y}
     private method SetCurrentColormap { color }
+    private method SetCurrentFieldName { dataobj }
     private method SetLegendTip { x y }
     private method SetObjectStyle { dataobj comp }
@@ -209,8 +210,8 @@
 
     array set _settings {
-        -axisflymode            "static"
+        -axesvisible            1
         -axislabels             1
         -axisminorticks         1
-        -axisvisible            1
+        -axismode               "static"
         -backingcolor           white
         -backingvisible         1
@@ -243,7 +244,5 @@
 
     itk_component add fieldmenu {
-        menu $itk_component(plotarea).menu \
-            -relief flat \
-            -tearoff 0
+        menu $itk_component(plotarea).menu -relief flat -tearoff 0
     } {
         usual
@@ -274,5 +273,6 @@
     }
     pack $itk_component(reset) -side top -padx 2 -pady { 2 0 }
-    Rappture::Tooltip::for $itk_component(reset) "Reset the view to the default zoom level"
+    Rappture::Tooltip::for $itk_component(reset) \
+        "Reset the view to the default zoom level"
 
     itk_component add zoomin {
@@ -473,7 +473,4 @@
     }
     array set params $settings
-    set params(-description) ""
-    set params(-param) ""
-    array set params $settings
 
     if {$params(-color) == "auto" || $params(-color) == "autoreset"} {
@@ -513,5 +510,4 @@
         set _dlist [lreplace $_dlist $pos $pos]
         array unset _obj2ovride $dataobj-*
-        array unset _settings $dataobj-*
         set changed 1
     }
@@ -573,5 +569,5 @@
             return $dlist
         }
-        -image {
+        "-image" {
             if {[llength $args] != 2} {
                 error "wrong # args: should be \"get -image view\""
@@ -587,5 +583,5 @@
         }
         default {
-            error "bad option \"$op\": should be -objects or -image"
+            error "bad option \"$op\": should be -objects, -visible or -image"
         }
     }
@@ -607,4 +603,6 @@
         }
         foreach axis { x y } {
+            set units [$dataobj hints ${axis}units]
+            set found($units) 1
             set lim [$dataobj limits $axis]
             if { ![info exists _limits($axis)] } {
@@ -621,6 +619,4 @@
             }
             set _limits($axis) [list $amin $amax]
-            set units [$dataobj hints ${axis}units]
-            set found($units) 1
         }
         foreach { fname lim } [$dataobj fieldlimits] {
@@ -903,5 +899,5 @@
         DoResize
         if { $_settings(-stretchtofit) } {
-            AdjustSetting -stretchToFit
+            AdjustSetting -stretchtofit
         }
     }
@@ -910,6 +906,9 @@
         # Reset the camera and other view parameters
         #
-        InitSettings -view3d -background
-
+        InitSettings -view3d -background \
+            -xgrid -ygrid -zgrid -axismode \
+            -axesvisible -axislabels -axisminorticks
+
+        SendCmd "axis tickpos outside"
         SendCmd "axis lrot z 90"
         $_arcball quaternion [ViewToQuaternion]
@@ -930,9 +929,10 @@
 
     set _first ""
-    # Start off with no datasets are visible.
+    # Start off with no datasets visible.
     SendCmd "dataset visible 0"
     foreach dataobj [get -objects] {
         if { [info exists _obj2ovride($dataobj-raise)] &&  $_first == "" } {
             set _first $dataobj
+            SetCurrentFieldName $dataobj
         }
         foreach comp [$dataobj components] {
@@ -971,39 +971,7 @@
         }
     }
-    if { $_first != ""  } {
-        $itk_component(field) choices delete 0 end
-        $itk_component(fieldmenu) delete 0 end
-        array unset _fields
-        set _curFldName ""
-        foreach cname [$_first components] {
-            foreach fname [$_first fieldnames $cname] {
-                if { [info exists _fields($fname)] } {
-                    continue
-                }
-                foreach { label units components } \
-                    [$_first fieldinfo $fname] break
-                $itk_component(field) choices insert end "$fname" "$label"
-                $itk_component(fieldmenu) add radiobutton -label "$label" \
-                    -value $label -variable [itcl::scope _curFldLabel] \
-                    -selectcolor red \
-                    -activebackground $itk_option(-plotbackground) \
-                    -activeforeground $itk_option(-plotforeground) \
-                    -font "Arial 8" \
-                    -command [itcl::code $this Combo invoke]
-                set _fields($fname) [list $label $units $components]
-                if { $_curFldName == "" } {
-                    set _curFldName $fname
-                    set _curFldLabel $label
-                }
-            }
-        }
-        $itk_component(field) value $_curFldLabel
-    }
+
     InitSettings -stretchtofit -outline
-
     if { $_reset } {
-        SendCmd "axis tickpos outside"
-        #SendCmd "axis lformat all %g"
-
         foreach axis { x y z } {
             set label ""
@@ -1046,6 +1014,5 @@
         }
         PanCamera
-        InitSettings -xgrid -ygrid -zgrid \
-            -axisvisible -axislabels -field -view3d
+        InitSettings -field -view3d
         if { [array size _fields] < 2 } {
             catch {blt::table forget $itk_component(field) $itk_component(field_l)}
@@ -1278,8 +1245,4 @@
 itcl::body Rappture::VtkImageViewer::InitSettings { args } {
     foreach spec $args {
-        if { [info exists _settings($_first${spec})] } {
-            # Reset global setting with dataobj specific setting
-            set _settings($spec) $_settings($_first${spec})
-        }
         AdjustSetting $spec
     }
@@ -1298,9 +1261,7 @@
     }
     switch -- $what {
-        "-axisflymode" {
-            set mode [$itk_component(axisflymode) value]
-            set mode [$itk_component(axisflymode) translate $mode]
-            set _settings($what) $mode
-            SendCmd "axis flymode $mode"
+        "-axesvisible" {
+            set bool $_settings($what)
+            SendCmd "axis visible all $bool"
         }
         "-axislabels" {
@@ -1312,7 +1273,9 @@
             SendCmd "axis minticks all $bool"
         }
-        "-axisvisible" {
-            set bool $_settings($what)
-            SendCmd "axis visible all $bool"
+        "-axismode" {
+            set mode [$itk_component(axismode) value]
+            set mode [$itk_component(axismode) translate $mode]
+            set _settings($what) $mode
+            SendCmd "axis flymode $mode"
         }
         "-background" {
@@ -1396,4 +1359,40 @@
             SendCmd "camera reset"
             DrawLegend
+        }
+        "-legendvisible" {
+            if { !$_settings($what) } {
+                $itk_component(view) delete legend
+            }
+            DrawLegend
+        }
+        "-level" {
+            set val $_settings($what)
+            SendCmd "image level $val"
+        }
+        "-opacity" {
+            set _changed($what) 1
+            if { $_settings(-view3d) } {
+                set _settings(-saveopacity) $_settings($what)
+                set val [expr $_settings($what) * 0.01]
+                SendCmd "image opacity $val"
+            } else {
+                SendCmd "image opacity 1.0"
+            }
+        }
+        "-outline" {
+            set bool $_settings($what)
+            SendCmd "outline visible $bool"
+        }
+        "-stretchtofit" {
+            set bool $_settings($what)
+            if { $bool } {
+                if { $_settings(-view3d) } {
+                    SendCmd "camera aspect native"
+                } else {
+                    SendCmd "camera aspect window"
+                }
+            } else {
+                SendCmd "camera aspect native"
+            }
         }
         "-view3d" {
@@ -1451,40 +1450,4 @@
             set val $_settings($what)
             SendCmd "image window $val"
-        }
-        "-level" {
-            set val $_settings($what)
-            SendCmd "image level $val"
-        }
-        "-legendvisible" {
-            if { !$_settings($what) } {
-                $itk_component(view) delete legend
-            }
-            DrawLegend
-        }
-        "-opacity" {
-            set _changed($what) 1
-            if { $_settings(-view3d) } {
-                set _settings(-saveopacity) $_settings($what)
-                set val [expr $_settings($what) * 0.01]
-                SendCmd "image opacity $val"
-            } else {
-                SendCmd "image opacity 1.0"
-            }
-        }
-        "-outline" {
-            set bool $_settings($what)
-            SendCmd "outline visible $bool"
-        }
-        "-stretchtofit" {
-            set bool $_settings($what)
-            if { $bool } {
-                if { $_settings(-view3d) } {
-                    SendCmd "camera aspect native"
-                } else {
-                    SendCmd "camera aspect window"
-                }
-            } else {
-                SendCmd "camera aspect native"
-            }
         }
         "-xgrid" - "-ygrid" - "-zgrid" {
@@ -1798,6 +1761,6 @@
     checkbutton $inner.visible \
         -text "Axes" \
-        -variable [itcl::scope _settings(-axisvisible)] \
-        -command [itcl::code $this AdjustSetting -axisvisible] \
+        -variable [itcl::scope _settings(-axesvisible)] \
+        -command [itcl::code $this AdjustSetting -axesvisible] \
         -font "Arial 9"
     checkbutton $inner.labels \
@@ -1830,5 +1793,5 @@
     label $inner.mode_l -text "Mode" -font "Arial 9"
 
-    itk_component add axisflymode {
+    itk_component add axismode {
         Rappture::Combobox $inner.mode -width 10 -editable 0
     }
@@ -1838,6 +1801,6 @@
         "furthest_triad"  "farthest" \
         "outer_edges"     "outer"
-    $itk_component(axisflymode) value $_settings(-axisflymode)
-    bind $inner.mode <<Value>> [itcl::code $this AdjustSetting -axisflymode]
+    $itk_component(axismode) value $_settings(-axismode)
+    bind $inner.mode <<Value>> [itcl::code $this AdjustSetting -axismode]
 
     blt::table $inner \
@@ -1976,10 +1939,10 @@
     radiobutton $inner.vtk_button -text "VTK data file" \
         -variable [itcl::scope _downloadPopup(format)] \
-        -font "Arial 9 " \
+        -font "Arial 9" \
         -value vtk
     Rappture::Tooltip::for $inner.vtk_button "Save as VTK data file."
     radiobutton $inner.image_button -text "Image File" \
         -variable [itcl::scope _downloadPopup(format)] \
-        -font "Arial 9 " \
+        -font "Arial 9" \
         -value image
     Rappture::Tooltip::for $inner.image_button \
@@ -2049,5 +2012,5 @@
     if { [info exists style(-stretchtofit)] } {
         set _settings(-stretchtofit) $style(-stretchtofit)
-        AdjustSetting -stretchToFit
+        AdjustSetting -stretchtofit
     }
     SendCmd "outline add $tag"
@@ -2095,5 +2058,5 @@
 # DrawLegend --
 #
-#       Draws the legend in the own canvas on the right side of the plot area.
+# Draws the legend in its own canvas on the right side of the plot area.
 #
 itcl::body Rappture::VtkImageViewer::DrawLegend {} {
@@ -2156,7 +2119,7 @@
     set x1 [expr $x2 - ($iw*12)/10]
 
-    $c bind title <ButtonPress> [itcl::code $this Combo post]
-    $c bind title <Enter> [itcl::code $this Combo activate]
-    $c bind title <Leave> [itcl::code $this Combo deactivate]
+    $c bind title <ButtonPress> [itcl::code $this LegendTitleAction post]
+    $c bind title <Enter> [itcl::code $this LegendTitleAction enter]
+    $c bind title <Leave> [itcl::code $this LegendTitleAction leave]
     # Reset the item coordinates according the current size of the plot.
     if { [info exists _limits($_curFldName)] } {
@@ -2272,15 +2235,17 @@
 
 # ----------------------------------------------------------------------
-# USAGE: _dropdown post
-# USAGE: _dropdown unpost
-# USAGE: _dropdown select
-#
-# Used internally to handle the dropdown list for this combobox.  The
-# post/unpost options are invoked when the list is posted or unposted
-# to manage the relief of the controlling button.  The select option
-# is invoked whenever there is a selection from the list, to assign
-# the value back to the gauge.
-# ----------------------------------------------------------------------
-itcl::body Rappture::VtkImageViewer::Combo {option} {
+# USAGE: LegendTitleAction post
+# USAGE: LegendTitleAction enter
+# USAGE: LegendTitleAction leave
+# USAGE: LegendTitleAction save
+#
+# Used internally to handle the dropdown list for the fields menu combobox.
+# The post option is invoked when the field title is pressed to launch the
+# dropdown.  The enter option is invoked when the user mouses over the field
+# title. The leave option is invoked when the user moves the mouse away
+# from the field title.  The save option is invoked whenever there is a
+# selection from the list, to alert the visualization server.
+# ----------------------------------------------------------------------
+itcl::body Rappture::VtkImageViewer::LegendTitleAction {option} {
     set c $itk_component(view)
     switch -- $option {
@@ -2292,16 +2257,16 @@
             tk_popup $itk_component(fieldmenu) $x $y
         }
-        activate {
+        enter {
             $c itemconfigure title -fill red
         }
-        deactivate {
+        leave {
             $c itemconfigure title -fill $itk_option(-plotforeground)
         }
-        invoke {
+        save {
             $itk_component(field) value $_curFldLabel
             AdjustSetting -field
         }
         default {
-            error "bad option \"$option\": should be post, unpost, select"
+            error "bad option \"$option\": should be post, enter, leave or save"
         }
     }
@@ -2328,2 +2293,33 @@
     set _view(-zoom) 1.0
 }
+
+itcl::body Rappture::VtkImageViewer::SetCurrentFieldName { dataobj } {
+    set _first $dataobj
+    $itk_component(field) choices delete 0 end
+    $itk_component(fieldmenu) delete 0 end
+    array unset _fields
+    set _curFldName ""
+    foreach cname [$_first components] {
+        foreach fname [$_first fieldnames $cname] {
+            if { [info exists _fields($fname)] } {
+                continue
+            }
+            foreach { label units components } \
+                [$_first fieldinfo $fname] break
+            $itk_component(field) choices insert end "$fname" "$label"
+            $itk_component(fieldmenu) add radiobutton -label "$label" \
+                -value $label -variable [itcl::scope _curFldLabel] \
+                -selectcolor red \
+                -activebackground $itk_option(-plotbackground) \
+                -activeforeground $itk_option(-plotforeground) \
+                -font "Arial 8" \
+                -command [itcl::code $this LegendTitleAction save]
+            set _fields($fname) [list $label $units $components]
+            if { $_curFldName == "" } {
+                set _curFldName $fname
+                set _curFldLabel $label
+            }
+        }
+    }
+    $itk_component(field) value $_curFldLabel
+}
Index: /branches/multichoice/gui/scripts/vtkisosurfaceviewer.tcl
===================================================================
--- /branches/multichoice/gui/scripts/vtkisosurfaceviewer.tcl	(revision 6370)
+++ /branches/multichoice/gui/scripts/vtkisosurfaceviewer.tcl	(revision 6371)
@@ -107,5 +107,5 @@
     private method ReceiveDataset { args }
     private method ReceiveImage { args }
-    private method ReceiveLegend { colormap title vmin vmax size }
+    private method ReceiveLegend { colormap title min max size }
     private method RequestLegend {}
     private method Rotate {option x y}
@@ -160,9 +160,8 @@
     private variable _rotatePending 0
     private variable _cutplanePending 0
-    private variable _field      ""
-    private variable _colorMode "scalar"; # Mode of colormap (vmag or scalar)
     private variable _fields
     private variable _curFldName ""
     private variable _curFldLabel ""
+    private variable _colorMode "scalar"; # Mode of colormap (vmag or scalar)
     private variable _mouseOver "";     # what called LegendRangeAction:
                                         # vmin or vmax
@@ -618,7 +617,4 @@
     }
     array set params $settings
-    set params(-description) ""
-    set params(-param) ""
-    array set params $settings
 
     if {$params(-color) == "auto" || $params(-color) == "autoreset"} {
@@ -657,5 +653,4 @@
         set _dlist [lreplace $_dlist $pos $pos]
         array unset _obj2ovride $dataobj-*
-        array unset _settings $dataobj-*
         set changed 1
     }
@@ -718,5 +713,5 @@
             return $dlist
         }
-        -image {
+        "-image" {
             if {[llength $args] != 2} {
                 error "wrong # args: should be \"get -image view\""
@@ -732,5 +727,5 @@
         }
         default {
-            error "bad option \"$op\": should be -objects or -image"
+            error "bad option \"$op\": should be -objects, -visible or -image"
         }
     }
@@ -1350,8 +1345,4 @@
 itcl::body Rappture::VtkIsosurfaceViewer::InitSettings { args } {
     foreach spec $args {
-        if { [info exists _settings($_first${spec})] } {
-            # Reset global setting with dataobj specific setting
-            set _settings($spec) $_settings($_first${spec})
-        }
         AdjustSetting $spec
     }
@@ -1505,5 +1496,5 @@
         }
         "-isolinecolor" {
-            set color [$itk_component(isolineColor) value]
+            set color [$itk_component(isolinecolor) value]
             set _settings($what) $color
             DrawLegend
@@ -1741,5 +1732,5 @@
 
     label $inner.linecolor_l -text "Isolines" -font "Arial 9"
-    itk_component add isolineColor {
+    itk_component add isolinecolor {
         Rappture::Combobox $inner.linecolor -width 10 -editable 0
     }
@@ -1756,5 +1747,5 @@
         "none"               "none"
 
-    $itk_component(isolineColor) value "white"
+    $itk_component(isolinecolor) value $_settings(-isolinecolor)
     bind $inner.linecolor <<Value>> \
         [itcl::code $this AdjustSetting -isolinecolor]
@@ -2184,5 +2175,5 @@
                     SendCmd "camera zoom $_view($what)"
                 }
-             }
+            }
         }
     }
@@ -2218,10 +2209,10 @@
     radiobutton $inner.vtk_button -text "VTK data file" \
         -variable [itcl::scope _downloadPopup(format)] \
-        -font "Arial 9 " \
+        -font "Arial 9" \
         -value vtk
     Rappture::Tooltip::for $inner.vtk_button "Save as VTK data file."
     radiobutton $inner.image_button -text "Image File" \
         -variable [itcl::scope _downloadPopup(format)] \
-        -font "Arial 9 " \
+        -font "Arial 9" \
         -value image
     Rappture::Tooltip::for $inner.image_button \
@@ -2259,4 +2250,5 @@
     array set style {
         -color                  BCGYR
+        -constcolor             white
         -cutplaneedges          0
         -cutplanelighting       1
@@ -2284,4 +2276,5 @@
         set style(-opacity) 1.0
     }
+    set style(-constcolor) $itk_option(-plotforeground)
     array set style [$dataobj style $comp]
     #DebugTrace [array get style]
@@ -2315,5 +2308,4 @@
     }
     if { $_currentColormap == "" } {
-        SetCurrentColormap $style(-color)
         $itk_component(colormap) value $style(-color)
     }
@@ -2343,5 +2335,5 @@
 
     SendCmd "cutplane add $tag"
-    SendCmd "cutplane color [Color2RGB $itk_option(-plotforeground)] $tag"
+    SendCmd "cutplane color [Color2RGB $style(-constcolor)] $tag"
     foreach axis {x y z} {
         set pos [expr $style(-${axis}cutplaneposition) * 0.01]
@@ -2359,5 +2351,5 @@
 
     SendCmd "outline add $tag"
-    SendCmd "outline color [Color2RGB $itk_option(-plotforeground)] $tag"
+    SendCmd "outline color [Color2RGB $style(-constcolor)] $tag"
     SendCmd "outline visible $style(-outline) $tag"
 
@@ -2367,5 +2359,5 @@
     SendCmd "contour3d edges $style(-edges) $tag"
     set _settings(-isosurfaceedges) $style(-edges)
-    #SendCmd "contour3d color [Color2RGB $style(-color)] $tag"
+    #SendCmd "contour3d color [Color2RGB $style(-constcolor)] $tag"
     SendCmd "contour3d lighting $style(-lighting) $tag"
     set _settings(-isosurfacelighting) $style(-lighting)
Index: /branches/multichoice/gui/scripts/vtkmeshviewer.tcl
===================================================================
--- /branches/multichoice/gui/scripts/vtkmeshviewer.tcl	(revision 6370)
+++ /branches/multichoice/gui/scripts/vtkmeshviewer.tcl	(revision 6371)
@@ -411,7 +411,4 @@
     }
     array set params $settings
-    set params(-description) ""
-    set params(-param) ""
-    array set params $settings
 
     if {$params(-color) == "auto" || $params(-color) == "autoreset"} {
@@ -510,5 +507,5 @@
             return $dlist
         }
-        -image {
+        "-image" {
             if {[llength $args] != 2} {
                 error "wrong # args: should be \"get -image view\""
@@ -524,5 +521,5 @@
         }
         default {
-            error "bad option \"$op\": should be -objects or -image"
+            error "bad option \"$op\": should be -objects, -visible or -image"
         }
     }
@@ -1467,5 +1464,5 @@
     radiobutton $inner.vtk_button -text "VTK data file" \
         -variable [itcl::scope _downloadPopup(format)] \
-        -font "Helvetica 9 " \
+        -font "Arial 9" \
         -value vtk
     Rappture::Tooltip::for $inner.vtk_button "Save as VTK data file."
Index: /branches/multichoice/gui/scripts/vtkstreamlinesviewer.tcl
===================================================================
--- /branches/multichoice/gui/scripts/vtkstreamlinesviewer.tcl	(revision 6370)
+++ /branches/multichoice/gui/scripts/vtkstreamlinesviewer.tcl	(revision 6371)
@@ -72,5 +72,4 @@
     private method BuildSurfaceTab {}
     private method DrawLegend {}
-    private method Combo { option }
     private method Connect {}
     private method CurrentDatasets {args}
@@ -91,4 +90,5 @@
     private method IsValidObject { dataobj }
     private method LeaveLegend {}
+    private method LegendTitleAction { option }
     private method MotionLegend { x y }
     private method Pan {option x y}
@@ -101,8 +101,9 @@
     private method ReceiveDataset { args }
     private method ReceiveImage { args }
-    private method ReceiveLegend { colormap title vmin vmax size }
+    private method ReceiveLegend { colormap title min max size }
     private method RequestLegend {}
     private method Rotate {option x y}
     private method SetCurrentColormap { color }
+    private method SetCurrentFieldName { dataobj }
     private method SetLegendTip { x y }
     private method SetObjectStyle { dataobj comp }
@@ -145,8 +146,7 @@
     private variable _curFldName ""
     private variable _curFldLabel ""
-    private variable _field ""
+    private variable _colorMode "vmag"; # Mode of colormap (vmag or scalar)
     private variable _streamlinesLength 0
     private variable _numSeeds 200
-    private variable _colorMode "vmag"; # Mode of colormap (vmag or scalar)
 
     private common _downloadPopup;      # download options from popup
@@ -301,5 +301,6 @@
     }
     pack $itk_component(reset) -side top -padx 2 -pady 2
-    Rappture::Tooltip::for $itk_component(reset) "Reset the view to the default zoom level"
+    Rappture::Tooltip::for $itk_component(reset) \
+        "Reset the view to the default zoom level"
 
     itk_component add zoomin {
@@ -552,7 +553,4 @@
     }
     array set params $settings
-    set params(-description) ""
-    set params(-param) ""
-    array set params $settings
 
     if {$params(-color) == "auto" || $params(-color) == "autoreset"} {
@@ -592,5 +590,4 @@
         set _dlist [lreplace $_dlist $pos $pos]
         array unset _obj2ovride $dataobj-*
-        array unset _settings $dataobj-*
         set changed 1
     }
@@ -653,5 +650,5 @@
             return $dlist
         }
-        -image {
+        "-image" {
             if {[llength $args] != 2} {
                 error "wrong # args: should be \"get -image view\""
@@ -667,5 +664,5 @@
         }
         default {
-            error "bad option \"$op\": should be -objects or -image"
+            error "bad option \"$op\": should be -objects, -visible or -image"
         }
     }
@@ -982,4 +979,5 @@
         if { [info exists _obj2ovride($dataobj-raise)] &&  $_first == "" } {
             set _first $dataobj
+            SetCurrentFieldName $dataobj
         }
         foreach comp [$dataobj components] {
@@ -1027,32 +1025,4 @@
             }
         }
-        $itk_component(field) choices delete 0 end
-        $itk_component(fieldmenu) delete 0 end
-        array unset _fields
-        set _curFldName ""
-        set _curFldLabel ""
-        foreach cname [$_first components] {
-            foreach fname [$_first fieldnames $cname] {
-                if { [info exists _fields($fname)] } {
-                    continue
-                }
-                foreach { label units components } \
-                    [$_first fieldinfo $fname] break
-                $itk_component(field) choices insert end "$fname" "$label"
-                $itk_component(fieldmenu) add radiobutton -label "$label" \
-                    -value $label -variable [itcl::scope _curFldLabel] \
-                    -selectcolor red \
-                    -activebackground $itk_option(-plotbackground) \
-                    -activeforeground $itk_option(-plotforeground) \
-                    -font "Arial 8" \
-                    -command [itcl::code $this Combo invoke]
-                set _fields($fname) [list $label $units $components]
-                if { $_curFldName == "" && $components == 3 } {
-                    set _curFldName $fname
-                    set _curFldLabel $label
-                }
-            }
-        }
-        $itk_component(field) value $_curFldLabel
     }
 
@@ -1299,8 +1269,4 @@
 itcl::body Rappture::VtkStreamlinesViewer::InitSettings { args } {
     foreach spec $args {
-        if { [info exists _settings($_first${spec})] } {
-            # Reset global setting with dataobj specific setting
-            set _settings($spec) $_settings($_first${spec})
-        }
         AdjustSetting $spec
     }
@@ -2068,5 +2034,5 @@
     radiobutton $inner.vtk_button -text "VTK data file" \
         -variable [itcl::scope _downloadPopup(format)] \
-        -font "Helvetica 9 " \
+        -font "Arial 9" \
         -value vtk
     Rappture::Tooltip::for $inner.vtk_button "Save as VTK data file."
@@ -2185,5 +2151,5 @@
 
 # ----------------------------------------------------------------------
-# USAGE: ReceiveLegend <colormap> <title> <vmin> <vmax> <size>
+# USAGE: ReceiveLegend <colormap> <title> <min> <max> <size>
 #
 # Invoked automatically whenever the "legend" command comes in from
@@ -2191,5 +2157,5 @@
 # specified <size> will follow.
 # ----------------------------------------------------------------------
-itcl::body Rappture::VtkStreamlinesViewer::ReceiveLegend { colormap title vmin vmax size } {
+itcl::body Rappture::VtkStreamlinesViewer::ReceiveLegend { colormap title min max size } {
     set _legendPending 0
     set _title $title
@@ -2255,7 +2221,7 @@
             $c bind colormap <Motion> [itcl::code $this MotionLegend %x %y]
         }
-        $c bind title <ButtonPress> [itcl::code $this Combo post]
-        $c bind title <Enter> [itcl::code $this Combo activate]
-        $c bind title <Leave> [itcl::code $this Combo deactivate]
+        $c bind title <ButtonPress> [itcl::code $this LegendTitleAction post]
+        $c bind title <Enter> [itcl::code $this LegendTitleAction enter]
+        $c bind title <Leave> [itcl::code $this LegendTitleAction leave]
         # Reset the item coordinates according the current size of the plot.
         $c itemconfigure title -text $title
@@ -2380,15 +2346,17 @@
 
 # ----------------------------------------------------------------------
-# USAGE: _dropdown post
-# USAGE: _dropdown unpost
-# USAGE: _dropdown select
-#
-# Used internally to handle the dropdown list for this combobox.  The
-# post/unpost options are invoked when the list is posted or unposted
-# to manage the relief of the controlling button.  The select option
-# is invoked whenever there is a selection from the list, to assign
-# the value back to the gauge.
-# ----------------------------------------------------------------------
-itcl::body Rappture::VtkStreamlinesViewer::Combo {option} {
+# USAGE: LegendTitleAction post
+# USAGE: LegendTitleAction enter
+# USAGE: LegendTitleAction leave
+# USAGE: LegendTitleAction save
+#
+# Used internally to handle the dropdown list for the fields menu combobox.
+# The post option is invoked when the field title is pressed to launch the
+# dropdown.  The enter option is invoked when the user mouses over the field
+# title. The leave option is invoked when the user moves the mouse away
+# from the field title.  The save option is invoked whenever there is a
+# selection from the list, to alert the visualization server.
+# ----------------------------------------------------------------------
+itcl::body Rappture::VtkStreamlinesViewer::LegendTitleAction {option} {
     set c $itk_component(view)
     switch -- $option {
@@ -2400,16 +2368,16 @@
             tk_popup $itk_component(fieldmenu) $x $y
         }
-        activate {
+        enter {
             $c itemconfigure title -fill red
         }
-        deactivate {
+        leave {
             $c itemconfigure title -fill white
         }
-        invoke {
+        save {
             $itk_component(field) value $_curFldLabel
             AdjustSetting -field
         }
         default {
-            error "bad option \"$option\": should be post, unpost, select"
+            error "bad option \"$option\": should be post, enter, leave or save"
         }
     }
@@ -2436,2 +2404,34 @@
     set _view(-zoom) 1.0
 }
+
+itcl::body Rappture::VtkStreamlinesViewer::SetCurrentFieldName { dataobj } {
+    set _first $dataobj
+    $itk_component(field) choices delete 0 end
+    $itk_component(fieldmenu) delete 0 end
+    array unset _fields
+    set _curFldName ""
+    set _curFldLabel ""
+    foreach cname [$_first components] {
+        foreach fname [$_first fieldnames $cname] {
+            if { [info exists _fields($fname)] } {
+                continue
+            }
+            foreach { label units components } \
+                [$_first fieldinfo $fname] break
+            $itk_component(field) choices insert end "$fname" "$label"
+            $itk_component(fieldmenu) add radiobutton -label "$label" \
+                -value $label -variable [itcl::scope _curFldLabel] \
+                -selectcolor red \
+                -activebackground $itk_option(-plotbackground) \
+                -activeforeground $itk_option(-plotforeground) \
+                -font "Arial 8" \
+                -command [itcl::code $this LegendTitleAction save]
+            set _fields($fname) [list $label $units $components]
+            if { $_curFldName == "" && $components == 3 } {
+                set _curFldName $fname
+                set _curFldLabel $label
+            }
+        }
+    }
+    $itk_component(field) value $_curFldLabel
+}
Index: /branches/multichoice/gui/scripts/vtksurfaceviewer.tcl
===================================================================
--- /branches/multichoice/gui/scripts/vtksurfaceviewer.tcl	(revision 6370)
+++ /branches/multichoice/gui/scripts/vtksurfaceviewer.tcl	(revision 6371)
@@ -69,5 +69,4 @@
     private method BuildDownloadPopup { widget command }
     private method BuildSurfaceTab {}
-    private method Combo { option }
     private method Connect {}
     private method CurrentDatasets {args}
@@ -85,4 +84,5 @@
     private method IsValidObject { dataobj }
     private method LeaveLegend {}
+    private method LegendTitleAction { option }
     private method MotionLegend { x y }
     private method Pan {option x y}
@@ -95,5 +95,5 @@
     private method ReceiveDataset { args }
     private method ReceiveImage { args }
-    private method ReceiveLegend { colormap title vmin vmax size }
+    private method ReceiveLegend { colormap title min max size }
     private method RequestLegend {}
     private method Rotate {option x y}
@@ -139,9 +139,8 @@
     private variable _legendPending 0
     private variable _rotatePending 0
-    private variable _field ""
-    private variable _colorMode "scalar"; # Mode of colormap (vmag or scalar)
     private variable _fields
     private variable _curFldName ""
     private variable _curFldLabel ""
+    private variable _colorMode "scalar"; # Mode of colormap (vmag or scalar)
 
     private common _downloadPopup;      # download options from popup
@@ -474,7 +473,4 @@
     }
     array set params $settings
-    set params(-description) ""
-    set params(-param) ""
-    array set params $settings
 
     if {$params(-color) == "auto" || $params(-color) == "autoreset"} {
@@ -513,5 +509,4 @@
         set _dlist [lreplace $_dlist $pos $pos]
         array unset _obj2ovride $dataobj-*
-        array unset _settings $dataobj-*
         set changed 1
     }
@@ -574,5 +569,5 @@
             return $dlist
         }
-        -image {
+        "-image" {
             if {[llength $args] != 2} {
                 error "wrong # args: should be \"get -image view\""
@@ -588,5 +583,5 @@
         }
         default {
-            error "bad option \"$op\": should be -objects or -image"
+            error "bad option \"$op\": should be -objects, -visible or -image"
         }
     }
@@ -1194,8 +1189,4 @@
 itcl::body Rappture::VtkSurfaceViewer::InitSettings { args } {
     foreach spec $args {
-        if { [info exists _settings($_first${spec})] } {
-            # Reset global setting with dataobj specific setting
-            set _settings($spec) $_settings($_first${spec})
-        }
         AdjustSetting $spec
     }
@@ -1318,7 +1309,24 @@
         "-isolinecolor" {
             set _changed($what) 1
-            set color [$itk_component(isolineColor) value]
-            set _settings($what) $color
-            SendCmd "contour2d linecolor [Color2RGB $color]"
+            set color [$itk_component(isolinecolor) value]
+            if { $color == "none" } {
+                if { $_settings(-isolinesvisible) } {
+                    set _changed(-isolinesvisible) 1
+                    foreach tag [CurrentDatasets -visible] {
+                        SendCmd "contour2d visible 0 $tag"
+                    }
+                    set _settings(-isolinesvisible) 0
+                }
+            } else {
+                set _settings($what) $color
+                if { !$_settings(-isolinesvisible) } {
+                    set _changed(-isolinesvisible) 1
+                    foreach tag [CurrentDatasets -visible] {
+                        SendCmd "contour2d visible 1 $tag"
+                    }
+                    set _settings(-isolinesvisible) 1
+                }
+                SendCmd "contour2d linecolor [Color2RGB $color]"
+            }
             DrawLegend
         }
@@ -1328,4 +1336,7 @@
             SendCmd "contour2d visible 0"
             if { $bool } {
+                if { [$itk_component(isolinecolor) value] != $_settings(-isolinecolor)} {
+                    $itk_component(isolinecolor) value $_settings(-isolinecolor)
+                }
                 foreach tag [CurrentDatasets -visible] {
                     SendCmd "contour2d visible $bool $tag"
@@ -1546,5 +1557,5 @@
 
     label $inner.linecolor_l -text "Isolines" -font "Arial 9"
-    itk_component add isolineColor {
+    itk_component add isolinecolor {
         Rappture::Combobox $inner.linecolor -width 10 -editable 0
     }
@@ -1561,5 +1572,5 @@
         "none"               "none"
 
-    $itk_component(isolineColor) value "white"
+    $itk_component(isolinecolor) value $_settings(-isolinecolor)
     bind $inner.linecolor <<Value>> \
         [itcl::code $this AdjustSetting -isolinecolor]
@@ -1797,5 +1808,5 @@
                     SendCmd "camera zoom $_view($what)"
                 }
-             }
+            }
         }
     }
@@ -1831,10 +1842,10 @@
     radiobutton $inner.vtk_button -text "VTK data file" \
         -variable [itcl::scope _downloadPopup(format)] \
-        -font "Arial 9 " \
+        -font "Arial 9" \
         -value vtk
     Rappture::Tooltip::for $inner.vtk_button "Save as VTK data file."
     radiobutton $inner.image_button -text "Image File" \
         -variable [itcl::scope _downloadPopup(format)] \
-        -font "Arial 9 " \
+        -font "Arial 9" \
         -value image
     Rappture::Tooltip::for $inner.image_button \
@@ -2170,7 +2181,7 @@
     }
 
-    $c bind title <ButtonPress> [itcl::code $this Combo post]
-    $c bind title <Enter> [itcl::code $this Combo activate]
-    $c bind title <Leave> [itcl::code $this Combo deactivate]
+    $c bind title <ButtonPress> [itcl::code $this LegendTitleAction post]
+    $c bind title <Enter> [itcl::code $this LegendTitleAction enter]
+    $c bind title <Leave> [itcl::code $this LegendTitleAction leave]
     # Reset the item coordinates according the current size of the plot.
     $c itemconfigure title -text $title
@@ -2197,15 +2208,17 @@
 
 # ----------------------------------------------------------------------
-# USAGE: _dropdown post
-# USAGE: _dropdown unpost
-# USAGE: _dropdown select
-#
-# Used internally to handle the dropdown list for this combobox.  The
-# post/unpost options are invoked when the list is posted or unposted
-# to manage the relief of the controlling button.  The select option
-# is invoked whenever there is a selection from the list, to assign
-# the value back to the gauge.
-# ----------------------------------------------------------------------
-itcl::body Rappture::VtkSurfaceViewer::Combo {option} {
+# USAGE: LegendTitleAction post
+# USAGE: LegendTitleAction enter
+# USAGE: LegendTitleAction leave
+# USAGE: LegendTitleAction save
+#
+# Used internally to handle the dropdown list for the fields menu combobox.
+# The post option is invoked when the field title is pressed to launch the
+# dropdown.  The enter option is invoked when the user mouses over the field
+# title. The leave option is invoked when the user moves the mouse away
+# from the field title.  The save option is invoked whenever there is a
+# selection from the list, to alert the visualization server.
+# ----------------------------------------------------------------------
+itcl::body Rappture::VtkSurfaceViewer::LegendTitleAction {option} {
     set c $itk_component(view)
     switch -- $option {
@@ -2219,16 +2232,16 @@
             tk_popup $itk_component(fieldmenu) $x $y
         }
-        activate {
+        enter {
             $c itemconfigure title -fill red
         }
-        deactivate {
+        leave {
             $c itemconfigure title -fill $itk_option(-plotforeground)
         }
-        invoke {
+        save {
             $itk_component(field) value $_curFldLabel
             AdjustSetting -field
         }
         default {
-            error "bad option \"$option\": should be post, unpost, select"
+            error "bad option \"$option\": should be post, enter, leave or save"
         }
     }
@@ -2320,5 +2333,5 @@
                 -activeforeground $itk_option(-plotforeground) \
                 -font "Arial 8" \
-                -command [itcl::code $this Combo invoke]
+                -command [itcl::code $this LegendTitleAction save]
             set _fields($fname) [list $label $units $components]
             if { $_curFldName == "" } {
Index: /branches/multichoice/gui/scripts/vtkviewer.tcl
===================================================================
--- /branches/multichoice/gui/scripts/vtkviewer.tcl	(revision 6370)
+++ /branches/multichoice/gui/scripts/vtkviewer.tcl	(revision 6371)
@@ -104,5 +104,5 @@
     private method ReceiveDataset { args }
     private method ReceiveImage { args }
-    private method ReceiveLegend { colormap title vmin vmax size }
+    private method ReceiveLegend { colormap title min max size }
     private method RequestLegend {}
     private method Rotate {option x y}
@@ -595,7 +595,4 @@
     }
     array set params $settings
-    set params(-description) ""
-    set params(-param) ""
-    array set params $settings
 
     if {$params(-color) == "auto" || $params(-color) == "autoreset"} {
@@ -634,5 +631,4 @@
         set _dlist [lreplace $_dlist $pos $pos]
         array unset _obj2ovride $dataobj-*
-        array unset _settings $dataobj-*
         set changed 1
     }
@@ -695,5 +691,5 @@
             return $dlist
         }
-        -image {
+        "-image" {
             if {[llength $args] != 2} {
                 error "wrong # args: should be \"get -image view\""
@@ -709,5 +705,5 @@
         }
         default {
-            error "bad option \"$op\": should be -objects or -image"
+            error "bad option \"$op\": should be -objects, -visible or -image"
         }
     }
@@ -2588,5 +2584,5 @@
     radiobutton $inner.vtk_button -text "VTK data file" \
         -variable [itcl::scope _downloadPopup(format)] \
-        -font "Helvetica 9 " \
+        -font "Arial 9" \
         -value vtk
     Rappture::Tooltip::for $inner.vtk_button "Save as VTK data file."
@@ -2866,5 +2862,5 @@
 
 # ----------------------------------------------------------------------
-# USAGE: ReceiveLegend <colormap> <title> <vmin> <vmax> <size>
+# USAGE: ReceiveLegend <colormap> <title> <min> <max> <size>
 #
 # Invoked automatically whenever the "legend" command comes in from
@@ -2872,7 +2868,7 @@
 # specified <size> will follow.
 # ----------------------------------------------------------------------
-itcl::body Rappture::VtkViewer::ReceiveLegend { colormap title vmin vmax size } {
-    set _limits(vmin) $vmin
-    set _limits(vmax) $vmax
+itcl::body Rappture::VtkViewer::ReceiveLegend { colormap title min max size } {
+    set _limits(vmin) $min
+    set _limits(vmax) $max
     set _title $title
     if { [IsConnected] } {
Index: /branches/multichoice/gui/scripts/vtkvolumeviewer.tcl
===================================================================
--- /branches/multichoice/gui/scripts/vtkvolumeviewer.tcl	(revision 6370)
+++ /branches/multichoice/gui/scripts/vtkvolumeviewer.tcl	(revision 6371)
@@ -74,5 +74,4 @@
     private method BuildVolumeComponents {}
     private method BuildVolumeTab {}
-    private method Combo { option }
     private method ComputeAlphamap { cname }
     private method ComputeTransferFunction { cname }
@@ -97,4 +96,5 @@
     private method IsValidObject { dataobj }
     private method LeaveLegend {}
+    private method LegendTitleAction { option }
     private method MotionLegend { x y }
     private method Pan {option x y}
@@ -109,5 +109,5 @@
     private method ReceiveDataset { args }
     private method ReceiveImage { args }
-    private method ReceiveLegend { colormap title vmin vmax size }
+    private method ReceiveLegend { colormap title min max size }
     private method RemoveMarker { x y }
     private method RequestLegend {}
@@ -115,4 +115,5 @@
     private method Rotate {option x y}
     private method SendTransferFunctions {}
+    private method SetCurrentFieldName { dataobj }
     private method SetInitialTransferFunction { dataobj cname }
     private method SetLegendTip { x y }
@@ -240,7 +241,7 @@
     array set _settings {
         -axesvisible            1
-        -axisflymode            static
         -axislabels             1
         -axisminorticks         1
+        -axismode               "static"
         -background             black
         -color                  "default"
@@ -536,7 +537,4 @@
     }
     array set params $settings
-    set params(-description) ""
-    set params(-param) ""
-    array set params $settings
 
     if {$params(-color) == "auto" || $params(-color) == "autoreset"} {
@@ -577,5 +575,4 @@
         set _dlist [lreplace $_dlist $pos $pos]
         array unset _obj2ovride $dataobj-*
-        array unset _settings $dataobj-*
         set changed 1
     }
@@ -638,5 +635,5 @@
             return $dlist
         }
-        -image {
+        "-image" {
             if {[llength $args] != 2} {
                 error "wrong # args: should be \"get -image view\""
@@ -652,5 +649,5 @@
         }
         default {
-            error "bad option \"$op\": should be -objects or -image"
+            error "bad option \"$op\": should be -objects, -visible or -image"
         }
     }
@@ -1004,5 +1001,5 @@
         set _first ""
         InitSettings -background \
-            -xgrid -ygrid -zgrid -axisflymode \
+            -xgrid -ygrid -zgrid -axismode \
             -axesvisible -axislabels -axisminorticks
         StopBufferingCommands
@@ -1020,4 +1017,5 @@
         if { [info exists _obj2ovride($dataobj-raise)] &&  $_first == "" } {
             set _first $dataobj
+            SetCurrentFieldName $dataobj
         }
         foreach cname [$dataobj components] {
@@ -1066,34 +1064,4 @@
             }
         }
-        $itk_component(field) choices delete 0 end
-        $itk_component(fieldmenu) delete 0 end
-        array unset _fields
-        set _curFldName ""
-        foreach cname [$_first components] {
-            foreach fname [$_first fieldnames $cname] {
-                if { [info exists _fields($fname)] } {
-                    continue
-                }
-                foreach { label units components } \
-                    [$_first fieldinfo $fname] break
-                # Only scalar fields are valid
-                if {$_allowMultiComponent || $components == 1} {
-                    $itk_component(field) choices insert end "$fname" "$label"
-                    $itk_component(fieldmenu) add radiobutton -label "$label" \
-                        -value $label -variable [itcl::scope _curFldLabel] \
-                        -selectcolor red \
-                        -activebackground $itk_option(-plotbackground) \
-                        -activeforeground $itk_option(-plotforeground) \
-                        -font "Arial 8" \
-                        -command [itcl::code $this Combo invoke]
-                    set _fields($fname) [list $label $units $components]
-                    if { $_curFldName == "" } {
-                        set _curFldName $fname
-                        set _curFldLabel $label
-                    }
-                }
-            }
-        }
-        $itk_component(field) value $_curFldLabel
     }
 
@@ -1331,8 +1299,4 @@
 itcl::body Rappture::VtkVolumeViewer::InitSettings { args } {
     foreach spec $args {
-        if { [info exists _settings($_first${spec})] } {
-            # Reset global setting with dataobj specific setting
-            set _settings($spec) $_settings($_first${spec})
-        }
         AdjustSetting $spec
     }
@@ -1351,7 +1315,21 @@
     }
     switch -- $what {
-        "-current" {
-            set cname [$itk_component(volcomponents) value]
-            SwitchComponent $cname
+        "-axesvisible" {
+            set bool $_settings($what)
+            SendCmd "axis visible all $bool"
+        }
+        "-axislabels" {
+            set bool $_settings($what)
+            SendCmd "axis labels all $bool"
+        }
+        "-axisminorticks" {
+            set bool $_settings($what)
+            SendCmd "axis minticks all $bool"
+        }
+        "-axismode" {
+            set mode [$itk_component(axismode) value]
+            set mode [$itk_component(axismode) translate $mode]
+            set _settings($what) $mode
+            SendCmd "axis flymode $mode"
         }
         "-background" {
@@ -1368,135 +1346,13 @@
             DrawLegend
         }
-        "-volumeoutline" {
-            set bool $_settings($what)
-            SendCmd "outline visible 0"
-            foreach tag [GetDatasetsWithComponent $_current] {
-                SendCmd "outline visible $bool $tag"
-            }
-        }
-        "-legendvisible" {
-            set bool $_settings($what)
-            if { $bool } {
-                blt::table $itk_component(plotarea) \
-                    1,0 $itk_component(legend) -fill x
-            } else {
-                blt::table forget $itk_component(legend)
-            }
-        }
-        "-volumevisible" {
-            set bool $_settings($what)
-            set _settings($_current${what}) $bool
-            # Only the data objects in the array _obj2ovride(*-raise) are
-            # in the working set and can be displayed on screen. The global
-            # volume control determines whether they are visible.
-            #
-            # Note: The use of the current component is a hold over from
-            #       nanovis.  If we can't display more than one volume,
-            #       we don't have to limit the effects to a specific
-            #       component.
-            foreach tag [GetDatasetsWithComponent $_current] {
-                foreach {dataobj cname} [split $tag -] break
-                if { [info exists _obj2ovride($dataobj-raise)] } {
-                    SendCmd "volume visible $bool $tag"
-                }
-            }
-            if { $bool } {
-                Rappture::Tooltip::for $itk_component(volume) \
-                    "Hide the volume"
-            } else {
-                Rappture::Tooltip::for $itk_component(volume) \
-                    "Show the volume"
-            }
-        }
-        "-volumeblendmode" {
-            set val [$itk_component(blendmode) value]
-            set mode [$itk_component(blendmode) translate $val]
-            set _settings($what) $mode
-            set _settings($_current${what}) $mode
-            foreach tag [GetDatasetsWithComponent $_current] {
-                SendCmd "volume blendmode $mode $tag"
-            }
-        }
-        "-volumeambient" {
-            # Other parts of the code use the -volumeambient setting to
-            # tell if the component settings have been initialized
-            if { ![info exists _settings($_current${what})] } {
-                InitComponentSettings $_current
-            }
-            set val $_settings($what)
-            set _settings($_current${what}) $val
-            set ambient [expr {0.01*$val}]
-            foreach tag [GetDatasetsWithComponent $_current] {
-                SendCmd "volume shading ambient $ambient $tag"
-            }
-        }
-        "-volumediffuse" {
-            set val $_settings($what)
-            set _settings($_current${what}) $val
-            set diffuse [expr {0.01*$val}]
-            foreach tag [GetDatasetsWithComponent $_current] {
-                SendCmd "volume shading diffuse $diffuse $tag"
-            }
-        }
-        "-volumespecularlevel" - "-volumespecularexponent" {
-            set val $_settings($what)
-            set _settings($_current${what}) $val
-            set level [expr {0.01*$val}]
-            set exp $_settings($what)
-            foreach tag [GetDatasetsWithComponent $_current] {
-                SendCmd "volume shading specular $level $exp $tag"
-            }
-        }
-        "-volumelighting" {
-            set bool $_settings($what)
-            set _settings($_current${what}) $bool
-            foreach tag [GetDatasetsWithComponent $_current] {
-                SendCmd "volume lighting $bool $tag"
-            }
-        }
-        "-volumeopacity" {
-            set val $_settings($what)
-            set _settings($_current${what}) $val
-            set val [expr {0.01*$val}]
-            foreach tag [GetDatasetsWithComponent $_current] {
-                SendCmd "volume opacity $val $tag"
-            }
-        }
-        "-volumequality" {
-            set val $_settings($what)
-            set _settings($_current${what}) $val
-            set val [expr {0.01*$val}]
-            foreach tag [GetDatasetsWithComponent $_current] {
-                SendCmd "volume quality $val $tag"
-            }
-        }
-        "-axesvisible" {
-            set bool $_settings($what)
-            SendCmd "axis visible all $bool"
-        }
-        "-axislabels" {
-            set bool $_settings($what)
-            SendCmd "axis labels all $bool"
-        }
-        "-axisminorticks" {
-            set bool $_settings($what)
-            SendCmd "axis minticks all $bool"
-        }
-        "-xgrid" - "-ygrid" - "-zgrid" {
-            set axis [string range $what 1 1]
-            set bool $_settings($what)
-            SendCmd "axis grid $axis $bool"
-        }
-        "-axisflymode" {
-            set mode [$itk_component(axismode) value]
-            set mode [$itk_component(axismode) translate $mode]
-            set _settings($what) $mode
-            SendCmd "axis flymode $mode"
-        }
-        "-cutplanesvisible" {
-            set bool $_settings($what)
-            foreach dataset [CurrentDatasets -visible] {
-                SendCmd "$_cutplaneCmd visible $bool $dataset"
-            }
+        "-color" {
+            set color [$itk_component(colormap) value]
+            set _settings($what) $color
+            set _settings($_current${what}) $color
+            ResetColormap $_current $color
+        }
+        "-current" {
+            set cname [$itk_component(volcomponents) value]
+            SwitchComponent $cname
         }
         "-cutplanelighting" {
@@ -1524,35 +1380,9 @@
             }
         }
-        "-xcutplanevisible" - "-ycutplanevisible" - "-zcutplanevisible" {
-            set axis [string range $what 1 1]
+        "-cutplanesvisible" {
             set bool $_settings($what)
-            if { $bool } {
-                $itk_component(${axis}CutScale) configure -state normal \
-                    -troughcolor white
-            } else {
-                $itk_component(${axis}CutScale) configure -state disabled \
-                    -troughcolor grey82
-            }
             foreach dataset [CurrentDatasets -visible] {
-                SendCmd "$_cutplaneCmd axis $axis $bool $dataset"
-            }
-        }
-        "-xcutplaneposition" - "-ycutplaneposition" - "-zcutplaneposition" {
-            set axis [string range $what 1 1]
-            set pos [expr $_settings($what) * 0.01]
-            foreach dataset [CurrentDatasets -visible] {
-                SendCmd "$_cutplaneCmd slice ${axis} ${pos} $dataset"
-            }
-            set _cutplanePending 0
-        }
-        "-volumethickness" {
-            set _settings($_current${what}) $_settings($what)
-            updateTransferFunctions
-        }
-        "-color" {
-            set color [$itk_component(colormap) value]
-            set _settings($what) $color
-            set _settings($_current${what}) $color
-            ResetColormap $_current $color
+                SendCmd "$_cutplaneCmd visible $bool $dataset"
+            }
         }
         "-field" {
@@ -1584,4 +1414,138 @@
             SendCmd "camera reset"
             DrawLegend
+        }
+        "-legendvisible" {
+            set bool $_settings($what)
+            if { $bool } {
+                blt::table $itk_component(plotarea) \
+                    1,0 $itk_component(legend) -fill x
+            } else {
+                blt::table forget $itk_component(legend)
+            }
+        }
+        "-volumeambient" {
+            # Other parts of the code use the -volumeambient setting to
+            # tell if the component settings have been initialized
+            if { ![info exists _settings($_current${what})] } {
+                InitComponentSettings $_current
+            }
+            set val $_settings($what)
+            set _settings($_current${what}) $val
+            set ambient [expr {0.01*$val}]
+            foreach tag [GetDatasetsWithComponent $_current] {
+                SendCmd "volume shading ambient $ambient $tag"
+            }
+        }
+        "-volumeblendmode" {
+            set val [$itk_component(blendmode) value]
+            set mode [$itk_component(blendmode) translate $val]
+            set _settings($what) $mode
+            set _settings($_current${what}) $mode
+            foreach tag [GetDatasetsWithComponent $_current] {
+                SendCmd "volume blendmode $mode $tag"
+            }
+        }
+        "-volumediffuse" {
+            set val $_settings($what)
+            set _settings($_current${what}) $val
+            set diffuse [expr {0.01*$val}]
+            foreach tag [GetDatasetsWithComponent $_current] {
+                SendCmd "volume shading diffuse $diffuse $tag"
+            }
+        }
+        "-volumelighting" {
+            set bool $_settings($what)
+            set _settings($_current${what}) $bool
+            foreach tag [GetDatasetsWithComponent $_current] {
+                SendCmd "volume lighting $bool $tag"
+            }
+        }
+        "-volumeopacity" {
+            set val $_settings($what)
+            set _settings($_current${what}) $val
+            set val [expr {0.01*$val}]
+            foreach tag [GetDatasetsWithComponent $_current] {
+                SendCmd "volume opacity $val $tag"
+            }
+        }
+        "-volumeoutline" {
+            set bool $_settings($what)
+            SendCmd "outline visible 0"
+            foreach tag [GetDatasetsWithComponent $_current] {
+                SendCmd "outline visible $bool $tag"
+            }
+        }
+        "-volumequality" {
+            set val $_settings($what)
+            set _settings($_current${what}) $val
+            set val [expr {0.01*$val}]
+            foreach tag [GetDatasetsWithComponent $_current] {
+                SendCmd "volume quality $val $tag"
+            }
+        }
+        "-volumespecularlevel" - "-volumespecularexponent" {
+            set val $_settings($what)
+            set _settings($_current${what}) $val
+            set level [expr {0.01*$val}]
+            set exp $_settings($what)
+            foreach tag [GetDatasetsWithComponent $_current] {
+                SendCmd "volume shading specular $level $exp $tag"
+            }
+        }
+        "-volumethickness" {
+            set _settings($_current${what}) $_settings($what)
+            updateTransferFunctions
+        }
+        "-volumevisible" {
+            set bool $_settings($what)
+            set _settings($_current${what}) $bool
+            # Only the data objects in the array _obj2ovride(*-raise) are
+            # in the working set and can be displayed on screen. The global
+            # volume control determines whether they are visible.
+            #
+            # Note: The use of the current component is a hold over from
+            #       nanovis.  If we can't display more than one volume,
+            #       we don't have to limit the effects to a specific
+            #       component.
+            foreach tag [GetDatasetsWithComponent $_current] {
+                foreach {dataobj cname} [split $tag -] break
+                if { [info exists _obj2ovride($dataobj-raise)] } {
+                    SendCmd "volume visible $bool $tag"
+                }
+            }
+            if { $bool } {
+                Rappture::Tooltip::for $itk_component(volume) \
+                    "Hide the volume"
+            } else {
+                Rappture::Tooltip::for $itk_component(volume) \
+                    "Show the volume"
+            }
+        }
+        "-xcutplanevisible" - "-ycutplanevisible" - "-zcutplanevisible" {
+            set axis [string range $what 1 1]
+            set bool $_settings($what)
+            if { $bool } {
+                $itk_component(${axis}CutScale) configure -state normal \
+                    -troughcolor white
+            } else {
+                $itk_component(${axis}CutScale) configure -state disabled \
+                    -troughcolor grey82
+            }
+            foreach dataset [CurrentDatasets -visible] {
+                SendCmd "$_cutplaneCmd axis $axis $bool $dataset"
+            }
+        }
+        "-xcutplaneposition" - "-ycutplaneposition" - "-zcutplaneposition" {
+            set axis [string range $what 1 1]
+            set pos [expr $_settings($what) * 0.01]
+            foreach dataset [CurrentDatasets -visible] {
+                SendCmd "$_cutplaneCmd slice ${axis} ${pos} $dataset"
+            }
+            set _cutplanePending 0
+        }
+        "-xgrid" - "-ygrid" - "-zgrid" {
+            set axis [string range $what 1 1]
+            set bool $_settings($what)
+            SendCmd "axis grid $axis $bool"
         }
         default {
@@ -1908,6 +1872,6 @@
         "furthest_triad"  "farthest" \
         "outer_edges"     "outer"
-    $itk_component(axismode) value $_settings(-axisflymode)
-    bind $inner.mode <<Value>> [itcl::code $this AdjustSetting -axisflymode]
+    $itk_component(axismode) value $_settings(-axismode)
+    bind $inner.mode <<Value>> [itcl::code $this AdjustSetting -axismode]
 
     blt::table $inner \
@@ -2174,5 +2138,5 @@
     radiobutton $inner.vtk_button -text "VTK data file" \
         -variable [itcl::scope _downloadPopup(format)] \
-        -font "Helvetica 9 " \
+        -font "Arial 9" \
         -value vtk
     Rappture::Tooltip::for $inner.vtk_button "Save as VTK data file."
@@ -2252,5 +2216,5 @@
 
 # ----------------------------------------------------------------------
-# USAGE: ReceiveLegend <colormap> <title> <vmin> <vmax> <size>
+# USAGE: ReceiveLegend <colormap> <title> <min> <max> <size>
 #
 # Invoked automatically whenever the "legend" command comes in from
@@ -2258,5 +2222,5 @@
 # specified <size> will follow.
 # ----------------------------------------------------------------------
-itcl::body Rappture::VtkVolumeViewer::ReceiveLegend { colormap title vmin vmax size } {
+itcl::body Rappture::VtkVolumeViewer::ReceiveLegend { colormap title min max size } {
     if { [isconnected] } {
         set bytes [ReceiveBytes $size]
@@ -2428,15 +2392,17 @@
 
 # ----------------------------------------------------------------------
-# USAGE: _dropdown post
-# USAGE: _dropdown unpost
-# USAGE: _dropdown select
-#
-# Used internally to handle the dropdown list for this combobox.  The
-# post/unpost options are invoked when the list is posted or unposted
-# to manage the relief of the controlling button.  The select option
-# is invoked whenever there is a selection from the list, to assign
-# the value back to the gauge.
-# ----------------------------------------------------------------------
-itcl::body Rappture::VtkVolumeViewer::Combo {option} {
+# USAGE: LegendTitleAction post
+# USAGE: LegendTitleAction enter
+# USAGE: LegendTitleAction leave
+# USAGE: LegendTitleAction save
+#
+# Used internally to handle the dropdown list for the fields menu combobox.
+# The post option is invoked when the field title is pressed to launch the
+# dropdown.  The enter option is invoked when the user mouses over the field
+# title. The leave option is invoked when the user moves the mouse away
+# from the field title.  The save option is invoked whenever there is a
+# selection from the list, to alert the visualization server.
+# ----------------------------------------------------------------------
+itcl::body Rappture::VtkVolumeViewer::LegendTitleAction {option} {
     set c $itk_component(view)
     switch -- $option {
@@ -2448,16 +2414,16 @@
             tk_popup $itk_component(fieldmenu) $x $y
         }
-        activate {
+        enter {
             $c itemconfigure title -fill red
         }
-        deactivate {
+        leave {
             $c itemconfigure title -fill $itk_option(-plotforeground)
         }
-        invoke {
+        save {
             $itk_component(field) value $_curFldLabel
             AdjustSetting -field
         }
         default {
-            error "bad option \"$option\": should be post, unpost, select"
+            error "bad option \"$option\": should be post, enter, leave or save"
         }
     }
@@ -2510,5 +2476,5 @@
         } else {
             # $n : absolute value, compute relative
-            lappend list  [expr {(double($value)-$min)/($max-$min)]}
+            lappend list [expr {(double($value)-$min)/($max-$min)}]
         }
     }
@@ -2865,2 +2831,36 @@
     return [ColorsToColormap $color]
 }
+
+itcl::body Rappture::VtkVolumeViewer::SetCurrentFieldName { dataobj } {
+    set _first $dataobj
+    $itk_component(field) choices delete 0 end
+    $itk_component(fieldmenu) delete 0 end
+    array unset _fields
+    set _curFldName ""
+    foreach cname [$_first components] {
+        foreach fname [$_first fieldnames $cname] {
+            if { [info exists _fields($fname)] } {
+                continue
+            }
+            foreach { label units components } \
+                [$_first fieldinfo $fname] break
+            # Only scalar fields are valid
+            if {$_allowMultiComponent || $components == 1} {
+                $itk_component(field) choices insert end "$fname" "$label"
+                $itk_component(fieldmenu) add radiobutton -label "$label" \
+                    -value $label -variable [itcl::scope _curFldLabel] \
+                    -selectcolor red \
+                    -activebackground $itk_option(-plotbackground) \
+                    -activeforeground $itk_option(-plotforeground) \
+                    -font "Arial 8" \
+                    -command [itcl::code $this LegendTitleAction save]
+                set _fields($fname) [list $label $units $components]
+                if { $_curFldName == "" } {
+                    set _curFldName $fname
+                    set _curFldLabel $label
+                }
+            }
+        }
+    }
+    $itk_component(field) value $_curFldLabel
+}
Index: /branches/multichoice/lang/tcl/scripts/library.tcl
===================================================================
--- /branches/multichoice/lang/tcl/scripts/library.tcl	(revision 6370)
+++ /branches/multichoice/lang/tcl/scripts/library.tcl	(revision 6371)
@@ -75,4 +75,5 @@
             close $fid
         } errs] != 0 } {
+            global errorInfo
             puts stderr "can't open \"$fname\": errs=$errs errorInfo=$errorInfo"
         }
@@ -90,4 +91,5 @@
             close $fid
         } errs] != 0 } {
+            global errorInfo
             puts stderr "can't open \"$fname\": errs=$errs errorInfo=$errorInfo"
         }
@@ -1067,6 +1069,6 @@
 # ----------------------------------------------------------------------
 itcl::body Rappture::LibraryObj::uq_get_vars {{tfile ""}} {
-    set varout \[
-    set varlist []
+    set varout "\["
+    set varlist {}
 
     if {$tfile == ""} {
Index: /branches/multichoice/lang/tcl/scripts/task.tcl
===================================================================
--- /branches/multichoice/lang/tcl/scripts/task.tcl	(revision 6370)
+++ /branches/multichoice/lang/tcl/scripts/task.tcl	(revision 6371)
@@ -218,5 +218,6 @@
 
     # write out the driver.xml file for the tool
-    set file "driver[pid].xml"
+    global rapptureInfo
+    set file [file join $rapptureInfo(cwd) "driver[pid].xml"]
     set status [catch {
         set fid [open $file w]
@@ -578,5 +579,6 @@
                 set rdir $_resources(-resultdir)
             } else {
-                set rdir "."
+                global rapptureInfo
+                set rdir $rapptureInfo(cwd)
             }
         } elseif {$resultdir ne ""} {
Index: /branches/multichoice/puq/puq.sh.in
===================================================================
--- /branches/multichoice/puq/puq.sh.in	(revision 6370)
+++ /branches/multichoice/puq/puq.sh.in	(revision 6371)
@@ -21,4 +21,4 @@
 script=$1
 shift
-exec ${python} ${puq_exec_prefix}/${script}.py $*
+exec ${python} ${puq_exec_prefix}/${script}.py "$@"
 
Index: /branches/multichoice/tester/scripts/main.tcl
===================================================================
--- /branches/multichoice/tester/scripts/main.tcl	(revision 6370)
+++ /branches/multichoice/tester/scripts/main.tcl	(revision 6371)
@@ -148,5 +148,5 @@
 wm title . "Rappture Regression Tester"
 wm geometry . 800x500
-Rappture::Panes .pw -orientation horizontal -sashcursor sb_h_double_arrow
+Rappture::Panes .pw -orientation horizontal
 pack .pw -expand yes -fill both
 
@@ -262,5 +262,5 @@
 
 # viewer for value diffs where we have a special object viewer
-Rappture::Panes .testdiffs.body.val2objs -orientation horizontal -sashcursor sb_h_double_arrow
+Rappture::Panes .testdiffs.body.val2objs -orientation horizontal
 
 # empty area for the object value viewer
