myapp.myproto myapp+myproto1 myapp+myproto2 myapp.myproto+alabel myapp.myproto+abutton ...the best workaround for this for now is to have code in the user proto that avoids initialization anomalies (checks nonexistent alabel, abutton children) and when all done, do a close/reopen of the app to have it initialized correctly -- usually via :doObj('buildCO,'myApp). I will also investigate fixing the sort routine later (though this is messy)
myLocalizationFrame //:myLocalizationFrame() //:SetLocalizationFrame({}) //:setLanguage('English) //:setLanguage('German) //:setLanguage('Japanese) //:LocObj("Introduction", 'introduction) //:LocObj("foo", 'bar) func() :SetLocalizationFrame( {German: { introduction: "Einf\u00FC\uhrung", unknownVal: "Val unbekannt", openLabel: "\u00D6\uffne", }, Japanese: { introduction: "\u305468485185\u", unknownVal: "\u5B5857283057306A3044502430673059\u", openLabel: "\u8D7752D5\u", }, }) ----- init //:init() func() begin :myLocalizationFrame(); :DefConst('kUnknownVal, :LocObj("unknown val", 'unknownVal)); end ----- myApp //:doObj('build, 'myApp) {_proto: protoApp, title: :LocObj("Introduction", 'introduction), } ----- myApp+button {_proto: protoTextButton, viewBounds: RelBounds(20,20,100,14) text: :LocObj("Open", 'openLabel), buttonClickScript: func() :Notify(3, EnsureInternal(title), EnsureInternal(kUnknownVal)), } -----
If you switch languages (or change localization frame), re-init (to redefine constants), re-build (to substitute new strings), e.g., :setLanguage('German); :init(); :doObj('build, 'myApp). For special characters, you will likely need to use unicode sequences. For Japanese to appear properly, you need Japanese ROMs.
There are many features and fixes that would be nice to have. However, there are also design trade-offs, especially given the MessagePad's and my constraints. So, help me figure out:
For example:
Next steps will likely be: