equal
deleted
inserted
replaced
57 |box| |
57 |box| |
58 |
58 |
59 box := ListSelectionBox new. |
59 box := ListSelectionBox new. |
60 box title:'select something:'. |
60 box title:'select something:'. |
61 box list:#('foo' 'bar' 'baz'). |
61 box list:#('foo' 'bar' 'baz'). |
62 box okAction:[:sel | Transcript showCR:'the selection was:' , sel]. |
62 box okAction:[:sel | Transcript show:'the selection was:' ; showCR:sel]. |
63 box showAtPointer |
63 box showAtPointer |
64 [exEnd] |
64 [exEnd] |
65 |
65 |
66 with index (instead of list-entry) and without an enterField: |
66 with index (instead of list-entry) and without an enterField: |
67 [exBegin] |
67 [exBegin] |
81 |box| |
81 |box| |
82 |
82 |
83 box := ListSelectionBox new. |
83 box := ListSelectionBox new. |
84 box title:'select something:'. |
84 box title:'select something:'. |
85 box list:#('foo' 'bar' 'baz'). |
85 box list:#('foo' 'bar' 'baz'). |
86 box okAction:[:sel | Transcript showCR:'the selection was:' , sel]. |
86 box okAction:[:sel | Transcript show:'the selection was:' ; showCR:sel]. |
87 box initialText:'foo'. |
87 box initialText:'foo'. |
88 box showAtPointer |
88 box showAtPointer |
89 [exEnd] |
89 [exEnd] |
90 |
90 |
91 |
91 |
98 box := ListSelectionBox new. |
98 box := ListSelectionBox new. |
99 box title:'select something:'. |
99 box title:'select something:'. |
100 box list:#('foo' 'bar' 'baz'). |
100 box list:#('foo' 'bar' 'baz'). |
101 box abortText:'close'. |
101 box abortText:'close'. |
102 box okText:'apply'. |
102 box okText:'apply'. |
103 box okAction:[:sel | Transcript showCR:'the selection was:' , sel]. |
103 box okAction:[:sel | Transcript show:'the selection was:' ; showCR:sel]. |
104 box abortAction:[:dummy | box hide]. |
104 box abortAction:[:dummy | box hide]. |
105 box openModeless |
105 box openModeless |
106 [exEnd] |
106 [exEnd] |
107 |
107 |
108 showing fileNames: |
108 showing fileNames: |
110 |box| |
110 |box| |
111 |
111 |
112 box := ListSelectionBox new. |
112 box := ListSelectionBox new. |
113 box title:'select something:'. |
113 box title:'select something:'. |
114 box list:('.' asFilename directoryContents). |
114 box list:('.' asFilename directoryContents). |
115 box okAction:[:sel | Transcript showCR:'the selection was:' , sel]. |
115 box okAction:[:sel | Transcript show:'the selection was:' ; showCR:sel]. |
116 box showAtPointer |
116 box showAtPointer |
117 [exEnd] |
117 [exEnd] |
118 |
118 |
119 |
119 |
120 " |
120 " |
125 title:titleString okText:okText abortText:abortText list:aList action:aBlock |
125 title:titleString okText:okText abortText:abortText list:aList action:aBlock |
126 "create and return a new listSelectionBox with list already defined" |
126 "create and return a new listSelectionBox with list already defined" |
127 |
127 |
128 |newBox| |
128 |newBox| |
129 |
129 |
130 newBox := super title:titleString okText:okText abortText:abortText |
130 newBox := self |
131 action:aBlock. |
131 title:titleString okText:okText abortText:abortText |
132 ^ newBox list:aList |
132 action:aBlock. |
133 ! |
133 newBox list:aList. |
134 |
134 ^ newBox |
135 title:titleString okText:okText abortText:abortText list:aList useIndex:useIndex action:aBlock |
|
136 "create and return a new listSelectionBox with list already defined" |
|
137 |
|
138 |newBox| |
|
139 |
|
140 newBox := self title:titleString okText:okText abortText:abortText action:aBlock. |
|
141 newBox useIndex:useIndex. |
|
142 ^ newBox list:aList |
|
143 ! ! |
135 ! ! |
144 |
136 |
145 !ListSelectionBox class methodsFor:'defaults'! |
137 !ListSelectionBox class methodsFor:'defaults'! |
146 |
138 |
147 defaultExtent |
139 defaultExtent |
419 ! ! |
411 ! ! |
420 |
412 |
421 !ListSelectionBox class methodsFor:'documentation'! |
413 !ListSelectionBox class methodsFor:'documentation'! |
422 |
414 |
423 version |
415 version |
424 ^ '$Header: /cvs/stx/stx/libwidg/ListSelectionBox.st,v 1.49 2002-07-09 11:57:55 cg Exp $' |
416 ^ '$Header: /cvs/stx/stx/libwidg/ListSelectionBox.st,v 1.50 2002-07-09 12:04:52 cg Exp $' |
425 ! ! |
417 ! ! |