home *** CD-ROM | disk | FTP | other *** search
/ PC World 1997 November / PCWorld_1997-11_cd.bin / software / programy / komix / DATA.Z / ccnewbranch.tcl < prev    next >
Text File  |  1997-03-18  |  2KB  |  72 lines

  1. #---------------------------------------------------------------------------
  2. #
  3. #      (c)     Cayenne Software Inc.    1997
  4. #
  5. #      File:           @(#)ccnewbranch.tcl    /main/hindenburg/3
  6. #      Author:         <generated>
  7. #      Description:    VCM integration file
  8. #---------------------------------------------------------------------------
  9. # SccsId = @(#)ccnewbranch.tcl    /main/hindenburg/3   18 Mar 1997 Copyright 1997 Cayenne Software Inc.
  10.  
  11. # Start user added include file section
  12. # End user added include file section
  13.  
  14.  
  15. # This dialog permits to specify the name
  16. # and creation comments for a new branch.
  17. # If OK is pressed the branch is created in vobPath.
  18.  
  19. Class CCNewBranchDialog : {TemplateDialog} {
  20.     constructor
  21.     method destructor
  22.     method createInterface
  23.     attribute vobPath
  24. }
  25.  
  26. constructor CCNewBranchDialog {class this name} {
  27.     set this [TemplateDialog::constructor $class $this $name]
  28.     # Start constructor user section
  29.         $this createInterface
  30.     # End constructor user section
  31.     return $this
  32. }
  33.  
  34. method CCNewBranchDialog::destructor {this} {
  35.     # Start destructor user section
  36.     # End destructor user section
  37. }
  38.  
  39. method CCNewBranchDialog::createInterface {this} {
  40.     interface DlgColumn $this.column {
  41.     Label label1 {
  42.         text "Name of new branch:"
  43.     }
  44.     SingleLineText branch {
  45.     }
  46.     Label label2 {
  47.         text "Creation comments:"
  48.     }
  49.     MultiLineText comments {
  50.     }
  51.     }
  52.  
  53.     $this title "Create Branch Type"
  54.     $this modal 1
  55.     $this delHelpButton
  56.  
  57.     $this okPressed {
  58.     busy {
  59.         set vob [%this vobPath]
  60.         set type [%this.column.branch text]
  61.         set comment [%this.column.comments text]
  62.         set createCommand [CCCommand::newBranchType $type $comment $vob]
  63.         if [vsCommandHandler execute $createCommand] {
  64.         %this delete
  65.         }
  66.     }
  67.     }
  68.  
  69. }
  70.  
  71. # Do not delete this line -- regeneration end marker
  72.