home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World 1997 November
/
PCWorld_1997-11_cd.bin
/
software
/
programy
/
komix
/
DATA.Z
/
wddocedito.tcl
< prev
next >
Wrap
Text File
|
1997-05-23
|
2KB
|
74 lines
#---------------------------------------------------------------------------
#
# (c) Cayenne Software Inc. 1997
#
# File: @(#)wddocedito.tcl /main/hindenburg/1
# Author: <generated>
# Description:
#---------------------------------------------------------------------------
# SccsId = @(#)wddocedito.tcl /main/hindenburg/1 23 May 1997 Copyright 1997 Cayenne Software Inc.
# Start user added include file section
# End user added include file section
require "doceditor.tcl"
Class WdDocEditor : {DocEditor} {
constructor
method destructor
method edit
method show
method print
method preview
}
constructor WdDocEditor {class this name_1} {
set this [DocEditor::constructor $class $this $name_1]
# Start constructor user section
# End constructor user section
$this localSectionTypes "[$this localSectionTypes] Doc"
return $this
}
method WdDocEditor::destructor {this} {
# Start destructor user section
# End destructor user section
$this DocEditor::destructor
}
method WdDocEditor::edit {this docSection} {
# look up winword in the registry
if [catch {
set wwCurVer [registry get HKEY_CLASSES_ROOT \
"Word.Document\\CurVer" "(Default)"]
set wwExe [registry get HKEY_CLASSES_ROOT \
"$wwCurVer\\shell\\open\\command" "(Default)"]
}] {
wmtkerror "[$docSection uiName]: edit failed, Word not found"
return
}
wmtkmessage "Starting edit for section '[$docSection uiName]'"
set cmd [list \
"$wwExe [$docSection docLocation] &" \
[$docSection uiName] \
]
$docSection execute "$cmd"
}
method WdDocEditor::show {this docSection} {
$this edit $docSection
}
method WdDocEditor::print {this docSection} {
$this edit $docSection
}
method WdDocEditor::preview {this docSection} {
$this edit $docSection
}
# Do not delete this line -- regeneration end marker