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

Juan Vuletich JuanVuletich at zoho.com
Mon Jul 11 14:59:17 PDT 2022


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
>

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
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/20220711/47097925/attachment.htm>


More information about the Cuis-dev mailing list