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

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