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

  1. #---------------------------------------------------------------------------
  2. #
  3. #      (c)     Cadre Technologies Inc.    1996
  4. #
  5. #      File:           @(#)corpgvuiob.tcl    /main/titanic/3
  6. #      Author:         <generated>
  7. #      Description:
  8. #---------------------------------------------------------------------------
  9. # SccsId = @(#)corpgvuiob.tcl    /main/titanic/3   17 Oct 1997 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.     return [[$this parent] corporateGroupVersions]
  58. }
  59.  
  60. proc CorpGVUiObj::infoProperties {} {
  61.     return [BrowserProcs::infoProperties]
  62. }
  63.  
  64. method CorpGVUiObj::initializeInfo {this dummy} {
  65.     $this BrowsUiObj::initializeInfo $dummy
  66.     $this setInfo Text "[$this uiText] of [[$this parent] getInfo Text]"
  67. }
  68.  
  69. method CorpGVUiObj::removeObjects {this} {
  70.     set box .main.removeWarning
  71.     YesNoWarningDialog new $box \
  72.     -title "Confirm Object Delete" \
  73.     -message [BrowserProcs::removeMessage] \
  74.     -noPressed {%this delete} \
  75.     -yesPressed {
  76.         set script ""
  77.         foreach obj [.main selectedObjSet] {
  78.         if {"$script" != ""} {
  79.             append script " ;"
  80.         }
  81.         append script " [$obj corporateGroup] removeVersion $obj"
  82.         }
  83.         .main startCommand tcl "$script" "" "" {1 0} 1
  84.         %this delete
  85.     }
  86.     $box delCancelButton
  87.     $box popUp
  88. }
  89.  
  90. # Do not delete this line -- regeneration end marker
  91.  
  92.