<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <br>
    <br>
    <div class="moz-cite-prefix">On 10/9/17 9:13 AM, H. Hirzel wrote:<br>
    </div>
    <blockquote type="cite"
cite="mid:CAGQxfVgQvBukjTpXQfz1UEXFwN5GeTfK5WPGMBO=soOK+=5zNw@mail.gmail.com">
      <pre wrap="">Looking a bit further it seems that modal window probably are not the issue here

MorphicProject(Project)
enter: returningFlag revert: revertFlag saveForRevert: saveForRevert

....
        CurrentProject world triggerEvent: #aboutToLeaveWorld.
....


PasteUpMorph
triggerEvent: anEventSelector
        "Evaluate all actions registered for <anEventSelector>. Return the
value of the last registered action."

    ^(self actionForEvent: anEventSelector) value


anEventSelector is #aboutToLeaveWorld
and this is not implemented in PasteUpMorph.

We have an empty block and that causes #removeModalWindow in a way I
do not understand yet.

But if we would have

    #aboutToLeaveWorld

Then it we probably would not have this problem.

I wonder  #aboutToLeaveWorld  where this comes form, Squeak 3.9 and
Squeak 5.0 do not have it either.</pre>
    </blockquote>
    <br>
    <p><font face="Georgia">It's not a method, it's an event selector:</font></p>
    <p><font face="Georgia">    CurrentProject world triggerEvent:
        #aboutToLeaveWorld.<br>
        <br>
      </font></p>
    <p><font face="Georgia">WebCamMorph</font><font face="Georgia">>>intoWorld:
        aWorld</font><br>
    </p>
    <p><font face="Georgia"> <br>
            super intoWorld: aWorld.<br>
            camIsOn ifTrue: [self on]<br>
                            ifFalse:[self off].<br>
            self removeActionsForEvent: #aboutToEnterWorld.<br>
            aWorld<br>
                when: #aboutToLeaveWorld<br>
                send: #outOfWorld:<br>
                to: self<br>
                with: aWorld.</font></p>
    <p><font face="Georgia">similar stuff removed in the intervening
        years</font></p>
    <p><font face="Georgia">B3DSceneMorph</font><font face="Georgia">>>intoWorld:
        aWorld</font><br>
    </p>
    <p><font face="Georgia">
            "The receiver is showing in the given world"<br>
            aWorld ifNil:[^self].<br>
            super intoWorld: aWorld.<br>
            aWorld when: #aboutToLeaveWorld send: #suspendAcceleration
        to: self.<br>
            aWorld when: #aboutToEnterWorld send: #restoreAcceleration
        to: self.<br>
            self restoreAcceleration.</font><br>
    </p>
    also for WonderlandCameraMorph
    <blockquote type="cite"
cite="mid:CAGQxfVgQvBukjTpXQfz1UEXFwN5GeTfK5WPGMBO=soOK+=5zNw@mail.gmail.com">
      <pre wrap="">

--Hannes





On 10/9/17, Marcel Taeumel <a class="moz-txt-link-rfc2396E" href="mailto:marcel.taeumel@hpi.de"><marcel.taeumel@hpi.de></a> wrote:
</pre>
      <blockquote type="cite">
        <pre wrap="">Hi Hannes,

if you can manage to set-up the modal child (window), that removal should
happen automatically. Use SystemWindow >> #modalLockTo:. Also see Morph >>
#openModal:. For "control-flow-modality", instead, you should use a
DialogWindow. See DialogWindow >> #getUserResponse.

Best,
Marcel
Am 09.10.2017 11:53:04 schrieb H. Hirzel <a class="moz-txt-link-rfc2396E" href="mailto:hannes.hirzel@gmail.com"><hannes.hirzel@gmail.com></a>:
Hello

I start a separate thread for the issue brought up in the tread

MorphicProject subclass: #EtoysProject


To see it in action make sure

EToys-hjh.308.mcz

is loaded. It contains a fix for the menuTitleBorderColor which makes
the following Etoys project load smoothly.

Then drop the Etoys project file

<a class="moz-txt-link-freetext" href="http://squeakland.org/content/articles/attach/FollowRoad.012.pr">http://squeakland.org/content/articles/attach/FollowRoad.012.pr</a>

onto the desktop.



When I choose 'World menu' -> 'Previous project', the following happens




----------------------------------
Project class
----------------------------------

returnToPreviousProject
"Return to the project from which this project was entered. Do
nothing if the current project has no link to its previous project."

| prevProj |
prevProj := CurrentProject previousProject.
prevProj ifNotNil: [prevProj enter: true revert: false
saveForRevert: false].



---------------------
MorphicProject(Project)

enter: returningFlag revert: revertFlag saveForRevert: saveForRevert
"Install my ChangeSet, Transcript, and scheduled views as current
globals. If returningFlag is true, we will return to the project from
whence the current project was entered; don't change its
previousProject link in this case.
If saveForRevert is true, save the ImageSegment of the project
being left.
If revertFlag is true, make stubs for the world of the project
being left.
If revertWithoutAsking is true in the project being left, then
always revert."

......
CurrentProject world triggerEvent: #aboutToLeaveWorld.
.....


----------------

PasteUpMorph
--------------------

triggerEvent: anEventSelector
"Evaluate all actions registered for . Return the
value of the last registered action."

^(self actionForEvent: anEventSelector) value


------------------------
PasteUpMorph
------------------------


removeModalWindow
self deprecated: 'The global becomeModal is no longer supported, use
e.g. a dialog window'.
"self modalWindow: nil"



As mentioned in the thread
MorphicProject subclass: #EtoysProject
the issue may be "resolved" by just commenting out the deprecation message.



removeModalWindow

"self deprecated: 'The global becomeModal is no longer supported, use
e.g. a dialog window'. "

self flag: #fixMe.

"self modalWindow: nil"



Should we do this for the moment until is is more clear how the
navigation mechanism in Etoys works?

Other suggestions?


Kind regards

Hannes Hirzel


</pre>
        <br>
        <fieldset class="mimeAttachmentHeader"></fieldset>
        <br>
        <pre wrap="">
</pre>
      </blockquote>
    </blockquote>
    <br>
  </body>
</html>