Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
'This.Parent.Property' resolution
Message
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Miscellaneous
Thread ID:
00622707
Message ID:
00622734
Views:
26
>>>>>Add an assign method to the cCaption property and set the caption of the label in this method.
>>>>>
>>>>>You can also add "this.cCaption=this.cCaption" in the init() of the container (IOW force the assing method).
>>>
>>>I tried that, but I still get the base class value at design time.
>>
>>That was a normal behaviour, the code was not interpreted until run time.
>>If that bug you, you can create a builder for your class :-)
>
>OK, thanks, I guess I can just use the workaround. The behaviour I'm getting didn't bother me a whole lot ... but it did bother someone else who likes to be able to see what he's working on.

A builder can be a really simple thing.
Put this code in a prg and run it from the command window after selecting your class on the form at design time.
*change label1 and myContainerClass to the actual name before using this :-)
IF ASELOBJ(selection)>0 && test for the creation of the array
   IF selection[1].baseclass="myContainerClass"
       selection[1].label1.caption=selection[1].cCaption
   ENDIF
ENDIF
HTH :-)
If we exchange an apple, we both get an apple.
But if we exchange an idea, we both get 2 ideas, cool...


Gérald Santerre
Independant programmer - internet or intranet stuff - always looking for contracts big or small :)
http://www.siteintranet.qc.ca
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform