<html dir="ltr">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body ocsi="0" fpstyle="1" bgcolor="#FFFFFF">
<div style="direction: ltr;font-family: Tahoma;color: #000000;font-size: 10pt;">Also, I forgot to mention: the reason that explicitly popping the dialog page did not work, is that the previous animated transition would have been ongoing at the time you issued
 pop().  Popping explicitly would have worked if you had, for example, invoked the pop() in reaction to the dialog status changing to 'PageStatus.Activated', which occurs when the transition ends.<br>
If you can see the output stream for your app, you should see a warning that the pop can't be initiated because of the ongoing transition.<br>
<br>
In any case, while this can be made to work, the 'acceptDestination' version will give a better user experience.<br>
<br>
Thanks,<br>
Matt<br>
<br>
<div style="font-family: Times New Roman; color: #000000; font-size: 16px">
<hr tabindex="-1">
<div style="direction: ltr;" id="divRpF39505"><font size="2" color="#000000" face="Tahoma"><b>From:</b> devel-bounces@lists.sailfishos.org [devel-bounces@lists.sailfishos.org] on behalf of Matthew Vogt [matthew.vogt@jollamobile.com]<br>
<b>Sent:</b> Monday, August 12, 2013 8:58 AM<br>
<b>To:</b> Superpelican<br>
<b>Cc:</b> devel@lists.sailfishos.org<br>
<b>Subject:</b> Re: [SailfishDevel] Bug in the Silica Reference docs and possible bug in the Dialog component<br>
</font><br>
</div>
<div></div>
<div>
<div style="direction:ltr; font-family:Tahoma; color:#000000; font-size:10pt">Hi Superpelican, thanks for the explanation.<br>
<br>
What you want is for the dialog which selects the multiplier to be transitory, right?  So the page sequence will be: initial-page ->dialog -> question-page  -> base-page.<br>
<br>
In this case, you need to use the 'acceptDestination' property of the dialog: <a href="https://sailfishos.org/sailfish-silica/qml-sailfishsilica-dialog.html#acceptDestination-prop" target="_blank">
https://sailfishos.org/sailfish-silica/qml-sailfishsilica-dialog.html#acceptDestination-prop</a><br>
<br>
If you set the question-page as the 'acceptDestination' and set the 'acceptDestinationAction' property to 'PageStackAction.Replace', then the effect of accepting the dialog will be to replace the dialog on the stack top with question-page.  The pageStack state
 will transition directly from [ initial-page, dialog] to [ initial-page, question-page ], and returning from question-page will then go directly back to initial-page.<br>
<br>
Note that you must provide the instance or component for the 'acceptDestination' page before the user has accepted the dialog (because we need to be able to show that page when the user starts to drag right-to-left).  This means you may need to communicate
 the dialog state at acceptance to the already instantiated question-page, by some means.<br>
<br>
Hope that helps,<br>
Matt<br>
<br>
<div style="font-family:Times New Roman; color:#000000; font-size:16px">
<hr tabindex="-1">
<div id="divRpF524327" style="direction:ltr"><font size="2" color="#000000" face="Tahoma"><b>From:</b> Superpelican [superpelican@zoho.com]<br>
<b>Sent:</b> Monday, August 12, 2013 4:45 AM<br>
<b>To:</b> Matthew Vogt<br>
<b>Cc:</b> devel@lists.sailfishos.org<br>
<b>Subject:</b> Re: [SailfishDevel] Bug in the Silica Reference docs and possible bug in the Dialog component<br>
</font><br>
</div>
<div></div>
<div>
<div class="moz-cite-prefix">Hello Matthew,<br>
<br>
Sorry for my late reply.<br>
<br>
I believe you misunderstood me. I'm not developing a custom Sailfish Dialog component, but creating a Sailfish app.<br>
The sources can be found <a href="https://bitbucket.org/Superpelican/quick_clamshell/src" target="_blank">
here</a>.<br>
<br>
My intent is also not to explicitly pop the dialog of the pageStack, but I was forced to do this, because the dialog doesn't do it itself!<br>
BTW I have already removed the code that should explicitly pop the dialog of the pageStack because it didn't work.<br>
<br>
>Also, as the implementor of the Dialog, you should use the onDone() handler to react to the user's actions, leaving the accepted() signal to be handled by users of >your dialog.<br>
<br>
Because I'm not creating a custom dialog component, I am actually the user of the dialog, so that's why I'm handling the onAccepted() signal. ;)<br>
<br>
I've demonstrated what I'm experiencing in this video: <a href="http://ubuntuone.com/71UqvktzqGWMvukeVTW8Qy" target="_blank">
http://ubuntuone.com/71UqvktzqGWMvukeVTW8Qy</a> (should be viewable in any HTML5 video supporting browser, that supports WebM, like Firefox and Chromium).<br>
<br>
Kind Regards,<br>
<br>
Superpelican<br>
<br>
On 08/05/2013 01:38 PM, Matthew Vogt wrote:<br>
</div>
<blockquote type="cite"><style id="owaParaStyle" type="text/css">
<!--
p
        {margin-top:0;
        margin-bottom:0}
body
        {direction:ltr;
        font-family:Tahoma;
        color:#000000;
        font-size:10pt}
p
        {margin-top:0;
        margin-bottom:0}
body
        {scrollbar-base-color:undefined;
        scrollbar-highlight-color:undefined;
        scrollbar-darkshadow-color:undefined;
        scrollbar-arrow-color:undefined}
