Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
BINDEVENT Problem
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
01208571
Message ID:
01210576
Views:
25
Yes, but the hidden object's class would define just the interface, abstract methods. These methods would be implemented by the instanceof the hidden object in the Control class.

>This is the best solution I've heard yet. The only problem is that
>to add methods to the hidden object, it would have to be created
>outside the class and dropped on.
>
>
>
>
>>Then there is no need for BINDEVENT to hidden methods, if you're using a Control control.
>>You could just have an invisible object, as part of your Control class, which would have all the functionality that you'd want to hide. Thus, only the Control and its contained controls could execute methods of the invisible object.
>>
>>>I understand this now, but I'm still no closer to a solution.
>>>
>>>If I were using VB6, I'd be talking about creating an ActiveX
>>>control. I always thought the closest thing we have in VFP is
>>>the Control control.
>>>
>>>I always though that was the point of the Control control - to
>>>package the objects you want in a custom control so that the
>>>programmers cannot mess with them or call internal functionality.
>>>
>>>So how do you create a control that does not expose internal
>>>functionality to the programmers who will use it. The buttons,
>>>textboxes and other objects on the container could be bound
>>>to hidden methods, but there's still nothing stopping someone
>>>from editing the control while its on a form and messing
>>>around with it.
>>>
>>>Anyone?
>>>
>>>
>>>
>>>
>>>
>>>>>I found it.
>>>>>
>>>>>The problem is that I am using a Control control, not a Container
>>>>>control. The objects on a Control seem to be hidden even from
>>>>>within the class.
>>>>
>>>>That's actually the difference between a Control and a Container, by definition.
>>>>
>>>>Tamar
Previous
Reply
Map
View

Click here to load this message in the networking platform