Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Here's an easy one...
Message
 
To
20/06/2001 14:08:05
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00521589
Message ID:
00521598
Views:
14
>Hi All,
>
> Could someone please help me with this? I'm sure the answer is simple, but my brain has gone to sleep and I'd like to catch up with it.
>
> I have an object which stores a reference (in property oEventHandler) to an EventHandler object. I thought I'd hide the oEventHandler property, and allow access to it via a method, GetEventHandler() which just does a
>
>return this.oEventHandler
>

>
> But now when I want to call methods of the EventHandler object ...
>
>
> somevar = this.GetHandler.SomeEventHandlerMethod()
>

> ... I get an "unknown member GETTEVENTHANDLER" error.
>
> Before I go back and change all the references of GetEventHandler() to oEventHandler, is there another way of doing this?
>
>Many thanks,
>Neil

Neil, try to make it not Hidden, but Protected.
"Hacker's Guide" says:
Hidden properties and methods are even more protected than protected ones. Not only can't other objects see them, even subclasses can't see them. Unfortunately, hidden properties and methods can't even be used by methods that are themselves called via :: or DoDefault(). This means that hidden is pretty much useless.
Nick Neklioudov
Universal Thread Consultant
3 times Microsoft MVP - Visual FoxPro

"I have not failed. I've just found 10,000 ways that don't work." - Thomas Edison
Previous
Reply
Map
View

Click here to load this message in the networking platform