[fpc-pascal] type of resourcestrings
Michael Van Canneyt
michael.vancanneyt at wisa.be
Wed Apr 6 16:59:15 CEST 2005
On Wed, 6 Apr 2005, Marc Santhoff wrote:
> Am Mi, den 06.04.2005 schrieb Michael Van Canneyt um 16:36:
>> On Wed, 6 Apr 2005, Marc Santhoff wrote:
>>
>>> Hi,
>>>
>>> when defining resourcestrings the definition looks like this:
>>>
>>> mystring = 'anything';
>>>
>>> A typed definition is not allowed:
>>>
>>> mystring: AnsiString = 'anything';
>>>
>>> gives an error.
>>
>> It should. A typed definition would imply that you can set it at
>> runtime, which is not the case. (At least, not without the special API
>> for it)
>
> Setting at runtime is my intention, I'm localizing GUI strings ... what
> I don't understand is: Is this a compiler error or a logical clue, it
> should work but cannot because the API you mentioned is missing?
No, you must use the specialized API. For an example, see the 'gettext'
unit provided in FPC. The needed low-level functions are in the 'objpas'
unit, and are documented.
Michael.
More information about the fpc-pascal
mailing list