4511 " |
4511 " |
4512 |
4512 |
4513 "Modified: / 02-03-2007 / 12:08:02 / cg" |
4513 "Modified: / 02-03-2007 / 12:08:02 / cg" |
4514 ! |
4514 ! |
4515 |
4515 |
|
4516 choose:aString fromList:list values:listValues buttons:buttonLabels values:buttonValues lines:maxLines cancel:cancelBlock postBuildBlock:postBuildBlock |
|
4517 "launch a Dialog showing the message and list. |
|
4518 The user can select an item and click ok; in this case, the corresponding value |
|
4519 from listValues is returned (doubleclick works as well). |
|
4520 The list may be suppressed (if the list arg is nil). |
|
4521 Below the list, an optional row of buttons is shown, which can also be |
|
4522 clicked upon, and a corresponding value from buttonValues is returned. |
|
4523 If cancel is pressed, the value of cancelBlock is returned. |
|
4524 Pressing ok without a selection is treated like cancel." |
|
4525 |
|
4526 ^ self |
|
4527 choose:aString |
|
4528 fromList:list values:listValues |
|
4529 buttons:buttonLabels values:buttonValues |
|
4530 lines:maxLines |
|
4531 cancel:cancelBlock |
|
4532 multiple:false |
|
4533 postBuildBlock:postBuildBlock. |
|
4534 |
|
4535 |
|
4536 " |
|
4537 full example: |
|
4538 |
|
4539 Transcript showCR:( |
|
4540 Dialog |
|
4541 choose:'choose any' |
|
4542 fromList:#('one' 'two' 'three' 'four') |
|
4543 values:#(1 2 3 4) |
|
4544 buttons:#('five' 'six' 'seven') |
|
4545 values:#(5 6 7) |
|
4546 lines:10 |
|
4547 cancel:nil |
|
4548 ) |
|
4549 |
|
4550 |
|
4551 no buttons: |
|
4552 |
|
4553 Transcript showCR:( |
|
4554 Dialog |
|
4555 choose:'choose any' |
|
4556 fromList:#('one' 'two' 'three' 'four') |
|
4557 values:#(1 2 3 4) |
|
4558 buttons:nil |
|
4559 values:nil |
|
4560 lines:4 |
|
4561 cancel:nil |
|
4562 ) |
|
4563 |
|
4564 |
|
4565 no list (lines argument is ignored): |
|
4566 |
|
4567 Transcript showCR:( |
|
4568 Dialog |
|
4569 choose:'choose any' |
|
4570 fromList:nil |
|
4571 values:nil |
|
4572 buttons:#('one' 'two' 'three' 'four') |
|
4573 values:#(1 2 3 4) |
|
4574 lines:nil |
|
4575 cancel:nil |
|
4576 ) |
|
4577 |
|
4578 |
|
4579 full including cancel value: |
|
4580 |
|
4581 Transcript showCR:( |
|
4582 Dialog |
|
4583 choose:'choose example' |
|
4584 fromList:#('one' 'two' 'three' 'four') |
|
4585 values:#(1 2 3 4) |
|
4586 buttons:#('five' 'six' 'seven') |
|
4587 values:#(5 6 7) |
|
4588 lines:4 |
|
4589 cancel:[Transcript flash. #aborted] |
|
4590 ) |
|
4591 |
|
4592 |
|
4593 degenerated: |
|
4594 |
|
4595 Transcript showCR:( |
|
4596 Dialog |
|
4597 choose:'choose any' |
|
4598 fromList:nil |
|
4599 values:nil |
|
4600 buttons:nil |
|
4601 values:nil |
|
4602 lines:nil |
|
4603 cancel:nil |
|
4604 ) |
|
4605 |
|
4606 |
|
4607 " |
|
4608 |
|
4609 "Modified: / 02-03-2007 / 12:08:12 / cg" |
|
4610 ! |
|
4611 |
4516 choose:aString fromList:list values:listValues initialSelection:initialListSelectionOrNil buttons:buttonLabels values:buttonValues default:defaultValue lines:maxLines cancel:cancelBlock multiple:multiple postBuildBlock:aBlockOrNil |
4612 choose:aString fromList:list values:listValues initialSelection:initialListSelectionOrNil buttons:buttonLabels values:buttonValues default:defaultValue lines:maxLines cancel:cancelBlock multiple:multiple postBuildBlock:aBlockOrNil |
4517 "launch a Dialog showing the message and list. |
4613 "launch a Dialog showing the message and list. |
4518 The user can select an item and click ok; in this case, the corresponding value |
4614 The user can select an item and click ok; in this case, the corresponding value |
4519 from listValues is returned (doubleclick works as well). |
4615 from listValues is returned (doubleclick works as well). |
4520 The list may be suppressed (if the list arg is nil). |
4616 The list may be suppressed (if the list arg is nil). |