home *** CD-ROM | disk | FTP | other *** search
- #---------------------------------------------------------------------------
- #
- # (c) Westmount Technology 1994
- #
- # File: @(#)readdiagra.tcl /main/hindenburg/1
- # Author: <generated>
- # Description:
- #---------------------------------------------------------------------------
- # SccsId = @(#)readdiagra.tcl /main/hindenburg/1 17 Sep 1996 Copyright 1994 Westmount Technology
-
- # Start user added include file section
- # End user added include file section
-
-
- Class ReadDiagram : {ListDialog} {
- constructor
- method destructor
- method popUp
- method handleOk
- attribute filevList
- attribute fileNameList
- attribute editor
- }
-
- constructor ReadDiagram {class this name} {
- set this [ListDialog::constructor $class $this $name]
- # Start constructor user section
- $this config -okPressed {%this handleOk} \
- -helpPressed {.main helpOnName selectOne} \
- -selectionPolicy BROWSE \
- -rowCount 10 \
- -message "Select diagram to read:" \
- -title "Read Diagram"
- # End constructor user section
- return $this
- }
-
- method ReadDiagram::destructor {this} {
- # Start destructor user section
- # End destructor user section
- }
-
- method ReadDiagram::popUp {this} {
- set ed [$this editor]
- set sysV [$ed systemVersion]
- set type [$ed diagramType]
- set fileVersions [$sysV localFileVersions]
- set myTypeFileList ""
- set myTypeNameList ""
- foreach fv $fileVersions {
- if {[[$fv file] type] == "$type"} {
- lappend myTypeFileList $fv
- lappend myTypeNameList [[$fv file] qualifiedName :]
- }
- }
- $this filevList $myTypeFileList
- $this fileNameList $myTypeNameList
- $this entrySet [lsort $myTypeNameList]
- $this ListDialog::popUp
- }
-
- method ReadDiagram::handleOk {this} {
- set index [lsearch -exact \
- [$this fileNameList] [lindex [$this selectedSet] 0]]
- if {$index == -1} {
- return
- } else {
- [$this editor] doRead [lindex [$this filevList] $index]
- }
- }
-
- # Do not delete this line -- regeneration end marker
-
-