home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World 1998 October
/
PCWorld_1998-10_cd.bin
/
software
/
prehled
/
komix
/
DATA.Z
/
wd97docedi.tcl
< prev
next >
Wrap
Text File
|
1997-07-18
|
2KB
|
91 lines
#---------------------------------------------------------------------------
#
# (c) Cayenne Software Inc. 1997
#
# File: @(#)wd97docedi.tcl /main/titanic/1
# Author: <generated>
# Description:
#---------------------------------------------------------------------------
# SccsId = @(#)wd97docedi.tcl /main/titanic/1 18 Jul 1997 Copyright 1997 Cayenne Software Inc.
# Start user added include file section
# End user added include file section
require_module_file "doceditor.tcl" docwriter
Class Wd97DocEditor : {DocEditor} {
constructor
method destructor
method connect
method disconnect
method edit
method show
method print
method preview
attribute app
}
constructor Wd97DocEditor {class this name_1} {
set this [DocEditor::constructor $class $this $name_1]
# Start constructor user section
# End constructor user section
$this printsIncluded y
$this name Wd97
$this version 80
$this localSectionTypes "[$this localSectionTypes] Doc"
# End constructor user section
return $this
}
method Wd97DocEditor::destructor {this} {
# Start destructor user section
# End destructor user section
$this DocEditor::destructor
}
method Wd97DocEditor::connect {this} {
uplevel #0 require wd97automa.tcl
$this app [Wd97AutomationObject new]
}
method Wd97DocEditor::disconnect {this} {
[$this app] Quit
[$this app] delete
}
method Wd97DocEditor::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 Wd97DocEditor::show {this docSection} {
$this edit $docSection
}
method Wd97DocEditor::print {this docSection} {
$this edit $docSection
}
method Wd97DocEditor::preview {this docSection} {
$this edit $docSection
}
# Do not delete this line -- regeneration end marker