Ignore:
Timestamp:
Mar 25, 2013, 10:12:31 AM (12 years ago)
Author:
gah
Message:

These was are all related to the omenwire example.

o Added validity test for fields, meshes, clouds, and unirect2ds. There is

now a "isvalid" method that viewers should use to verify that the data object
can be plotted.

In some cases with fields this means that the widget won't even be created.
The resultviewer tests for the dimensionality which is by default 0.

o Thanks to Leif for pointing this out, it's not enough to check if the field

is valid. Individual components of the field may be invalid. Added check so
that viewers are never passed the names of invalid field components.

o Changed many "error" commands to just print to stderr and tolerantly deal

with the error.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/gui/scripts/vtkheightmapviewer.tcl

    r3554 r3571  
    464464# ----------------------------------------------------------------------
    465465itcl::body Rappture::VtkHeightmapViewer::add {dataobj {settings ""}} {
     466    if { ![$dataobj isvalid] } {
     467        return;                         # Object doesn't contain valid data.
     468    }
    466469    array set params {
    467470        -color auto
     
    613616itcl::body Rappture::VtkHeightmapViewer::scale {args} {
    614617    foreach dataobj $args {
     618        if { ![$dataobj isvalid] } {
     619            continue;                   # Object doesn't contain valid data.
     620        }
    615621        foreach axis { x y } {
    616622            set lim [$dataobj limits $axis]
Note: See TracChangeset for help on using the changeset viewer.