home *** CD-ROM | disk | FTP | other *** search
/ PC World 1997 November / PCWorld_1997-11_cd.bin / software / programy / komix / DATA.Z / edcontrolp.tcl < prev    next >
Encoding:
Text File  |  1996-05-29  |  1.6 KB  |  65 lines

  1. #---------------------------------------------------------------------------
  2. #
  3. #      (c)     Westmount Technology    1994
  4. #
  5. #      File:           @(#)edcontrolp.tcl    1.6
  6. #      Author:         <generated>
  7. #      Description:
  8. #---------------------------------------------------------------------------
  9. # SccsId = @(#)edcontrolp.tcl    1.6   21 Nov 1995 Copyright 1994 Westmount Technology
  10.  
  11. # Start user added include file section
  12. # End user added include file section
  13.  
  14.  
  15. Class EdControlPanel : {VerControlPanel} {
  16.     constructor
  17.     method destructor
  18.     method initialize
  19.     method initPanel
  20.     attribute area
  21. }
  22.  
  23. constructor EdControlPanel {class this name} {
  24.     set this [VerControlPanel::constructor $class $this $name]
  25.     # Start constructor user section
  26.  
  27.     $this selectionChanged {[%this area] currentSymbol [%this selected]}
  28.  
  29.     # End constructor user section
  30.     return $this
  31. }
  32.  
  33. method EdControlPanel::destructor {this} {
  34.     # Start destructor user section
  35.     # End destructor user section
  36. }
  37.  
  38. method EdControlPanel::initialize {this edType} {
  39.  
  40.     eval "proc registerObject {spec} {$this initPanel \$spec}"
  41.  
  42.     set userPath [path_name concat [path_name concat ~ icase] $edType.pnl]
  43.     if [file exists $userPath] {
  44.         source $userPath
  45.     } else {
  46.         set tmpFile [args_file {}]
  47.         [ClientContext::global] downLoadCustomFile $edType pnl \
  48.             etc $tmpFile
  49.         source $tmpFile
  50.         unlink $tmpFile
  51.     }
  52. }
  53.  
  54. method EdControlPanel::initPanel {this spec} {
  55.  
  56.     while {![lempty $spec]} {
  57.         set key [lvarpop spec]
  58.         set value [lvarpop spec]
  59.         $this $key $value
  60.     }
  61. }
  62.  
  63. # Do not delete this line -- regeneration end marker
  64.  
  65.