diff --git a/Project/Sources/Classes/_EDITOR_Controller.4dm b/Project/Sources/Classes/_EDITOR_Controller.4dm index c0c10c4..665a489 100644 --- a/Project/Sources/Classes/_EDITOR_Controller.4dm +++ b/Project/Sources/Classes/_EDITOR_Controller.4dm @@ -22,6 +22,7 @@ property stringSplitter; lockButton : cs:C1710.button property detail; searchPicker : cs:C1710.subform property fileList; stringList : cs:C1710.listbox property strings; locked; withFile : cs:C1710.group +property spinner : cs:C1710.stepper // MARK: Constants 🔐 property FILE_EXTENSION:=".xlf" @@ -39,6 +40,8 @@ property default; main; resources : Object property groupPtr; resnamePtr; contentPtr : Pointer +property stringListConstraints : cs:C1710.constraints + Class constructor($mainLanguage : Text) // MARK:Delegates 📦 @@ -149,6 +152,23 @@ Function init() // MARK: Search Picker This:C1470.searchPicker:=This:C1470.form.Subform("searchPicker"; {}; This:C1470) + This:C1470.spinner:=This:C1470.form.Stepper("spinner") + + // MARK: Constraints + This:C1470.stringListConstraints:=This:C1470.form.constraints + + This:C1470.stringListConstraints.add({\ + target: "spinner"; \ + type: "horizontal-alignment"; \ + alignment: "center"; \ + reference: "stringList"}) + + This:C1470.stringListConstraints.add({\ + target: "wrap"; \ + type: "horizontal-alignment"; \ + alignment: "center"; \ + reference: "stringList"}) + // === === === === === === === === === === === === === === === === === === === === === === === === Function handleEvents($e : cs:C1710.evt) @@ -206,51 +226,61 @@ Function handleEvents($e : cs:C1710.evt) //______________________________________________________ End case - Else + return - // MARK: Widget Methods - Case of - - //============================================== - : (This:C1470.fileList.catch($e)) - - This:C1470._fileListManager($e) - - //============================================== - : (This:C1470.stringList.catch($e)) - - This:C1470._stringListManager($e) - - //============================================== - : (This:C1470.newFile.catch($e)) - - This:C1470.newFileManager() - - //============================================== - : (This:C1470.newGroup.catch($e)) - - This:C1470.newGroupManager() - - //============================================== - : (This:C1470.newString.catch($e)) - - This:C1470.newStringManager() - - //============================================== - : (This:C1470.lockButton.catch($e)) - - This:C1470.deDuplicateIDs() - - //============================================== - : (This:C1470.stringSplitter.catch($e)) - - This:C1470.strings.center(True:C214) - This:C1470.locked.center(True:C214) - - //============================================== - End case End if + If ($e.objectName="stringSplitter") + + This:C1470.stringListConstraints.apply() + + return + + End if + + // MARK: Widget Methods + Case of + + //============================================== + : (This:C1470.fileList.catch($e)) + + This:C1470._fileListManager($e) + + //============================================== + : (This:C1470.stringList.catch($e)) + + This:C1470._stringListManager($e) + + //============================================== + : (This:C1470.newFile.catch($e)) + + This:C1470.newFileManager() + + //============================================== + : (This:C1470.newGroup.catch($e)) + + This:C1470.newGroupManager() + + //============================================== + : (This:C1470.newString.catch($e)) + + This:C1470.newStringManager() + + //============================================== + : (This:C1470.lockButton.catch($e)) + + This:C1470.deDuplicateIDs() + + //============================================== + : (This:C1470.stringSplitter.catch($e)) + + This:C1470.strings.center(True:C214) + This:C1470.locked.center(True:C214) + + //============================================== + End case + + // === === === === === === === === === === === === === === === === === === === === === === === === Function onLoad() @@ -288,13 +318,13 @@ Function onLoad() borderColor: 0x00C0C0C0\ } + This:C1470.spinner.start(True:C214) + This:C1470.form.refresh() // === === === === === === === === === === === === === === === === === === === === === === === === Function update() - var $c : Collection - If (This:C1470.fileList.item=Null:C1517) && (This:C1470.fileList.rowsNumber>0) // Select last used file @@ -303,7 +333,7 @@ Function update() If ($o#Null:C1517)\ && (Length:C16(String:C10($o.file))>0) - $c:=Form:C1466.files.indices("name = :1"; $o.file) + var $c : Collection:=Form:C1466.files.indices("name = :1"; $o.file) End if @@ -311,7 +341,7 @@ Function update() End if - var $isWritable : Boolean:=Not:C34(Bool:C1537(This:C1470.current.duplicateID)) + var $isWritable:=Not:C34(Bool:C1537(This:C1470.current.duplicateID)) This:C1470.strings.show(This:C1470.current.error=Null:C1517) This:C1470.newString.enable((This:C1470.stringList.item#Null:C1517) & $isWritable) @@ -465,6 +495,8 @@ Function _fileListManager($e : cs:C1710.evt) //______________________________________________________ : ($e.code=On Selection Change:K2:29) + This:C1470.spinner.start(True:C214) + This:C1470.stringList.unselect() This:C1470.stringList.item:=Null:C1517 @@ -1781,6 +1813,8 @@ Function _LOAD_STRINGS() // Reset resname color This:C1470.stringList.resetForegroundColor(2) + This:C1470.spinner.stop(True:C214) + This:C1470.locked.show($main.duplicateID) This:C1470.form.refresh() diff --git a/Project/Sources/Forms/EDITOR/form.4DForm b/Project/Sources/Forms/EDITOR/form.4DForm index 7c72696..08174fb 100755 --- a/Project/Sources/Forms/EDITOR/form.4DForm +++ b/Project/Sources/Forms/EDITOR/form.4DForm @@ -429,15 +429,6 @@ "class": "dev", "style": "flat" }, - "wait": { - "type": "picture", - "top": 170, - "left": 186, - "width": 128, - "height": 128, - "picture": "/RESOURCES/Images/wait.gif", - "visibility": "hidden" - }, "searchPicker": { "type": "subform", "left": 597, @@ -452,6 +443,14 @@ "dataSourceTypeHint": "undefined", "sizingX": "move", "method": "subformWidgetMethod" + }, + "spinner": { + "type": "spinner", + "left": 245, + "top": 105, + "width": 32, + "height": 32, + "visibility": "hidden" } }, "entryOrder": [ @@ -486,15 +485,6 @@ "lockMessage", "lockButton" ] - }, - "wait": { - "visible": false, - "objects": [ - "wait" - ] - }, - "widget": { - "visible": false } } }, @@ -502,7 +492,7 @@ "version": "1", "kind": "form" }, - "geometryStamp": 943, + "geometryStamp": 982, "method": "formMethod", "memorizeGeometry": true } \ No newline at end of file