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

  1. #---------------------------------------------------------------------------
  2. #
  3. #      (c)     Cayenne Software Inc.    1997
  4. #
  5. #      File:           @(#)ccremovebr.tcl    /main/titanic/3
  6. #      Author:         <generated>
  7. #      Description:
  8. #---------------------------------------------------------------------------
  9. # SccsId = @(#)ccremovebr.tcl    /main/titanic/3   21 May 1997 Copyright 1997 Cayenne Software Inc.
  10.  
  11. # Start user added include file section
  12. # End user added include file section
  13.  
  14.  
  15. # Dialog for removal of branch types: a list,
  16. # selected branch type(s) are removed from vob.
  17.  
  18. Class CCRemoveBranchTypeDialog : {ListDialog} {
  19.     constructor
  20.     method destructor
  21.     method createInterface
  22.     method popUp
  23.     attribute branches
  24.     attribute vobPath
  25. }
  26.  
  27. constructor CCRemoveBranchTypeDialog {class this name} {
  28.     set this [ListDialog::constructor $class $this $name]
  29.     # Start constructor user section
  30.     $this createInterface
  31.     # End constructor user section
  32.     return $this
  33. }
  34.  
  35. method CCRemoveBranchTypeDialog::destructor {this} {
  36.     # Start destructor user section
  37.     # End destructor user section
  38. }
  39.  
  40. method CCRemoveBranchTypeDialog::createInterface {this} {
  41.     $this title "Remove Branch Type"
  42.     $this modal 1
  43.     $this delHelpButton
  44.  
  45.     $this selectionPolicy MULTIPLE
  46.  
  47.     $this message "Select branch(es):"
  48.  
  49.     $this okPressed {
  50.     busy {
  51.             set vob [%this vobPath]
  52.             %this popDown
  53.         vsCommandHandler suspendOutput
  54.         set ok 1
  55.         foreach type [%this selectedSet] {
  56.         set removeCommand [CCCommand::destroyBranchType $type $vob]
  57.         if { ![vsCommandHandler execute $removeCommand] } {
  58.             set ok 0
  59.             break
  60.         }
  61.         }
  62.         vsCommandHandler showOutput
  63.  
  64.         if $ok {
  65.         %this delete
  66.         }
  67.         }
  68.     }
  69. }
  70.  
  71. method CCRemoveBranchTypeDialog::popUp {this} {
  72.     $this entrySet [$this branches]
  73.     $this ListDialog::popUp
  74. }
  75.  
  76. # Do not delete this line -- regeneration end marker
  77.  
  78.