added xlatedChoices
authorClaus Gittinger <cg@exept.de>
Tue, 13 Dec 2005 17:51:47 +0100
changeset 1944 f35d2f61f294
parent 1943 ecc231b19955
child 1945 0a43b612f03f
added xlatedChoices
DataSetBuilder.st
--- a/DataSetBuilder.st	Wed Nov 16 17:10:47 2005 +0100
+++ b/DataSetBuilder.st	Tue Dec 13 17:51:47 2005 +0100
@@ -87,6 +87,7 @@
         label
         canSelect
         choices
+        translatedChoices
         editorType
         formatString
         labelIsImage
@@ -339,7 +340,7 @@
 #usePreferredWidth
 'Compute width from first 10 row items.'
 
-#valuesChoiceSelector
+#valuesChoicesSelector
 'Selector to get a collection of choices for a cell having a ComboBox or a ComboList widget.'
 
 #valuesMenuSelector
@@ -357,6 +358,9 @@
 #valuesWriteSelector
 'Selector used to set the value derived from the editor.'
 
+#valuesXChoicesSelector
+'Selector to get a collection of translated choices for a cell having a ComboBox or a ComboList widget.'
+
 )
 ! !
 
@@ -1458,7 +1462,7 @@
           label: 'DataSet Basic'
           name: 'DataSet Basic'
           min: (Point 10 10)
-          bounds: (Rectangle 0 0 436 370)
+          bounds: (Rectangle 0 0 436 387)
         )
         component: 
        (SpecCollection
@@ -1468,7 +1472,7 @@
               name: 'valuesBox'
               layout: (LayoutFrame 0 0.0 3 0 0 1.0 163 0)
               labelPosition: topLeft
-                    translateLabel: true
+              translateLabel: true
               component: 
              (SpecCollection
                 collection: (
@@ -1476,9 +1480,9 @@
                     label: 'Read:'
                     name: 'readLabel'
                     layout: (AlignmentOrigin 94 0 15 0 1 0.5)
+                    translateLabel: true
                     resizeForLabel: true
                     adjust: right
-                    translateLabel: true
                   )
                  (InputFieldSpec
                     name: 'readSelector'
@@ -1497,9 +1501,9 @@
                     label: 'Write:'
                     name: 'writeLabel'
                     layout: (AlignmentOrigin 94 0 40 0 1 0.5)
+                    translateLabel: true
                     resizeForLabel: true
                     adjust: right
-                    translateLabel: true
                   )
                  (InputFieldSpec
                     name: 'writeSelector'
@@ -1518,9 +1522,9 @@
                     label: 'Converter:'
                     name: 'converterLabel'
                     layout: (AlignmentOrigin 94 0 65 0 1 0.5)
+                    translateLabel: true
                     resizeForLabel: true
                     adjust: right
-                    translateLabel: true
                   )
                  (InputFieldSpec
                     name: 'converterField'
@@ -1539,9 +1543,9 @@
                     label: 'Print:'
                     name: 'printLabel'
                     layout: (AlignmentOrigin 94 0 90 0 1 0.5)
+                    translateLabel: true
                     resizeForLabel: true
                     adjust: right
-                    translateLabel: true
                   )
                  (InputFieldSpec
                     name: 'printSelector'
@@ -1560,9 +1564,9 @@
                     label: 'Visibility:'
                     name: 'visibilityLabel'
                     layout: (AlignmentOrigin 94 0 115 0 1 0.5)
+                    translateLabel: true
                     resizeForLabel: true
                     adjust: right
-                    translateLabel: true
                   )
                  (InputFieldSpec
                     name: 'visibilitySelector'
@@ -1583,10 +1587,10 @@
             )
            (FramedBoxSpec
               label: 'Range:'
-              name: 'FramedBox1'
+              name: 'rangeBox'
               layout: (LayoutFrame 0 0.0 162 0 0 1.0 218 0)
               labelPosition: topLeft
-                    translateLabel: true
+              translateLabel: true
               component: 
              (SpecCollection
                 collection: (
@@ -1594,9 +1598,9 @@
                     label: 'Min:'
                     name: 'Label1'
                     layout: (LayoutFrame 11 0 3 0 94 0 20 0)
+                    translateLabel: true
                     resizeForLabel: true
                     adjust: right
-                    translateLabel: true
                   )
                  (InputFieldSpec
                     name: 'EntryField1'
@@ -1616,9 +1620,9 @@
                     label: 'Max:'
                     name: 'Label2'
                     layout: (LayoutFrame 21 0.5 3 0 70 0.5 20 0)
+                    translateLabel: true
                     resizeForLabel: true
                     adjust: right
-                    translateLabel: true
                   )
                  (InputFieldSpec
                     name: 'EntryField2'
@@ -1639,11 +1643,11 @@
               )
             )
            (FramedBoxSpec
-              label: 'Menu:'
+              label: 'Menu Selector:'
               name: 'menusBox'
               layout: (LayoutFrame 0 0.0 216 0 0 1.0 272 0)
               labelPosition: topLeft
-                    translateLabel: true
+              translateLabel: true
               component: 
              (SpecCollection
                 collection: (
@@ -1651,9 +1655,9 @@
                     label: 'Selector:'
                     name: 'menuLabel'
                     layout: (AlignmentOrigin 94 0 12 0 1 0.5)
+                    translateLabel: true
                     resizeForLabel: true
                     adjust: right
-                    translateLabel: true
                   )
                  (InputFieldSpec
                     name: 'menuSelector'
@@ -1674,10 +1678,10 @@
             )
            (FramedBoxSpec
               label: 'Combo List/Box Selectors:'
-              name: 'framedBox1'
-              layout: (LayoutFrame 1 0.0 271 0 1 1.0 356 0)
+              name: 'comboSelectorsBox'
+              layout: (LayoutFrame 1 0.0 271 0 1 1.0 378 0)
               labelPosition: topLeft
-                    translateLabel: true
+              translateLabel: true
               component: 
              (SpecCollection
                 collection: (
@@ -1685,15 +1689,15 @@
                     label: 'Choices:'
                     name: 'ChoicesLabel'
                     layout: (AlignmentOrigin 94 0 15 0 1 0.5)
-                    activeHelpKey: valuesChoiceSelector
+                    activeHelpKey: valuesChoicesSelector
+                    translateLabel: true
                     resizeForLabel: true
                     adjust: right
-                    translateLabel: true
                   )
                  (InputFieldSpec
                     name: 'ChoicesField'
                     layout: (LayoutFrame 97 0 4 0 2 1.0 26 0)
-                    activeHelpKey: valuesChoiceSelector
+                    activeHelpKey: valuesChoicesSelector
                     tabable: true
                     model: choices
                     group: inputGroup
@@ -1705,17 +1709,40 @@
                     acceptOnPointerLeave: false
                   )
                  (LabelSpec
-                    label: 'Editable:'
-                    name: 'ShowInputFieldLabel'
-                    layout: (AlignmentOrigin 94 0 41 0 1 0.5)
-                    activeHelpKey: showComboFieldSelector
+                    label: 'Translated Choices:'
+                    name: 'XChoicesLabel'
+                    layout: (AlignmentOrigin 94 0 40 0 1 0.5)
+                    activeHelpKey: valuesXChoicesSelector
+                    translateLabel: true
                     resizeForLabel: true
                     adjust: right
-                    translateLabel: true
                   )
                  (InputFieldSpec
-                    name: 'ShowInputFieldField'
-                    layout: (LayoutFrame 97 0 30 0 2 1.0 52 0)
+                    name: 'XChoicesField'
+                    layout: (LayoutFrame 97 0 29 0 2 1.0 51 0)
+                    activeHelpKey: valuesXChoicesSelector
+                    tabable: true
+                    model: translatedChoices
+                    group: inputGroup
+                    type: symbolOrNil
+                    acceptOnLeave: false
+                    acceptOnLostFocus: false
+                    acceptChannel: acceptChannel
+                    modifiedChannel: modifiedChannel
+                    acceptOnPointerLeave: false
+                  )
+                 (LabelSpec
+                    label: 'Editable:'
+                    name: 'EditableLabel'
+                    layout: (AlignmentOrigin 94 0 65 0 1 0.5)
+                    activeHelpKey: showComboFieldSelector
+                    translateLabel: true
+                    resizeForLabel: true
+                    adjust: right
+                  )
+                 (InputFieldSpec
+                    name: 'EditableField'
+                    layout: (LayoutFrame 97 0 54 0 2 1.0 76 0)
                     activeHelpKey: showComboFieldSelector
                     tabable: true
                     model: showComboFieldSelector
@@ -3058,7 +3085,7 @@
 
     type == #rowSelector ifTrue:[
         #(label 
-          width minWidth usePreferredWidth editorType choices 
+          width minWidth usePreferredWidth editorType choices translatedChoices
           readSelector writeSelector printSelector visibilitySelector
           formatString type converterSelector size height canSelect selectSelector showComboFieldSelector
           minValue maxValue
@@ -3401,7 +3428,6 @@
 
     hasSaved := true.
     modified := false.
-
 !
 
 openDocumentation