Changeset 607 for trunk/gui/scripts
- Timestamp:
- Mar 6, 2007, 12:03:02 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gui/scripts/deviceEditor.tcl
r472 r607 33 33 34 34 private variable _current "" ;# active device editor 35 36 public common _hubvisHosts "" 37 38 public proc setHubvisServer {namelist} { 39 if {[regexp {^[a-zA-Z0-9\.]+:[0-9]+(,[a-zA-Z0-9\.]+:[0-9]+)*$} $namelist match]} { 40 set _hubvisHosts $namelist 41 } else { 42 error "bad visualization server address \"$namelist\": should be host:port,host:port,..." 43 } 44 } 35 45 } 36 46 37 47 itk::usual DeviceEditor { 48 } 49 50 # must use this name -- plugs into Rappture::resources::load 51 proc deviceEditor_init_resources {} { 52 Rappture::resources::register \ 53 hubvis_server Rappture::DeviceEditor::setHubvisServer 38 54 } 39 55 … … 132 148 if {![winfo exists $itk_component(hull).mol]} { 133 149 catch {destroy $itk_component(hull).dev} 134 Rappture::MoleculeViewer $itk_component(hull).mol $this 150 if {"" != $_hubvisHosts} { 151 Rappture::MolvisViewer $itk_component(hull).mol $_hubvisHosts 152 } else { 153 Rappture::MoleculeViewer $itk_component(hull).mol $this 154 } 135 155 pack $itk_component(hull).mol -expand yes -fill both 136 156 }
Note: See TracChangeset
for help on using the changeset viewer.