I get the idea from the list archives that profiles are about at the same
level of reliability as the Geometry Manager but the posts are a couple of
years old or more so hoping things may have improved.
I set up a really simple test:
1. Created a label control with its contents set to "Red"
2. In the Property Inspector palette for the label, created a profile named
3. Created a text property of prFrench with the value "Rouge". It ended up
as an htmltext property which is strange - if you don't want me to use
"text" then don't include it in the dropdown list of properties.
4. In the message box: set the profile of selobj() to "prFrench". Nothing
happened, the label still showed "Red" as its contents.
5. Tried the same thing in a preOpenCard handler, same result.
5. Clicked the prFrench profile in the Property Inspector palette and the
label changed to "Rouge". Clicked the Master profile and it changed back
So maybe Profiles are still broken, or maybe I missed a step somewhere?
> I believe you can change any built-in property but I'm just starting to
> learn about profiles so could be wrong.
I gave up trying to figure out profiles a long time ago. They didn't
seem to do what I seemed to think they should do. I think others have
had more success, but more than that I can't say. I do know they're
not for localization, but that's as far as I got.
This communication may be unlawfully collected and stored by the National
Security Agency (NSA) in secret. The parties to this email do not
consent to the retrieving or storing of this communication and any
related metadata, as well as printing, copying, re-transmitting,
disseminating, or otherwise using it. If you believe you have received
this communication in error, please delete it immediately.
Hi to all,
sorry but ... I don't agree ... :D :D :D
Living in Switzerland, I often need to write programs in our national
languages (Italian French and German), plus, obviously, English and I
have always used, not without some minor difficulties, especially with
accented characters on different platforms, "profiles".
To solve these minor problems, where is possible, I have still used the
"htmlText" and not the "text" ... because I see that "htmlText" is
properly managed changing platform. Unfortunately, not for all of the
controls you can use "htmlText", some have only "text".
Normally I define 4 "profiles" ... prItalian, prFrench, prGerman and
pgEnglish and, where is necessary, I set the "htmlText" of the control,
for each one of the profiles, to the correct translation, then ...
retrieved the user local language, I just do:
Unfortunately ... you can't do that for each LiveCode object ...
... e.g. I have not found a simple way of doing this for the "DataGrid
column labels" so ... after changing "profile" I'm obliged to do also:
set the dgProp["column labels"] ...
... for each DataGrid I have to translate the column labels ... but ok
... Is not a big problem ;)
Hope this help,
Mark Wieder wrote:
> Wednesday, April 23, 2014, 4:13:10 PM, you wrote:
>> I believe you can change any built-in property but I'm just starting to
>> learn about profiles so could be wrong.
> I gave up trying to figure out profiles a long time ago. They didn't
> seem to do what I seemed to think they should do. I think others have
> had more success, but more than that I can't say. I do know they're
> not for localization, but that's as far as I got.
Thanks Guglielmo, using that command got things working. For some reason
setting the profile property of the control didn't have any effect.
I think the problem with the datagrid column labels is that they are set
into fields from the custom property dgProps["column labels"] and as far as
I can tell, you can't define custom property values in a profile. It would
be nice if there was a profileChanged message so you could take care of
things like this whenever a profile was changed.
Still not sure how well, if at all, profiles will work with unicode. For
example, the dropdown list of available properties in the Property Profile
tab of the Property Inspector doesn't include any of the
recently-introduced unicodexxxx properties unicodelabel, unicodeText,
unicodeTitle,etc). Maybe the suggestion to use htmltext will take care of