<div dir="ltr"><div>I did a maybe less dirty workaround yesterday:<br><br>    function openWelcomeDialog()<br>    {<br>        console.log("working!")<br>        if (status == PageStatus.Active)<br>        {<br>            mainPage.statusChanged.disconnect(openWelcomeDialog)<br>

            var component = Qt.createComponent("WelcomeDialog.qml")<br>            var popup = component.createObject(mainPage)<br>            popup.open()<br>        }<br>    }<br><br>    Component.onCompleted: mainPage.statusChanged.connect(openWelcomeDialog)<br>

<br></div>This way The check will be done only 4 times in my case and not each time something happens with the Page.<br>Note, that queuing would be a great idea. In my case the busy check was false (pageStack wasn't busy) but a while after it was and Dialog couldn't be pushed.<br>

</div><div class="gmail_extra"><br clear="all"><div><div>--</div>Marcin<br></div>
<br><br><div class="gmail_quote">2014-07-17 0:50 GMT+02:00 Matthew Vogt <span dir="ltr"><<a href="mailto:matthew.vogt@jolla.com" target="_blank">matthew.vogt@jolla.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

Yes, fair point.<br>
<br>
IIRC, we decided there weren't enough motivating examples to make it worth adding action-queueing behaviour to the PageStack.  If people keep hitting this problem, though, it could be worth revisiting.<br>
<br>
That said, working around the problem is usually simple, and making the PageStack support more complicated API patterns could lead users to get themselves into deeper trouble, that's harder to diagnose and fix :-)<br>


<br>
Matt<br>
________________________________________<br>
From: <a href="mailto:devel-bounces@lists.sailfishos.org">devel-bounces@lists.sailfishos.org</a> [<a href="mailto:devel-bounces@lists.sailfishos.org">devel-bounces@lists.sailfishos.org</a>] on behalf of J-P Nurmi [<a href="mailto:jpnurmi@gmail.com">jpnurmi@gmail.com</a>]<br>


Sent: Thursday, July 17, 2014 7:45 AM<br>
To: Sailfish OS Developers<br>
<div class="im HOEnZb">Subject: Re: [SailfishDevel] A welcome dialog and pageStack's operation in      progress.<br>
<br>
</div><div class="HOEnZb"><div class="h5">On Wed, Jul 16, 2014 at 11:25 PM, Matthew Vogt <<a href="mailto:matthew.vogt@jolla.com">matthew.vogt@jolla.com</a>> wrote:<br>
><br>
> Hi, 'Page.status' is the correct property to watch for avoiding this problem.<br>
><br>
> Here is an example of what you could do:<br>
><br>
> import QtQuick 2.0<br>
> import Sailfish.Silica 1.0<br>
><br>
> ApplicationWindow {<br>
><br>
>         initialPage: Component {<br>
>                 Page {<br>
>                         anchors.fill: parent<br>
><br>
>                         Label {<br>
>                                 anchors.centerIn: parent<br>
>                                 text: 'Main page'<br>
>                         }<br>
><br>
>                         property bool showSplash: true<br>
>                         onStatusChanged: {<br>
>                                 if (status == PageStatus.Active && showSplash) {<br>
>                                         showSplash = false<br>
>                                         pageStack.push(splashPage)<br>
>                                 }<br>
>                         }<br>
>                 }<br>
>         }<br>
><br>
>         Component {<br>
>                 id: splashPage<br>
><br>
>                 Page {<br>
>                         Label {<br>
>                                 anchors.centerIn: parent<br>
>                                 text: 'Splash page'<br>
>                         }<br>
>                 }<br>
>         }<br>
> }<br>
><br>
> Thanks,<br>
> Matt<br>
<br>
<br>
Hi Matt,<br>
<br>
Notice that essentially the same problem occurs when a dialog/page is<br>
triggered by an external event. User navigates the UI meanwhile eg. a<br>
network event triggers a dialog => PageStack is busy so it just bails<br>
out and user misses the dialog. As a workaround, waiting until<br>
PageStack is no longer busy gets pretty ugly.<br>
<br>
--<br>
J-P Nurmi<br>
_______________________________________________<br>
SailfishOS.org Devel mailing list<br>
To unsubscribe, please send a mail to <a href="mailto:devel-unsubscribe@lists.sailfishos.org">devel-unsubscribe@lists.sailfishos.org</a><br>
_______________________________________________<br>
SailfishOS.org Devel mailing list<br>
To unsubscribe, please send a mail to <a href="mailto:devel-unsubscribe@lists.sailfishos.org">devel-unsubscribe@lists.sailfishos.org</a><br>
</div></div></blockquote></div><br></div>