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

  1. #---------------------------------------------------------------------------
  2. #
  3. #      (c)     Cadre Technologies Inc.    1996
  4. #
  5. #      File:           @(#)clistobj.tcl    1.4
  6. #      Author:         <generated>
  7. #      Description:
  8. #---------------------------------------------------------------------------
  9. # SccsId = @(#)clistobj.tcl    1.4   23 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 "browsdbobj.tcl"
  15.  
  16. Class CListObj : {BrowsDbObj} {
  17.     method destructor
  18.     constructor
  19.     method promoter
  20.     method browserType
  21.     method name
  22.     method getRuleUiObj
  23.     method setRuleUiObj
  24.     method removeRuleUiObj
  25.     attribute RuleUiObj
  26. }
  27.  
  28. method CListObj::destructor {this} {
  29.     # Start destructor user section
  30.     # End destructor user section
  31.     $this BrowsDbObj::destructor
  32. }
  33.  
  34. constructor CListObj {class this name} {
  35.     set this [BrowsDbObj::constructor $class $this $name]
  36.     return $this
  37. }
  38.  
  39. method CListObj::promoter {this} {
  40.     $this BrowsDbObj::promoter
  41.  
  42.     $this RuleUiObj [Dictionary new]
  43. }
  44.  
  45. proc CListObj::associations {} {
  46.     return {rules}
  47. }
  48.  
  49. method CListObj::browserType {this} {
  50.     return "ControlledList"
  51. }
  52.  
  53. proc CListObj::childTypes {assoc} {
  54.     if {[lsearch -exact "[CListObj::associations]" "$assoc"] == -1} {
  55.     return ""
  56.     }
  57.  
  58.     set childTypes [BrowserProcs::childTypes $assoc]
  59.     case "$childTypes" in {
  60.     {AccessRule} {
  61.         return {childRight ownRight}
  62.     }
  63.     {default} {
  64.         return "$childTypes"
  65.     }
  66.     }
  67. }
  68.  
  69. proc CListObj::controlledLists {} {
  70.     return ""
  71. }
  72.  
  73. proc CListObj::infoProperties {} {
  74.     return [concat \
  75.     [BrowserProcs::infoProperties] \
  76.     {"Controlled Actions"} \
  77.     ]
  78. }
  79.  
  80. method CListObj::name {this} {
  81.     return "[[$this controlledClass] name]"
  82. }
  83.  
  84. # Do not delete this line -- regeneration end marker
  85.  
  86. method CListObj::getRuleUiObj {this ruleId} {
  87.     return [[$this RuleUiObj] set $ruleId]
  88. }
  89.  
  90. method CListObj::setRuleUiObj {this ruleId newRuleUiObj} {
  91.     [$this RuleUiObj] set $ruleId $newRuleUiObj
  92. }
  93.  
  94. method CListObj::removeRuleUiObj {this ruleId} {
  95.     [$this RuleUiObj] unset $ruleId
  96. }
  97.  
  98.