external next up previous contents index
Next: [TECFAMOO] The World-Wide Web Up: [TECFAMOO] ProgrammingWhat's different Previous: 12.3 [TECFAMOO] Blocked Verbs

12.4 [TECFAMOO] Multiownership and controls

   

I would like to ask every programmers to change their code so their verbs DO NOT rely on the existence of the .owner property. Programmers should use the .owners property (yes just one little more s but that make all the difference); the .owners property is a list of objects.

Better than using the .owners property, use the standard security checks:

<foo>:controls(<bar>) => true if <foo> controls <bar>
<foo>:controls_property(<bar>, <prop>) => <foo> controls <bar>.<prop>
<foo>:controls_verb(<bar>, <verb>) => <foo> controls <bar>:<verb>
<foo>:share_owners_with(<bar> => true if one or more of <foo>'s 
                                 owner also controls <bar>.

[e.g. if (foo:share_owners_with(bar)) replaces if (foo.owner == bar.owner)]

If you need to print a nice list of all the owners of <foo>, just use:

              $string_utils:nn(<foo>.owners)

If you want to get a list of all the verbs you need to change, type:

    @grep .owner in me.owned_objects

Please if you have questions, suggestions, comments, need help to fix your code, don't hesitate to mail me (Janus).

P.S. for those who thinks it's rude: do you prefer your verbs to traceback and immediately know where the bug is, or do you prefer to have your verbs behave weirdly and give bad/wrong results? :-)



Daniel K. Schneider
Thu Apr 17 12:43:52 MET DST 1997