home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World 1997 November
/
PCWorld_1997-11_cd.bin
/
software
/
programy
/
komix
/
DATA.Z
/
vssysdialo.tcl
< prev
next >
Wrap
Text File
|
1997-03-18
|
2KB
|
96 lines
#---------------------------------------------------------------------------
#
# (c) Cayenne Software Inc. 1997
#
# File: @(#)vssysdialo.tcl /main/hindenburg/3
# Author: <generated>
# Description: VCM integration file
#---------------------------------------------------------------------------
# SccsId = @(#)vssysdialo.tcl /main/hindenburg/3 18 Mar 1997 Copyright 1997 Cayenne Software Inc.
# Start user added include file section
# End user added include file section
# This class provides basic functionality for dialogs that result
# in VS files being processed.
Class VSSysDialog : {Object} {
constructor
method destructor
method processFiles
method selectionDescription
# Indicates whether the browser view must be updated after this action.
#
attribute needsUpdate
# The selected files.
#
attribute selectedFiles
# This script is evaluated for each selected file.
#
attribute vsMethod
}
constructor VSSysDialog {class this name} {
set this [Object::constructor $class $this $name]
$this needsUpdate 1
# Start constructor user section
# End constructor user section
return $this
}
method VSSysDialog::destructor {this} {
# Start destructor user section
# End destructor user section
}
# Process the selected files: evaluate vsMethod for
# each selectedFile.
#
method VSSysDialog::processFiles {this} {
busy {
vsCommandHandler suspendOutput
set allOk 1
set someOk 0
foreach file [$this selectedFiles] {
if { ![eval [$this vsMethod]] } {
set allOk 0
break
}
set someOk 1
}
vsCommandHandler showOutput
if { [$this needsUpdate] && $someOk } {
.main updateView
}
wmtkmessage ""
# if there were no errors delete the dialog
if $allOk {
$this delete
}
}
}
# Return description of the selected files.
#
method VSSysDialog::selectionDescription {this} {
if { [llength [$this selectedFiles]] > 1 } {
return "selected objects"
}
set selectedFile [lindex [$this selectedFiles] 0]
return [path_name file [$selectedFile path]]
}
# Do not delete this line -- regeneration end marker