[SailfishDevel] A welcome dialog and pageStack's operation in progress.

Matthew Vogt matthew.vogt at jolla.com
Wed Jul 16 22:50:58 UTC 2014


Yes, fair point.

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.

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 :-)

Matt
________________________________________
From: devel-bounces at lists.sailfishos.org [devel-bounces at lists.sailfishos.org] on behalf of J-P Nurmi [jpnurmi at gmail.com]
Sent: Thursday, July 17, 2014 7:45 AM
To: Sailfish OS Developers
Subject: Re: [SailfishDevel] A welcome dialog and pageStack's operation in      progress.

On Wed, Jul 16, 2014 at 11:25 PM, Matthew Vogt <matthew.vogt at jolla.com> wrote:
>
> Hi, 'Page.status' is the correct property to watch for avoiding this problem.
>
> Here is an example of what you could do:
>
> import QtQuick 2.0
> import Sailfish.Silica 1.0
>
> ApplicationWindow {
>
>         initialPage: Component {
>                 Page {
>                         anchors.fill: parent
>
>                         Label {
>                                 anchors.centerIn: parent
>                                 text: 'Main page'
>                         }
>
>                         property bool showSplash: true
>                         onStatusChanged: {
>                                 if (status == PageStatus.Active && showSplash) {
>                                         showSplash = false
>                                         pageStack.push(splashPage)
>                                 }
>                         }
>                 }
>         }
>
>         Component {
>                 id: splashPage
>
>                 Page {
>                         Label {
>                                 anchors.centerIn: parent
>                                 text: 'Splash page'
>                         }
>                 }
>         }
> }
>
> Thanks,
> Matt


Hi Matt,

Notice that essentially the same problem occurs when a dialog/page is
triggered by an external event. User navigates the UI meanwhile eg. a
network event triggers a dialog => PageStack is busy so it just bails
out and user misses the dialog. As a workaround, waiting until
PageStack is no longer busy gets pretty ugly.

--
J-P Nurmi
_______________________________________________
SailfishOS.org Devel mailing list
To unsubscribe, please send a mail to devel-unsubscribe at lists.sailfishos.org


More information about the Devel mailing list