Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Globally Changing a Phrase
Message
De
13/10/2003 09:41:32
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00837151
Message ID:
00838066
Vues:
34
I believe the Menu Designer is going to put quotes around it.
You would need to do this in the generated .mpr, without quotes
e.g.
DEFINE BAR 15 OF maintenanc PROMPT psitran('customer code')
This will work at the initialization of the menu.
psitran needs to be available at menu init.

>Trey,
>
>Perhaps you can help with the phrase replacement in menus?
>Here is an example of what I key into the 'prompt' field psitran('Customer Code').
>The generated code look something like:
>DEFINE BAR 15 OF maintenanc PROMPT "psitran('customer code')"
>The menu displays "psitran ('customer code')".
>If I prefix the psitran with a '=', the menu displays "=psitran ('customer code')".
>
>All help is appreciated.
>TIA.
>
>>>For labels (on forms), couldn't we have the init do a lookup in a table?
>>
>>Yep.
>>
>>>I am aleady using my own message function so I can put the hook in there also.
>>>That leaves 'wait windows', reports and menus.
>>>Can you expand on your comment about reports, please?
>>
>>wait windows -treat like messages
>>menus - not sure what to do with these, except to handle similarly to messages, etc.
>>
>>In reports, the Label control doesn't have an expression associated with it, so you'd need to use a control that does, like a text field. In the Expression field, call a function or prg that returns the value to display, just like you would for the captions in a form.
>>
>>>
>>>>>We are distributing a complied application to multiple clients.
>>>>>One of the clients would like to have all occurances of a particular phrase changed to another phrase. For example, 'Customer Code' should be 'Bill-to Code'.
>>>>>This phrase should be displayed everywhere such as forms, classes, programs, reports, messages, menus, etc.
>>>>>We really would prefer not to maintain a separate project for this client (and any other who wants a similar modification).
>>>>>All suggestions are appreciated.
>>>>>TIA.
>>>>
>>>>For those stored in a table, they should have enough control over the data to make those changes.
>>>>
>>>>For report controls, you can also pull from a table, but you wouldn't be able to use the report label, you'd need to use the text field.
>>>>
>>>>For any others (captions, messages, etc.), these could be put into a lookup table or XML as well. This gives a little overhead, but more flexibility. Many multilingual apps can work this way.
>>>>
>>>>And by using a lookup table, you can allow users to modify labels themselves, if you'd like. [ I'm not sure I would, but it's possible ;) ]
Insanity: Doing the same thing over and over and expecting different results.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform