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

  1. #---------------------------------------------------------------------------
  2. #
  3. #      (c)     Cadre Technologies Inc.    1996
  4. #
  5. #      File:           @(#)rulesuiobj.tcl    1.10
  6. #      Author:         <generated>
  7. #      Description:
  8. #---------------------------------------------------------------------------
  9. # SccsId = @(#)rulesuiobj.tcl    1.10   26 Jan 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 RulesUiObj : {BrowsUiObj} {
  17.     constructor
  18.     method destructor
  19.     method initializeInfo
  20.     method getRuleUiObj
  21.     method setRuleUiObj
  22.     method removeRuleUiObj
  23.     attribute RuleUiObj
  24. }
  25.  
  26. global RulesUiObj::uiClass
  27. set RulesUiObj::uiClass "AccessRules"
  28.  
  29.  
  30. constructor RulesUiObj {class this name} {
  31.     set this [BrowsUiObj::constructor $class $this $name]
  32.     $this RuleUiObj [Dictionary new]
  33.     # Start constructor user section
  34.  
  35.     $this uiName "<access rules>"
  36.     $this uiText "access rules"
  37.  
  38.     # End constructor user section
  39.     return $this
  40. }
  41.  
  42. method RulesUiObj::destructor {this} {
  43.     # Start destructor user section
  44.     # End destructor user section
  45.     $this BrowsUiObj::destructor
  46. }
  47.  
  48. proc RulesUiObj::associations {} {
  49.     return {rules}
  50. }
  51.  
  52. proc RulesUiObj::childTypes {assoc} {
  53.     if {[lsearch -exact "[RulesUiObj::associations]" "$assoc"] == -1} {
  54.     return ""
  55.     }
  56.  
  57.     set childTypes [BrowserProcs::childTypes $assoc]
  58.     case "$childTypes" in {
  59.     {AccessRule} {
  60.         return {ownRight}
  61.     }
  62.     {default} {
  63.         return "$childTypes"
  64.     }
  65.     }
  66. }
  67.  
  68. proc RulesUiObj::infoProperties {} {
  69.     return [BrowserProcs::infoProperties]
  70. }
  71.  
  72. method RulesUiObj::initializeInfo {this dummy} {
  73.     $this BrowsUiObj::initializeInfo $dummy
  74.     $this setInfo Text "[$this uiText] on [[$this parent] getInfo Text]"
  75. }
  76.  
  77. # Do not delete this line -- regeneration end marker
  78.  
  79. method RulesUiObj::getRuleUiObj {this ruleId} {
  80.     return [[$this RuleUiObj] set $ruleId]
  81. }
  82.  
  83. method RulesUiObj::setRuleUiObj {this ruleId newRuleUiObj} {
  84.     [$this RuleUiObj] set $ruleId $newRuleUiObj
  85. }
  86.  
  87. method RulesUiObj::removeRuleUiObj {this ruleId} {
  88.     [$this RuleUiObj] unset $ruleId
  89. }
  90.  
  91.