[squeak-dev] The Inbox: Monticello-ct.712.mcz

Thiede, Christoph Christoph.Thiede at student.hpi.uni-potsdam.de
Wed Jan 15 08:12:59 UTC 2020


(Just merging two threads ... :-))

Hi Jakob,

yes, this is what I also mentioned in the other thread (attached below). I don't like the fact that at the moment, you may evaluate any code that raises an error and kills the modal loop.
You proposed using a promise - I never had the pleasure to meet them until today. Maybe you have a minimum working example for demonstrating your proposal? FutureNodes seem to be used very rarely in Trunk :-)

My first idea would have been something like this:
[cid:eabb82ba-b08e-4a53-a681-8e91695658a7]
Of course, a semaphore might be better than the [Processor yield] doWhileTrue: ...
Model could override #windowIsClosing for signaling such a semaphore.

Best,
Christoph

________________________________
Von: Squeak-dev <squeak-dev-bounces at lists.squeakfoundation.org> im Auftrag von Jakob Reschke <forums.jakob at resfarm.de>
Gesendet: Mittwoch, 15. Januar 2020 08:00 Uhr
An: squeak-dev at lists.squeakfoundation.org
Betreff: Re: [squeak-dev] The Inbox: Monticello-ct.712.mcz

Okay for the time being and certainly not worse.

But eventually these dialogs ought to send a message when they are accepted, to continue the workflow.

<commits at source.squeak.org<mailto:commits at source.squeak.org>> schrieb am Di., 14. Jan. 2020, 13:58:
Christoph Thiede uploaded a new version of Monticello to project The Inbox:
http://source.squeak.org/inbox/Monticello-ct.712.mcz

==================== Summary ====================

Name: Monticello-ct.712
Author: ct
Time: 14 January 2020, 1:58:10.168813 pm
UUID: c048116c-f5ca-8c4d-adab-34d19467565a
Ancestors: Monticello-cmm.708

Reuse ToolBuilder utility in MCTool >> #showModally

=============== Diff against Monticello-cmm.708 ===============

Item was changed:
  ----- Method: MCTool>>showModally (in category 'morphic ui') -----
  showModally
        modalProcess := Processor activeProcess.
        self window openInWorldExtent: self defaultExtent.
+       ToolBuilder default runModal: self window.
-       [self window world notNil] whileTrue: [
-               self window outermostWorldMorph doOneCycle.
-       ].
        morph := nil.
        ^ modalValue!



________________________________
Von: Squeak-dev <squeak-dev-bounces at lists.squeakfoundation.org> im Auftrag von Jakob Reschke <forums.jakob at resfarm.de>
Gesendet: Montag, 13. Januar 2020 20:19 Uhr
An: The general-purpose Squeak developers list
Betreff: Re: [squeak-dev] Closing modal dialogs...

Thiede, Christoph <Christoph.Thiede at student.hpi.uni-potsdam.de<mailto:Christoph.Thiede at student.hpi.uni-potsdam.de>> schrieb am Mo., 13. Jan. 2020, 13:10:

(Moreover, I never was really happy with the way to pause the UI process ... In particular, MC modal dialogs, which are not exclusive, don't need to decorate the whole UI process. Why can't these things work with the observer pattern instead?)

Promises can also be nice. Allows you to write the continuation next to the invocation.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20200115/5f5af39c/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pastedImage.png
Type: image/png
Size: 120686 bytes
Desc: pastedImage.png
URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20200115/5f5af39c/attachment-0001.png>


More information about the Squeak-dev mailing list