Changeset 5097 for trunk


Ignore:
Timestamp:
Mar 8, 2015 1:56:56 AM (5 years ago)
Author:
ldelgass
Message:

Merge fieldresult from 1.4 branch (manually, since changeset included other
unrelated changes)

File:
1 edited

Legend:

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

    r4344 r5097  
    156156# ----------------------------------------------------------------------
    157157itcl::body Rappture::FieldResult::add {dataobj {settings ""}} {
     158    if { ![info exists itk_component(renderer)] } {
     159        puts stderr "add: no renderer created."
     160        return
     161    }
    158162    eval $itk_component(renderer) add $dataobj [list $settings]
    159163}
     
    166170# ----------------------------------------------------------------------
    167171itcl::body Rappture::FieldResult::get {} {
     172    if { ![info exists itk_component(renderer)] } {
     173        puts stderr "get: no renderer created."
     174        return
     175    }
    168176    return [$itk_component(renderer) get]
    169177}
     
    191199# ----------------------------------------------------------------------
    192200itcl::body Rappture::FieldResult::scale {args} {
     201    if { ![info exists itk_component(renderer)] } {
     202        puts stderr "scale: no renderer created."
     203        return
     204    }
    193205    eval $itk_component(renderer) scale $args
    194206}
     
    205217# ----------------------------------------------------------------------
    206218itcl::body Rappture::FieldResult::download {option args} {
     219    if { ![info exists itk_component(renderer)] } {
     220        puts stderr "download: no renderer created."
     221        return
     222    }
    207223    eval $itk_component(renderer) download $option $args
    208224}
    209225
    210226itcl::body Rappture::FieldResult::snap { w h } {
     227    if { ![info exists itk_component(renderer)] } {
     228        puts stderr "snap: no renderer created."
     229        return
     230    }
    211231    return [$itk_component(renderer) snap $w $h]
    212232}
Note: See TracChangeset for help on using the changeset viewer.