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

  1. #---------------------------------------------------------------------------
  2. #
  3. #      (c)     Cayenne Software Inc.    1997
  4. #
  5. #      File:           @(#)newcontinu.tcl    /main/hindenburg/2
  6. #      Author:         <generated>
  7. #      Description:    VCM integration file
  8. #---------------------------------------------------------------------------
  9. # SccsId = @(#)newcontinu.tcl    /main/hindenburg/2   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. require_module_file "newvsfiled.tcl" vcm
  15.  
  16. Class NewContinuusFileDialog : {NewVSFileDialog} {
  17.     constructor
  18.     method destructor
  19.     method createInterface
  20.     method popUpTaskBrowser
  21.     method createVSFile
  22. }
  23.  
  24. constructor NewContinuusFileDialog {class this name} {
  25.     set this [NewVSFileDialog::constructor $class $this $name]
  26.     # Start constructor user section
  27.     # End constructor user section
  28.     return $this
  29. }
  30.  
  31. method NewContinuusFileDialog::destructor {this} {
  32.     # Start destructor user section
  33.     # End destructor user section
  34.     $this NewVSFileDialog::destructor
  35. }
  36.  
  37. method NewContinuusFileDialog::createInterface {this} {
  38.     $this NewVSFileDialog::createInterface
  39.  
  40.     $this title "New Continuus File"
  41.  
  42.     # Add comment part
  43.     interface Label $this.DC.L {
  44.     text "Comment:"
  45.     }
  46.     
  47.     interface MultiLineText $this.DC.comment {
  48.     columnCount 80
  49.     }
  50.  
  51.     # Add comment part, task selection field and select button
  52.     interface DlgRow $this.DC.taskRow {
  53.     spaceType NONE
  54.     Label numberLabel {
  55.         text "Task Number:"
  56.     }
  57.     IntField taskNumber {
  58.         justification CENTER
  59.     }
  60.     PushButton selectTask {
  61.         label "Select Task..."
  62.     }
  63.     }
  64.  
  65.     $this.DC.taskRow.selectTask activated "$this popUpTaskBrowser"
  66. }
  67.  
  68.  
  69. # Callback from task browse button which pops up the Continuus Select Task Dialog.
  70. #
  71. method NewContinuusFileDialog::popUpTaskBrowser {this} {
  72.     busy {
  73.     vsCommandHandler execute [ContCommand::selectTaskDialog]
  74.     }
  75. }
  76.  
  77. method NewContinuusFileDialog::createVSFile {this name type} {
  78.     wmtkmessage "Creating Continuus file '$name'"
  79.  
  80.     vsCommandHandler suspendOutput
  81.     busy {
  82.     set comment [$this.DC.comment text]
  83.     set contSystem [[ClientContext::global] currentSystem]
  84.     set taskNumber [$this.DC.taskRow.taskNumber intValue]
  85.     set contFile [$contSystem createVSFile $name $type "$comment" $taskNumber]
  86.     .main updateView
  87.     }
  88.     wmtkmessage ""
  89.     vsCommandHandler showOutput
  90.  
  91.     return $contFile
  92. }
  93.  
  94. # Do not delete this line -- regeneration end marker
  95.  
  96.