home *** CD-ROM | disk | FTP | other *** search
/ PC World 1998 October / PCWorld_1998-10_cd.bin / software / prehled / komix / DATA.Z / reparchpro.tcl < prev    next >
Text File  |  1997-11-28  |  2KB  |  87 lines

  1. #---------------------------------------------------------------------------
  2. #
  3. #      (c)     Cayenne Software Inc.    1997
  4. #
  5. #      File:           @(#)reparchpro.tcl    /main/titanic/6
  6. #      Author:         <generated>
  7. #      Description:
  8. #---------------------------------------------------------------------------
  9. # SccsId = @(#)reparchpro.tcl    /main/titanic/6   28 Nov 1997 Copyright 1997 Cayenne Software Inc.
  10.  
  11. # Start user added include file section
  12. # End user added include file section
  13.  
  14. require "reparchobj.tcl"
  15.  
  16. Class RepArchProjectDialog : {RepArchObjDialog} {
  17.     constructor
  18.     method destructor
  19.     method objType
  20.     method objDescription
  21.     method popUp
  22.     method archive
  23.     method archiveFinished
  24. }
  25.  
  26. constructor RepArchProjectDialog {class this name view} {
  27.     set this [RepArchObjDialog::constructor $class $this $name $view]
  28.     # Start constructor user section
  29.  
  30.         $this config \
  31.             -title "Archive Single Project" \
  32.             -helpPressed "$view helpOnName archiveProject"
  33.  
  34.         [$this dirLabel] text "Project Directory"
  35.  
  36.     # End constructor user section
  37.     return $this
  38. }
  39.  
  40. method RepArchProjectDialog::destructor {this} {
  41.     # Start destructor user section
  42.     # End destructor user section
  43.     $this RepArchObjDialog::destructor
  44. }
  45.  
  46. method RepArchProjectDialog::objType {this} {
  47.     return "Project"
  48. }
  49.  
  50. method RepArchProjectDialog::objDescription {this} {
  51.     return "project '[[$this dirField] text]'"
  52. }
  53.  
  54. method RepArchProjectDialog::popUp {this} {
  55.     $this RepArchObjDialog::popUp
  56. }
  57.  
  58. method RepArchProjectDialog::archive {this} {
  59.     set rep [[$this view] rep]
  60.     set repName [$this currentRepositoryName]
  61.     set repDir [$this currentRepositoryDir]
  62.     set dstFile [[$this dstField] text]
  63.     set objDir [[$this dirField] text]
  64.  
  65.     return [$rep archiveObjectDirectory "$this archiveFinished" \
  66.             $dstFile $repName $repDir $objDir "project"]
  67. }
  68.  
  69. method RepArchProjectDialog::archiveFinished {this exitCode} {
  70.     if {$exitCode == 0} {
  71.         if [catch {
  72.         set proj [$this dumpedObject]
  73.         if ![$proj isNil] {
  74.         $proj online
  75.         }
  76.         } error] {
  77.         $this RepArchObjDialog::archiveFinished 1
  78.             error $error
  79.             return
  80.         }
  81.     }
  82.     $this RepArchObjDialog::archiveFinished $exitCode
  83. }
  84.  
  85. # Do not delete this line -- regeneration end marker
  86.  
  87.