>>> if type( "This.Behavior.Name") = "C"
>>
>>So Behavior _is_ owned by Parent (This) in HasA relation!
>
>Exactly.
>
>>Call me a vegetable, but again, this I do not understand.
>>
>>But don't forget that Behavior
>>> class has the same hook in its Click method.
>>
>>Recursion ???????
>
>No. All classes have a Behavior property. But that doesn't mean there's only one Behavior object for the whole app at runtime. The whole idea is that we can have A LOT of Behavior classes. And, of course, we can instantiate and use them as we want at runtime. It's extremly flexible and it can be done at runtime.
>
From this I conclude that your Behaviour is not pointed to by a
property! You 'instantiate' kind of when you need it. In my scheme
Behaviour functionality is added at base class level, so you know
it's there, and the maintenance can be inherited...
>We can have Behaviors to modify only the Click method, only MouseMove method, etc. Or Behaviors to modify security rights/levels. Or anything else we can imagine. And we can play with them as we want at RUNTIME.
I fail to see at this stage why I would want to 'modify' these
methods, and at runtime, meaning that the response to an event
would be different depending on a particular state of the program.
Interesting, but not high on my list of priorities (the dyno in me
probably! :)).
>
>For me too. BTW, I just reviewed Steven Black's presentation notes from FoxTeach and he is using the name "Decorator" for Behaviors. I believe his original name is better. Because it's exactly like you would decorate things. You can decorate something that is already decorated, and so on.
>
... and he got that from Pattern theory I think. What's in a
name ... So let's call it the decorator then.
Regards,
Marc
If things have the tendency to go your way, do not worry. It won't last. Jules Renard.