home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World 1998 October
/
PCWorld_1998-10_cd.bin
/
software
/
prehled
/
komix
/
DATA.Z
/
importdiag.tcl
< prev
next >
Wrap
Text File
|
1997-11-21
|
2KB
|
64 lines
#---------------------------------------------------------------------------
#
# (c) Cayenne Software Inc. 1997
#
# File: @(#)importdiag.tcl /main/titanic/2
# Description: Class to import tcl files into ObjectTeam
#
#---------------------------------------------------------------------------
# SccsId = @(#)importdiag.tcl /main/titanic/2 21 Nov 1997 Copyright 1997 Cayenne Software Inc.
if {![lempty [info procs ImportDiagramDialog::doImport]]} {
return
}
require platform.tcl
proc ImportDiagramDialog::doImport {selectedSet} {
set tmpFile [BasicFS::tmpFile]
if {[catch {set fid [open $tmpFile w]} reason]} {
wmtkerror $reason
return
}
foreach file $selectedSet {
# handle file name on MS Windows platform
set fileName [list $file]
puts $fid $fileName
}
close $fid
set script "[m4_path_name bin otsh$EXE_EXT] \
-b import \
-f [m4_path_name tcl importitfe.tcl] \
-- $tmpFile"
.main startCommand mtool $script "" "Starting OTSh..." {1 0} 0
}
proc ImportDiagramDialog::startFileChooser {} {
uplevel #0 {
require classmaker.tcl
}
set box .main.ImportDiagramDialog::fileChooser
if {![isCommand $box]} {
set filter "*.tcl"
if {$win95} {
set filter "TCL Files (*.tcl)|*.tcl|All Files (*.*)|*|"
}
FileChooser new $box \
-directory [M4Login::getHomeDir] \
-selectionPolicy EXTENDED \
-title "Import" \
-filter $filter \
-cancelPressed {%this delete} \
-okPressed {
ImportDiagramDialog::doImport \
[.main.ImportDiagramDialog::fileChooser selectedSet]
}
$box delHelpButton
}
$box popUp
}