home *** CD-ROM | disk | FTP | other *** search
/ PC World 1997 November / PCWorld_1997-11_cd.bin / software / programy / komix / DATA.Z / htmldocedi.tcl < prev    next >
Text File  |  1996-12-05  |  2KB  |  69 lines

  1. #---------------------------------------------------------------------
  2. #
  3. #      (c)     Cayenne Software, Inc. 1996 
  4. #
  5. #      File:           htmldocedi.tcl
  6. #      Description:    see Document Generation Guide     
  7. #---------------------------------------------------------------------
  8.  
  9. require "doceditor.tcl"
  10.  
  11. Class HtmlDocEditor : {DocEditor} {
  12.     constructor
  13.     method destructor
  14.     method edit
  15.     method show
  16.     method preview
  17. }
  18.  
  19. constructor HtmlDocEditor {class this name} {
  20.     set this [DocEditor::constructor $class $this $name]
  21.     # Start constructor user section
  22.     $this name Html
  23.     $this localSectionTypes "[$this localSectionTypes] Doc Title"
  24.     # End constructor user section
  25.     return $this
  26. }
  27.  
  28. method HtmlDocEditor::destructor {this} {
  29.     # Start destructor user section
  30.     # End destructor user section
  31.     $this DocEditor::destructor
  32. }
  33.  
  34. method HtmlDocEditor::edit {this docSection} {
  35.  
  36.       set cmd "textedit [$docSection docLocation]"
  37.      wmtkmessage "Starting edit for section '[$docSection name]'"
  38.      if {![$docSection execute "$cmd" xtool]} {
  39.          wmtkerror "[$docSection uiName]: edit failed"
  40.      }
  41.      wmtkmessage ""
  42. }
  43.  
  44. method HtmlDocEditor::show {this docSection} {
  45.  
  46.       set cmd "view [$docSection docLocation]"
  47.     
  48.     wmtkmessage "Starting show for section '[$docSection name]'"
  49.     if {![$docSection execute "$cmd" xtool]} {
  50.         wmtkerror "[$docSection uiName]: show failed"
  51.     }
  52.     wmtkmessage ""
  53. }
  54.  
  55. method HtmlDocEditor::preview {this docSection} {
  56.  
  57. wmtkmessage "File location is: [$docSection docLocation]"
  58.       set cmd "netscape file:[$docSection docLocation]"
  59.     
  60.     wmtkmessage "Starting preview for section '[$docSection name]'"
  61.     if {![$docSection execute "$cmd" xtool]} {
  62.         wmtkerror "[$docSection uiName]: preview failed"
  63.     }
  64.     wmtkmessage ""
  65. }
  66.  
  67. # Do not delete this line -- regeneration end marker
  68.  
  69.