home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World 1998 October
/
PCWorld_1998-10_cd.bin
/
software
/
prehled
/
komix
/
DATA.Z
/
readdiagra.tcl
< prev
next >
Wrap
Text File
|
1997-07-23
|
2KB
|
75 lines
#---------------------------------------------------------------------------
#
# (c) Westmount Technology 1994
#
# File: @(#)readdiagra.tcl /main/titanic/2
# Author: <generated>
# Description:
#---------------------------------------------------------------------------
# SccsId = @(#)readdiagra.tcl /main/titanic/2 23 Jul 1997 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 cc [ClientContext::global]
set sysV [$cc currentSystem]
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