[SailfishDevel] yet another pop problem (Dialog)

Matthew Vogt matthew.vogt at jollamobile.com
Thu Aug 15 10:09:56 UTC 2013

Hi Wim.

The simplest thing to do, is to wait for the page under your dialog to be re-activated - when the page status is 'PageStaus.Active' again, then you know that the pop transition has finished and you can issue a new page stack change.

However, what you should probably do in this case, is verify that the dialog content is valid before you let the user accept the Dialog.  You can prevent the dialog being accepetd by binding an expression which evaluates to false to the 'canAccept' property of the Dialog.  When you detect that the user has entered a name which already exists, you can show a TextSwitch for the user to confirm that they wish to overwrite the existing file.  When you're happy that the choice is intentional, make the 'canAccept' expression evaluate to true.

You may also like to look at the text field examples in the component gallery, which demonstrate how to visually indicate that the content of a field is not currently in a valid state.


From: devel-bounces at lists.sailfishos.org [devel-bounces at lists.sailfishos.org] on behalf of Wim de Vries [wsvries at xs4all.nl]
Sent: Thursday, August 15, 2013 7:21 PM
To: devel at lists.sailfishos.org
Subject: [SailfishDevel] yet another pop problem (Dialog)

I am sorry, but some things that are so simple in QtWidgets do become quite complex in Sailfish-QML.
push Dailog (usr inputs filename)
C++ evaluates filename: file already exists!

now I want push a "overwrite?" Dialog.
But any of the PageStack  actions causes "Warning: cannot pop while transition is in progress".
The problem here is that the Dialog is always popped by the user. So pagestack goes in transition and I cannot do anything on the pagestack (immediately) after that.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.sailfishos.org/pipermail/devel/attachments/20130815/24ad9ea6/attachment.html>

More information about the Devel mailing list