[Cuis-dev] FW: FW: Freezing UI - can't interrupt via Alt+.

Jaromir Matas mail at jaromir.net
Wed Jul 13 06:18:56 PDT 2022


Hi Juan,

Thanks for encouragement :)

> Now these work: […]

Cool! I just a did just a quick check and noticed a few regressions:

[1/0] fork.
5 seconds asDelay wait.
FillInTheBlankMorph request: 'What is your favorite color?'
"pressing Cancel won't terminate the UI and keeps looping at 100%"

And this example stopped working properly when abandoning:

[self halt] ensure: [self halt]

To my regret I’m a bit short of time at the moment but I very much look forward to investigating your changes further a bit later; it’s a great learning opportunity for me :)

> I don't like that design. It means that there are times where the world is not in control, and then, for example, animations and stepping are halted. I removed a couple of those in Cuis, but some still remain.

I’m relieved to hear that; I didn’t like it when I saw it the first time so now I can study it with this in mind. Many thanks!

Sorry for not being able to respond right away.

Best,
Jaromir


--

Jaromír Matas

mail at jaromir.net

From: Juan Vuletich<mailto:JuanVuletich at zoho.com>
Sent: Monday, July 11, 2022 23:59
To: Discussion of Cuis Smalltalk<mailto:cuis-dev at lists.cuis.st>
Cc: Jaromir Matas<mailto:mail at jaromir.net>
Subject: Re: [Cuis-dev] FW: FW: Freezing UI - can't interrupt via Alt+.

On 7/11/2022 6:16 PM, Jaromir Matas via Cuis-dev wrote:
Hi Juan,

> The problem there is that the debugger for the 1/0 is opened when Morphic ends the current cycle, to reduce risk of breaking state.

Aaah, I see, thank you!; the fix works beautifully :)

Now even this example works:

[1/0] fork.
5 seconds asDelay wait.
self inform: 'test'

But unfortunately this one still doesn’t:

[1/0] fork.
5 seconds asDelay wait.
self confirm: 'test'

It raises an error because of Object >> #runningWorld associates the world with the active process and not the current UI (I’m not saying it’s wrong; I just don’t know because this all is way beyond my current skill level so I’m just observing Squeak evaluates the example ok). The comment even mentions: “This method could answer nil, if not in an UI process!” which seems to be our case…

This is fun. You keep finding corners in the system! Now these work:

[1/0] fork.
5 seconds asDelay wait.
"self confirm: 'test'"
"self request: 'Test'
        initialAnswer: 'initial answer'
        orCancel: [ ^nil ]"
"FillInTheBlankMorph request: 'What is your favorite color?'"
"
    menu _ MenuMorph new.
    1 to: 3 do: [:i |
        entry _ 'Line', i printString.
        sub _ MenuMorph new.
        menu add: entry subMenu: sub.
        #('Item A' 'Item B' 'Item C')  do:[:subEntry|
            sub add: subEntry target: menu
                action: #modalSelection: argument: {entry. subEntry}]].
    menu invokeModal."

(uncommenting the queries one at a time)



Also, I’ve realized there are ‘sub-cycles’ run inside the UI in some cases; I’ve never really noticed and have no idea whether this is something to worry about: in Squeak or Pharo, when I run the “confirm:” test the inactive UI that evaluates the confirm: dialogue runs its subcycle which means that until the dialogue is dismissed there are two cycling loops – one belonging to the current UI and one belonging to the former UI running the dialogue…

I don't like that design. It means that there are times where the world is not in control, and then, for example, animations and stepping are halted. I removed a couple of those in Cuis, but some still remain. We'll keep cleaning, as usual.


Thanks again; apologies for just piling examples and no solution ;|
Best regards,

--

Jaromír Matas

mail at jaromir.net<mailto:mail at jaromir.net>


Your input is most welcome.You find this kind of details, that most of us miss. Thanks for that.

Cheers,



--

Juan Vuletich

www.cuis-smalltalk.org<http://www.cuis-smalltalk.org>

https://github.com/Cuis-Smalltalk/Cuis-Smalltalk-Dev

https://github.com/jvuletich

https://www.linkedin.com/in/juan-vuletich-75611b3

https://independent.academia.edu/JuanVuletich

https://www.researchgate.net/profile/Juan-Vuletich

https://patents.justia.com/inventor/juan-manuel-vuletich

https://twitter.com/JuanVuletich

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cuis.st/mailman/archives/cuis-dev/attachments/20220713/eed274b9/attachment.htm>


More information about the Cuis-dev mailing list