Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Find out the Class where the property was defined
Message
From
03/01/2006 09:56:55
 
 
To
03/01/2006 09:31:54
Mike Yearwood
Toronto, Ontario, Canada
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Environment versions
Visual FoxPro:
VFP 9
Miscellaneous
Thread ID:
01082552
Message ID:
01082592
Views:
10
>Why? What are you trying to do for your client/business?

Well, here it goes:

It's all about translating the Controls Captions in Run-Time.
I send the translator (the person that will do the translation) a Table with all the captions to be translated. This table has Two Columns: ObjectKey and Translated Text

For example,
If a class defines a Caption, then there will be an entry in the table:

ObjectKey = "MyClassName.Caption"
TranslatedText = "My Text"

If a form (a .SCX) has an object of one Class with the Caption Overridden in the SCX, then there will be another entry in the Table:

ObjectKey = "FormName.ObjectName.Caption"
TranslatedText = "My Other Text"

Now, in Run-Time, during the Init of the Form I have to translate the texts.
So for each object in Each Form, I have to find out if the Caption was defined directly in the form, or if it came from the Object's Class (In order to get the translated text from the translations table). That easy with PEMSTATUS. But if the Caption came from the Class, I don't know from what class it came.

I can't find another way to run-time translate Captions that were defined in Classes. But all ideas will be apreciated.

Thanks
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform