395 |
395 |
396 delayedUpdateContentsInternal |
396 delayedUpdateContentsInternal |
397 "/ For internal use, do not override!!" |
397 "/ For internal use, do not override!!" |
398 contentsValid := false. |
398 contentsValid := false. |
399 windowVisible ifTrue:[ |
399 windowVisible ifTrue:[ |
|
400 self showMessage: (resources string: 'Updating...') after: 200. |
400 self delayedUpdateContents. |
401 self delayedUpdateContents. |
401 ]. |
402 ]. |
402 |
403 |
403 "Created: / 14-02-2019 / 16:43:44 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
404 "Created: / 14-02-2019 / 16:43:44 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
405 "Modified: / 10-06-2019 / 14:09:08 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
404 ! |
406 ! |
405 |
407 |
406 delayedUpdateInternalList |
408 delayedUpdateInternalList |
407 "raise an error: must be redefined in concrete subclass(es)" |
409 "raise an error: must be redefined in concrete subclass(es)" |
408 |
410 |
409 ^ self subclassResponsibility |
411 ^ self subclassResponsibility |
410 ! |
412 ! |
411 |
413 |
412 delayedUpdateInternalListInternal |
414 delayedUpdateInternalListInternal |
413 self delayedUpdateInternalList. |
415 self delayedUpdateInternalList. |
|
416 self hideMessage. |
414 contentsValid := true. |
417 contentsValid := true. |
415 |
418 |
416 "Created: / 14-02-2019 / 16:44:25 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
419 "Created: / 14-02-2019 / 16:44:25 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
420 "Modified: / 10-06-2019 / 14:09:17 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
417 ! |
421 ! |
418 |
422 |
419 delayedUpdateSelection |
423 delayedUpdateSelection |
420 "raise an error: must be redefined in concrete subclass(es)" |
424 "raise an error: must be redefined in concrete subclass(es)" |
421 |
425 |
708 !VDBAbstractListApplication methodsFor:'utilities'! |
712 !VDBAbstractListApplication methodsFor:'utilities'! |
709 |
713 |
710 hideMessage |
714 hideMessage |
711 "Hide any message previously shown by #showMessage:" |
715 "Hide any message previously shown by #showMessage:" |
712 |
716 |
|
717 | timeoutId | |
|
718 |
713 internalMessageView notNil ifTrue:[ |
719 internalMessageView notNil ifTrue:[ |
714 internalMessageView label: ''. |
|
715 internalMessageView beInvisible. |
720 internalMessageView beInvisible. |
|
721 internalMessageTimeoutID notNil ifTrue:[ |
|
722 timeoutId := internalMessageTimeoutID. |
|
723 Processor removeTimeoutWithID: timeoutId. |
|
724 internalMessageTimeoutID := nil. |
|
725 ]. |
716 ] |
726 ] |
717 |
727 |
718 "Created: / 08-06-2019 / 10:09:55 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
728 "Created: / 08-06-2019 / 10:09:55 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
719 ! |
729 "Modified: / 10-06-2019 / 14:07:51 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
720 |
730 ! |
721 showMessage: text |
731 |
722 "Show given message `text` instead of list contents. |
732 showMessage: message |
723 Message `text` is not localized, the caller is responsible |
733 "Show given `message` instead of list contents. To hide |
724 for localization." |
734 the message and show the list again, call #hideMessage. |
|
735 The caller is responsible for localizing `message` text." |
|
736 |
|
737 self showMessage: message after: 0 |
|
738 |
|
739 "Created: / 08-06-2019 / 10:07:35 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
740 "Modified: / 09-06-2019 / 11:12:06 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
741 ! |
|
742 |
|
743 showMessage: text after: milliseconds |
|
744 "Show given `message` instead of list contents. |
|
745 |
|
746 If `milliseconds` is non zero, the message is shown after |
|
747 given time. and if NO OTHER call to #showMessage:after or |
|
748 #hideMessage is made meanwhile. |
|
749 |
|
750 If `milliseconds` is zero, `message` is shown immediately. |
|
751 " |
|
752 | timeoutId | |
725 |
753 |
726 internalMessageView isNil ifTrue:[ |
754 internalMessageView isNil ifTrue:[ |
727 self initializeMessageView. |
755 self initializeMessageView. |
728 ]. |
756 ]. |
|
757 internalMessageTimeoutID notNil ifTrue:[ |
|
758 timeoutId := internalMessageTimeoutID. |
|
759 Processor removeTimeoutWithID: timeoutId. |
|
760 internalMessageTimeoutID := nil. |
|
761 ]. |
|
762 |
729 internalMessageView label: text. |
763 internalMessageView label: text. |
730 internalMessageView beVisible. |
764 |
731 |
765 milliseconds == 0 ifTrue:[ |
732 "Created: / 08-06-2019 / 10:07:35 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
766 internalMessageView beVisible. |
|
767 ] ifFalse:[ |
|
768 internalMessageTimeoutID := |
|
769 Processor |
|
770 addTimedBlock: [ |
|
771 internalMessageTimeoutID := nil. |
|
772 internalMessageView beVisible. |
|
773 ] afterMilliseconds: milliseconds |
|
774 ]. |
|
775 |
|
776 "Created: / 09-06-2019 / 11:00:15 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
777 "Modified: / 10-06-2019 / 14:08:09 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
733 ! ! |
778 ! ! |
734 |
779 |
735 !VDBAbstractListApplication class methodsFor:'documentation'! |
780 !VDBAbstractListApplication class methodsFor:'documentation'! |
736 |
781 |
737 version_HG |
782 version_HG |