Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Find out the Class where the property was defined
Message
De
03/01/2006 10:20:57
Mike Yearwood
Toronto, Ontario, Canada
 
 
À
03/01/2006 09:56:55
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Versions des environnements
Visual FoxPro:
VFP 9
Divers
Thread ID:
01082552
Message ID:
01082607
Vues:
12
>>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.
>
In the init of objects with a caption call a function to translate and set the caption. Have this function always fire, even for the native language, that will keep the performance consistent. This is a very popular product: http://www.stevenblack.com/intl%205.asp
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform