Hi Matt,
Thanks.
On 08/15/2013 12:09 PM, Matthew Vogt wrote:
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.
Yes, I'll do this one. Only have keep track from where it came when it is activated.


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.
Dont want to fire c++ validation for every key action.
Tried 'canAccept : false' at start, but couldn't find a trigger to intercept usr action to validate and then accept() or reject().



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.
I did.
BTW: they don't work (anymore):

bash: /opt/sdk/componentgallery/usr/bin/silicacomponentgallery-example: No such file or directory

Remote application finished with exit code 127.




Thanks,
Matt

------------------------------------------------------------------------
*From:* devel-boun...@lists.sailfishos.org [devel-boun...@lists.sailfishos.org] on behalf of Wim de Vries [wsvr...@xs4all.nl]
*Sent:* Thursday, August 15, 2013 7:21 PM
*To:* devel@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.
case:
textedit->save-as(menu)
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.
Thanks.



_______________________________________________
SailfishOS.org Devel mailing list

Reply via email to