Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/haxeui/haxeui-core
Browse files Browse the repository at this point in the history
  • Loading branch information
ianharrigan committed Aug 26, 2024
2 parents 651fa6b + aea9139 commit ac541d2
Show file tree
Hide file tree
Showing 5 changed files with 32 additions and 2 deletions.
1 change: 1 addition & 0 deletions haxe/ui/_module/locale/fr/form-strings.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
form.field.required=Le champs est requis
4 changes: 4 additions & 0 deletions haxe/ui/_module/locale/fr/messagebox-strings.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
messagebox.title.info=Info
messagebox.title.question=Question
messagebox.title.warning=Avertissement
messagebox.title.error=Erreur
14 changes: 12 additions & 2 deletions haxe/ui/components/NumberStepper.hx
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ private class Events extends haxe.ui.events.Events {
_stepper.unregisterEvent(FocusEvent.FOCUS_IN, onFocusIn);
_stepper.unregisterEvent(FocusEvent.FOCUS_OUT, onFocusOut);
_stepper.unregisterEvent(MouseEvent.MOUSE_WHEEL, onMouseWheel);
LocaleManager.instance.unregisterEvent(LocaleEvent.LOCALE_CHANGED, onLocaleChanged);
removeLocaleChanged();

var value:TextField = _stepper.findComponent("value", TextField);
value.unregisterEvent(UIEvent.CHANGE, onValueFieldChange);
Expand All @@ -268,7 +268,17 @@ private class Events extends haxe.ui.events.Events {
inc.unregisterEvent(MouseEvent.CLICK, onInc);
unregisterEvent(ActionEvent.ACTION_START, onActionStart);
}


public override function onDispose() {
// `unregister()` isn't called when the component is disposed,
// so this listener would be left lingering
removeLocaleChanged();
}

private function removeLocaleChanged() {
LocaleManager.instance.unregisterEvent(LocaleEvent.LOCALE_CHANGED, onLocaleChanged);
}

private var _autoCorrectTimer:Timer = null;
private function onValueFieldChange(event:UIEvent) {
if (_stepper.autoCorrect == true) {
Expand Down
11 changes: 11 additions & 0 deletions haxe/ui/module.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@
<resource path="haxeui-core/locale/en/expression-replacements.properties" />
<resource path="haxeui-core/locale/en/std-strings.properties" />
<resource path="haxeui-core/locale/en/formats.properties" />
<resource path="haxeui-core/locale/en/form-strings.properties" />
<resource path="haxeui-core/locale/en/messagebox-strings.properties" />
</locale>
<locale id="en_US">
<resource path="haxeui-core/locale/en_US/formats.properties" />
Expand All @@ -37,12 +39,21 @@
<resource path="haxeui-core/locale/fr/expression-replacements.properties" />
<resource path="haxeui-core/locale/fr/std-strings.properties" />
<resource path="haxeui-core/locale/fr/formats.properties" />
<resource path="haxeui-core/locale/fr/form-strings.properties" />
<resource path="haxeui-core/locale/fr/messagebox-strings.properties" />
</locale>
<locale id="it">
<resource path="haxeui-core/locale/it/expression-replacements.properties" />
<resource path="haxeui-core/locale/it/std-strings.properties" />
<resource path="haxeui-core/locale/it/formats.properties" />
</locale>
<locale id="pt">
<resource path="haxeui-core/locale/pt/expression-replacements.properties" />
<resource path="haxeui-core/locale/pt/std-strings.properties" />
<resource path="haxeui-core/locale/pt/formats.properties" />
<resource path="haxeui-core/locale/pt/form-strings.properties" />
<resource path="haxeui-core/locale/pt/messagebox-strings.properties" />
</locale>
<locale id="ru">
<resource path="haxeui-core/locale/ru/expression-replacements.properties" />
<resource path="haxeui-core/locale/ru/std-strings.properties" />
Expand Down
4 changes: 4 additions & 0 deletions haxe/ui/util/RTTI.hx
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,10 @@ class RTTI {
return _allPropertiesCache.get(cacheKey);
}

if (classInfo == null) {
return null;
}

var entry = classInfo.get(className);
var properties = null;
if (entry != null) {
Expand Down

0 comments on commit ac541d2

Please sign in to comment.