body
        {scrollbar-base-color:undefined;
        scrollbar-highlight-color:undefined;
        scrollbar-darkshadow-color:undefined;
        scrollbar-arrow-color:undefined}
-->
BODY {direction: ltr;font-family: Tahoma;color: #000000;font-size: 10pt;}P {margin-top:0;margin-bottom:0;}</style>
<div style="direction:ltr; font-family:Tahoma; color:#000000; font-size:10pt">Hi Superpelican.<br>
Thanks for catching the errors in the Dialog documentation, I will correct them.<br>
<br>
In your Clamshell dialog, you do not need to explicitly pop() the dialog page in response to the accept action; it is popped by the user's interaction (either a drag or an 'Accept' click), and the accepted signal is generated in response to this event.<br>
<br>
Also, as the implementor of the Dialog, you should use the onDone() handler to react to the user's actions, leaving the accepted() signal to be handled by users of your dialog.<br>
<br>
Thanks,<br>
Matt<br>
<br>
<div style="font-family:Times New Roman; color:#000000; font-size:16px">
<hr tabindex="-1">
<div id="divRpF554313" style="direction:ltr"><font size="2" color="#000000" face="Tahoma"><b>From:</b>
<a class="moz-txt-link-abbreviated" href="mailto:devel-bounces@lists.sailfishos.org" target="_blank">
devel-bounces@lists.sailfishos.org</a> [<a class="moz-txt-link-abbreviated" href="mailto:devel-bounces@lists.sailfishos.org" target="_blank">devel-bounces@lists.sailfishos.org</a>] on behalf of Superpelican [<a class="moz-txt-link-abbreviated" href="mailto:superpelican@zoho.com" target="_blank">superpelican@zoho.com</a>]<br>
<b>Sent:</b> Sunday, August 04, 2013 8:42 PM<br>
<b>To:</b> <a class="moz-txt-link-abbreviated" href="mailto:devel@lists.sailfishos.org" target="_blank">
devel@lists.sailfishos.org</a><br>
<b>Subject:</b> [SailfishDevel] Bug in the Silica Reference docs and possible bug in the Dialog component<br>
</font><br>
</div>
<div>Hello,<br>
<br>
Sfiet_Konstantin and I have had another debugging session on IRC recently with my app.<br>
(<a href="http://merproject.org/logs/%23sailfishos/%23sailfishos.2013-08-03.log" target="_blank">http://merproject.org/logs/%23sailfishos/%23sailfishos.2013-08-03.log</a>)<br>
<br>
I had defined a handler that would be called when the user accepted a dialog. However<br>
we saw that the handler was never called. Then I noticed that the documentation page<br>
on the Silica Reference about the Dialog component has an error in it. The description part<br>
of the page described that an user can accept a dialog by pushing it <b>from right<br>
to left</b>.<br>
<br>
But the onAccepted() signal hander description described that the user could accept a dialog<br>
by pushing it <b>from left to right</b>. Well I tested it in the emulator and the description of the<br>
Dialog component at the top of the page is correct. However the description of the onAccepted()<br>
signal handler is incorrect. Instead when you push the dialog <b>from left to right</b> you
<b>reject it</b>!<br>
<br>
So every time I thought I was accepting the dialog, I actually rejected it! ;) I had only read the wrong part<br>
of the documentation page.<br>
<br>
The onRejected() signal handler description is incorrect too. It says you can reject a dialog by pushing it<br>
<b>from right to left</b>. Which actually accepts the dialog.<br>
<br>
I hope someone can edit the Silica Reference, so that not more developers read the wrong part and wonder<br>
why their defined action doesn't occur! ;)<br>
<br>
<br>
Also we noticed that when a dialog is accepted, it isn't popped from the pageStack. While according to Sfiet_Konstantin<br>
this should happen. This is especially a problem in my app, where the app has a homescreen where a mode is chosen.<br>
Then when a particular mode is chosen the user is first prompted for a dialog, to enter information that is required for<br>
that mode to operate. After the user has accepted the dialog, the mode begins. The user can quit the mode and return<br>
to the homescreen by simply pushing away the "mode page". <br>
<br>
However when the user does that, the dialog is still there and he/she<br>
will have to reject the dialog too and will then finally return to the homescreen. Not only does this require another action from the user,<br>
it can also be confusing to see a dialog with the previously entered value still in it. Some users will think they need to accept the dialog.<br>
But if they do, they'll return to the "mode page", not the homescreen. This can be very confusing.<br>
<br>
This can all be seen in this video: <a href="http://ubuntuone.com/7MIfo6vKsdqg9PmgSQ9iH4" target="_blank">
http://ubuntuone.com/7MIfo6vKsdqg9PmgSQ9iH4</a> (note: this requires a browser that supports HTML5, otherwise<br>
you'll need to download the video and play it in your local video player). Unfortunately the video has a very low framerate. Sfiet_Konstantin and I<br>
don't know whether this is due to my laptop not being particulary highly spec'd or Wayland causing the low framerate. I can remember recording<br>
applications and games with another recordmydesktop frontend on a much lower spec'd computer, so I doubt that computer is too slow.<br>
<br>
The source code of my app can be found at <a href="http://bitbucket.org/Superpelican/quick_clamshell/src/" target="_blank">
http://bitbucket.org/Superpelican/quick_clamshell/src/</a><br>
<br>
I hope this is helpful for the sailors/Jollaians,<br>
<br>
Superpelican<br>
</div>
</div>
</div>
</blockquote>
<br>
</div>
</div>
</div>
</div>
</div>
</div>
</body>
</html>