[SailfishDevel] yet another pop problem (Dialog)
Wim de Vries
wsvries at xs4all.nl
Thu Aug 15 17:51:50 UTC 2013
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-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.
> 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.
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.sailfishos.org/pipermail/devel/attachments/20130815/9fe67c9c/attachment.html>
More information about the Devel
mailing list