home *** CD-ROM | disk | FTP | other *** search
/ PC World 1997 November / PCWorld_1997-11_cd.bin / software / programy / komix / DATA.Z / corpgvdbob.tcl < prev    next >
Encoding:
Text File  |  1996-07-16  |  2.7 KB  |  108 lines

  1. #---------------------------------------------------------------------------
  2. #
  3. #      (c)     Cadre Technologies Inc.    1996
  4. #
  5. #      File:           @(#)corpgvdbob.tcl    /main/hindenburg/1
  6. #      Author:         <generated>
  7. #      Description:
  8. #---------------------------------------------------------------------------
  9. # SccsId = @(#)corpgvdbob.tcl    /main/hindenburg/1   16 Jul 1996 Copyright 1996 Cadre Technologies Inc.
  10.  
  11. # Start user added include file section
  12. # End user added include file section
  13.  
  14. require "browsdbobj.tcl"
  15.  
  16. Class CorpGVDbObj : {BrowsDbObj CorporateGroupVersion} {
  17.     method destructor
  18.     constructor
  19.     method canBeDragged
  20.     method createTime2String
  21.     method name
  22.     method removeVersion
  23.     method versionInLabel
  24.     method versionName
  25. }
  26.  
  27. method CorpGVDbObj::destructor {this} {
  28.     # Start destructor user section
  29.     # End destructor user section
  30.     $this BrowsDbObj::destructor
  31. }
  32.  
  33. constructor CorpGVDbObj {class this name} {
  34.     set this [CorporateGroupVersion::constructor $class $this $name]
  35.     set this [BrowsDbObj::constructor $class $this $name]
  36.     return $this
  37. }
  38.  
  39. selfPromoter CorporateGroupVersion {this} {
  40.     CorpGVDbObj promote $this
  41. }
  42.  
  43. proc CorpGVDbObj::associations {} {
  44.     return {savedGroupVersion accessRuleSet}
  45. }
  46.  
  47. method CorpGVDbObj::canBeDragged {this} {
  48.     return 1
  49. }
  50.  
  51. proc CorpGVDbObj::childTypes {assoc} {
  52.     if {[lsearch -exact "[CorpGVDbObj::associations]" "$assoc"] == -1} {
  53.     return ""
  54.     }
  55.     return "[BrowserProcs::childTypes $assoc]"
  56. }
  57.  
  58. proc CorpGVDbObj::controlledLists {} {
  59.     return ""
  60. }
  61.  
  62. method CorpGVDbObj::createTime2String {this} {
  63.     return [BrowserProcs::displayDate [$this createTime]]
  64. }
  65.  
  66. proc CorpGVDbObj::infoProperties {} {
  67.     return [concat \
  68.     [BrowserProcs::infoProperties] \
  69.     {Version Comments Created "Controlled Actions"} \
  70.     ]
  71. }
  72.  
  73. method CorpGVDbObj::name {this} {
  74.     return "[[$this corporateGroup] name]"
  75. }
  76.  
  77. method CorpGVDbObj::removeVersion {this} {
  78.     set box $wmttoolObj.removeVersionWarning
  79.     WarningDialog new $box \
  80.     -title "Delete Version Warning" \
  81.     -message [BrowserProcs::removeMessage] \
  82.     -helpPressed {.main helpOnName removeVersionWarning} \
  83.     -cancelPressed {%this delete} \
  84.     -okPressed {
  85.         set script ""
  86.         foreach obj [$wmttoolObj selectedObjSet] {
  87.         if {"$script" != ""} {
  88.             append script " ;"
  89.         }
  90.         append script " [$obj corporateGroup] removeVersion $obj"
  91.         }
  92.         $wmttoolObj startCommand tcl "$script" "" "" {1 0} 1
  93.         %this delete
  94.     }
  95.     $box popUp
  96. }
  97.  
  98. method CorpGVDbObj::versionInLabel {this} {
  99.     return 1
  100. }
  101.  
  102. method CorpGVDbObj::versionName {this} {
  103.     return [$this versionNumber]
  104. }
  105.  
  106. # Do not delete this line -- regeneration end marker
  107.  
  108.