Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Extending base control functionality
Message
General information
Forum:
Visual FoxPro
Category:
The Mere Mortals Framework
Miscellaneous
Thread ID:
00636085
Message ID:
00637528
Views:
16
Hi Paul,

>One alternative to doing this would be to create a set of "behavior" classes

Thanks for jumping in again :)

You're right, that would be another option. I've already thought of that way (that's what I called Hook Objects in one of my postings in this thread). Nearly forgot that - thanks that you are bringing this in again!

What do you think about performance? Do you think that checking, if there is a hook object and if yes, passing the event along sevaral objects might affect performance more than having the code in subclasses? IMO this shouldn't have a lot of effect.

I've already seen this architecture in COMCodebook. They have an abstract hook class that has an execute() method. When you need to call the hook, you're calling THIS.oHook.Execute("RightClick"). The hook object then checks if it has a method called RightClick() and calls it, if it's there. Additionally you can configure a hook object, so that it passes the request on in the chain or not. I really liked that architecture (from the theoretical point of view), but there were people saying that this would slow down my application. I've never really tested it ...

Regards,
Armin

Armin Neudert
Regional Director (Stuttgart) of German FoxPro User Group dFPUG

MCP for Visual FoxPro

Expert/Editor of the VFP section in the German Codezone community portal
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform