|
Hey all - I've written myself a small I18N translation "framework" of
sorts and have a few issues I was hoping some more knowledgeable peeps
here could help me with...
First just a brief on the system.
I have a StringsFactory class which simply reads a file and populates a
Dictionary mapping keys to strings.
I've created subclasses of GroupBox, CheckBox, PushButton, StaticText,
Menu, MenuCommandItem etc. etc. which add a key variable, publish the
aspect, and hide the "text" or "description" aspects.
In these classes I've also redefined the getter of text/description to
return a the result of the key lookup in via the StringsFactory.
This all seems to work fine when running inside the environment, but
when running from an exported EXE, nothing seems get updated.
The StringsFactory caches the file contents and only reloads it if the
dictionary doesn't exist, the dictionary and access methods are class
methods on StringsFactory.
I don't have the code in front of me so can't check anything, but I've
just had a thought that maybe when I export to an EXE the dictionary
variable is being saved as being populated, so is never updated.
Does this sound probably? (I'm sure it'll take me less than 30 seconds
to confirm/deny this the moment I get to the office, but I thought I'd
still post this post anyway)....
I guess the ultimate question here is - when exporting to an executable,
is the state of class variables saved along with the class?
Mark
|