home *** CD-ROM | disk | FTP | other *** search
/ PC World 1997 November / PCWorld_1997-11_cd.bin / software / programy / komix / DATA.Z / corpgvuiob.tcl < prev    next >
Text File  |  1996-05-29  |  3KB  |  98 lines

  1. #---------------------------------------------------------------------------
  2. #
  3. #      (c)     Cadre Technologies Inc.    1996
  4. #
  5. #      File:           @(#)corpgvuiob.tcl    1.9
  6. #      Author:         <generated>
  7. #      Description:
  8. #---------------------------------------------------------------------------
  9. # SccsId = @(#)corpgvuiob.tcl    1.9   16 Feb 1996 Copyright 1996 Cadre Technologies Inc.
  10.  
  11. # Start user added include file section
  12. # End user added include file section
  13.  
  14. require "browsuiobj.tcl"
  15.  
  16. Class CorpGVUiObj : {BrowsUiObj} {
  17.     constructor
  18.     method destructor
  19.     method corporateGroupVersions
  20.     method initializeInfo
  21.     method removeObjects
  22. }
  23.  
  24. global CorpGVUiObj::uiClass
  25. set CorpGVUiObj::uiClass "CorporateGroupVersions"
  26.  
  27.  
  28. constructor CorpGVUiObj {class this name} {
  29.     set this [BrowsUiObj::constructor $class $this $name]
  30.     # Start constructor user section
  31.  
  32.     $this uiName "<corporate groups>"
  33.     $this uiText "corporate group versions"
  34.  
  35.     # End constructor user section
  36.     return $this
  37. }
  38.  
  39. method CorpGVUiObj::destructor {this} {
  40.     # Start destructor user section
  41.     # End destructor user section
  42.     $this BrowsUiObj::destructor
  43. }
  44.  
  45. proc CorpGVUiObj::associations {} {
  46.     return "{corporateGroupVersions}"
  47. }
  48.  
  49. proc CorpGVUiObj::childTypes {assoc} {
  50.     if {[lsearch -exact "[CorpGVUiObj::associations]" "$assoc"] == -1} {
  51.     return ""
  52.     }
  53.     return "[BrowserProcs::childTypes $assoc]"
  54. }
  55.  
  56. method CorpGVUiObj::corporateGroupVersions {this} {
  57.     set corporateGroupVersions ""
  58.     foreach corporateGroup [[$this parent] corporateGroups] {
  59.     set corporateGroupVersions [concat \
  60.         $corporateGroupVersions [$corporateGroup corporateGroupVersions]\
  61.     ]
  62.     }
  63.     return $corporateGroupVersions
  64. }
  65.  
  66. proc CorpGVUiObj::infoProperties {} {
  67.     return [BrowserProcs::infoProperties]
  68. }
  69.  
  70. method CorpGVUiObj::initializeInfo {this dummy} {
  71.     $this BrowsUiObj::initializeInfo $dummy
  72.     $this setInfo Text "[$this uiText] of [[$this parent] getInfo Text]"
  73. }
  74.  
  75. method CorpGVUiObj::removeObjects {this} {
  76.     set box $wmttoolObj.removeWarning
  77.     WarningDialog new $box \
  78.     -title "Delete Warning" \
  79.     -message [BrowserProcs::removeMessage] \
  80.     -helpPressed {.main helpOnName removeWarning} \
  81.     -cancelPressed {%this delete} \
  82.     -okPressed {
  83.         set script ""
  84.         foreach obj [$wmttoolObj selectedObjSet] {
  85.         if {"$script" != ""} {
  86.             append script " ;"
  87.         }
  88.         append script " [$obj corporateGroup] removeVersion $obj"
  89.         }
  90.         $wmttoolObj startCommand tcl "$script" "" "" {1 0} 1
  91.         %this delete
  92.     }
  93.     $box popUp
  94. }
  95.  
  96. # Do not delete this line -- regeneration end marker
  97.  
  98.