Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Protected property is italics
Message
General information
Forum:
Visual FoxPro
Category:
Object Oriented Programming
Miscellaneous
Thread ID:
00608655
Message ID:
00610597
Views:
26
I added file #10023 to the download section so you could see what I am talking about.

>possible at design time to add new properties and methods to an object already on a form (don't ask me how).

I was really hoping that someone knew how the internals work for this mechanism. I guess only the Fox team at MSFT knows.

Actually, it is possible at runtime to add objects to containers. I don't think it is possible to add PEM's to the object on the form. I really haven't done it myself so I'm going to look into it.

One last note: drag a base class onto a form, like a commandbutton. The parentclass in the property sheet is "None" and the class is "CommandButton". So it is like an instance of the commandbutton class that you can add code to and get the inherited behavior by running DODEFAULT().

Thanks.
-Dave

>The problem I had has been fixed in VFP7!. But they haven't "fixed" your problem. It's a fine line here between an object class and an object instance as others have said. When you drop the object onto the form you aren't really subclassing; even though I believe it is possible at design time to add new properties and methods to an object already on a form (don't ask me how). The form isn't really a subclass either, but it's "real" close. Wave-particle :-)
>David
>
>
>
>>I don't see this (using Vfp 7). When I access it at the same level then I'm ok. Its when I access it in the click method of the command button on the form that I get the property not found.
>>
>>-Dave
>>
>>>No they don't :-), but I agree with Dave now. See my other post. If you create a command button class, and in the click method of the class access a protected property or method of the same class at the same level then drop that button onto a form, the click method fails!
>>>
>>>>Dave & David,
>>>>
>>>>Your two statements completely agree with one another...
>>>>
>>>>>>PMJI,
>>>>>>An object on a form can't access a protected property of the form. Only methods in the form class itself can.
>>>>>>Is that the problem?
>>>>>
>>>>>No. An object on the form cannot access its own protected properties. For example, code inside click method cannot access this.protectedproperty.
>>>>>
>>>>>
>>>>>-Dave
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform