cg@2588: " cg@2588: COPYRIGHT (c) 2008 by eXept Software AG cg@2588: All Rights Reserved cg@2588: cg@2588: This software is furnished under a license and may be used cg@2588: only in accordance with the terms of that license and with the cg@2588: inclusion of the above copyright notice. This software may not cg@2588: be provided or otherwise made available to, or used by, any cg@2588: other person. No title to or ownership of the software is cg@2588: hereby transferred. cg@2588: " sv@2282: "{ Package: 'stx:libtool2' }" sv@2282: sv@2282: SimpleDialog subclass:#UIListEditor sv@2282: instanceVariableNames:'informationLabel listTextHolder useSymbolsHolder' sv@2282: classVariableNames:'' sv@2282: poolDictionaries:'' sv@2282: category:'Interface-UIPainter' sv@2282: ! sv@2282: cg@2588: !UIListEditor class methodsFor:'documentation'! cg@2588: cg@2588: copyright cg@2588: " cg@2588: COPYRIGHT (c) 2008 by eXept Software AG cg@2588: All Rights Reserved cg@2588: cg@2588: This software is furnished under a license and may be used cg@2588: only in accordance with the terms of that license and with the cg@2588: inclusion of the above copyright notice. This software may not cg@2588: be provided or otherwise made available to, or used by, any cg@2588: other person. No title to or ownership of the software is cg@2588: hereby transferred. cg@2588: " cg@2588: ! ! sv@2282: sv@2282: !UIListEditor class methodsFor:'help specs'! sv@2282: sv@2282: helpSpec sv@2282: "This resource specification was automatically generated sv@2282: by the UIHelpTool of ST/X." sv@2282: sv@2282: "Do not manually edit this!! If it is corrupted, sv@2282: the UIHelpTool may not be able to read the specification." sv@2282: sv@2282: " sv@2282: UIHelpTool openOnClass:UIListEditor sv@2282: " sv@2282: sv@2282: sv@2282: sv@2282: ^ super helpSpec addPairsFrom:#( sv@2282: sv@2282: #useSymbols sv@2282: 'Store list elements as symbols' sv@2282: sv@2282: ) sv@2282: ! ! sv@2282: sv@2282: !UIListEditor class methodsFor:'interface specs'! sv@2282: sv@2282: windowSpec sv@2282: "This resource specification was automatically generated sv@2282: by the UIPainter of ST/X." sv@2282: sv@2282: "Do not manually edit this!! If it is corrupted, sv@2282: the UIPainter may not be able to read the specification." sv@2282: sv@2282: " sv@2282: UIPainter new openOnClass:UIListEditor andSelector:#windowSpec sv@2282: UIListEditor new openInterface:#windowSpec sv@2282: UIListEditor open sv@2282: " sv@2282: sv@2282: sv@2282: sv@2282: ^ sv@2282: #(FullSpec sv@2282: name: windowSpec sv@2282: window: sv@2282: (WindowSpec sv@2282: label: 'Edit List' sv@2282: name: 'Edit List' sv@2282: min: (Point 10 10) sv@2282: bounds: (Rectangle 0 0 354 422) sv@2282: ) sv@2282: component: sv@2282: (SpecCollection sv@2282: collection: ( sv@2282: (LabelSpec sv@2282: name: 'Label1' sv@2282: layout: (LayoutFrame 0 0.0 0 0.0 0 1.0 28 0) sv@2282: translateLabel: true sv@2282: labelChannel: informationLabel sv@2282: ) sv@2282: (TextEditorSpec sv@2282: name: 'TextEditor1' sv@2282: layout: (LayoutFrame 0 0 30 0 0 1 -63 1) sv@2282: model: listTextHolder sv@2282: hasHorizontalScrollBar: true sv@2282: hasVerticalScrollBar: true sv@2282: viewClassName: '' sv@2282: ) sv@2282: (CheckBoxSpec sv@2282: label: 'Use Symbols' sv@2282: name: 'CheckBox1' sv@2282: layout: (LayoutFrame 5 0 368 0 141 0 390 0) sv@2282: activeHelpKey: useSymbols sv@2282: model: useSymbolsHolder sv@2282: translateLabel: true sv@2282: ) sv@2282: (HorizontalPanelViewSpec sv@2282: name: 'HorizontalPanel1' sv@2282: layout: (LayoutFrame 0 0 -33 1 0 1 0 1) sv@2282: horizontalLayout: fitSpace sv@2282: verticalLayout: center sv@2282: horizontalSpace: 3 sv@2282: verticalSpace: 3 sv@2282: component: sv@2282: (SpecCollection sv@2282: collection: ( sv@2282: (ActionButtonSpec sv@2282: label: 'Cancel' sv@2282: name: 'Button1' sv@2282: translateLabel: true sv@2282: model: doCancel sv@2282: extent: (Point 172 22) sv@2282: ) sv@2282: (ActionButtonSpec sv@2282: label: 'OK' sv@2282: name: 'Button2' sv@2282: translateLabel: true sv@2282: model: doAccept sv@2282: isDefault: true sv@2282: extent: (Point 173 22) sv@2282: ) sv@2282: ) sv@2282: sv@2282: ) sv@2282: ) sv@2282: ) sv@2282: sv@2282: ) sv@2282: ) sv@2282: ! ! sv@2282: sv@2282: !UIListEditor methodsFor:'accessing'! sv@2282: sv@2282: informationLabel sv@2282: ^ informationLabel sv@2282: ! sv@2282: sv@2282: informationLabel:something sv@2282: informationLabel := something. sv@2282: ! sv@2282: sv@2282: list sv@2282: "answer the list as an array" sv@2282: sv@2282: |list| sv@2282: sv@2282: list := self listTextHolder value asStringCollection asArray. sv@2282: self useSymbolsHolder value ifTrue:[ sv@2282: list := list collect:[:e| e asSymbol]. sv@2282: ]. sv@2282: sv@2282: ^ list sv@2282: ! sv@2282: sv@2282: list:anArray sv@2282: self listTextHolder value:anArray asStringCollection asString. sv@2282: ! sv@2282: sv@2282: useSymbols:aBoolean sv@2282: self useSymbolsHolder value:aBoolean sv@2282: ! ! sv@2282: sv@2282: !UIListEditor methodsFor:'aspects'! sv@2282: sv@2282: listTextHolder sv@2282: sv@2282: sv@2282: listTextHolder isNil ifTrue:[ sv@2282: listTextHolder := '' asValue. sv@2282: ]. sv@2282: ^ listTextHolder. sv@2282: ! sv@2282: sv@2282: useSymbolsHolder sv@2282: sv@2282: sv@2282: useSymbolsHolder isNil ifTrue:[ sv@2282: useSymbolsHolder := false asValue. sv@2282: ]. sv@2282: ^ useSymbolsHolder. sv@2282: ! ! sv@2282: sv@2282: !UIListEditor class methodsFor:'documentation'! sv@2282: sv@2282: version sv@2282: ^ '$Header$' cg@2588: ! cg@2588: cg@2588: version_CVS cg@2588: ^ '$Header$' sv@2282: ! !