[SailfishDevel] Bug in the Silica Reference docs and possible bug in the Dialog component

Superpelican superpelican at zoho.com
Sun Aug 11 18:45:40 UTC 2013


Hello Matthew,

Sorry for my late reply.

I believe you misunderstood me. I'm not developing a custom Sailfish 
Dialog component, but creating a Sailfish app.
The sources can be found here 
<https://bitbucket.org/Superpelican/quick_clamshell/src>.

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!
BTW I have already removed the code that should explicitly pop the 
dialog of the pageStack because it didn't work.

 >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.

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. ;)

I've demonstrated what I'm experiencing in this video: 
http://ubuntuone.com/71UqvktzqGWMvukeVTW8Qy (should be viewable in any 
HTML5 video supporting browser, that supports WebM, like Firefox and 
Chromium).

Kind Regards,

Superpelican

On 08/05/2013 01:38 PM, Matthew Vogt wrote:
> Hi Superpelican.
> Thanks for catching the errors in the Dialog documentation, I will 
> correct them.
>
> 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.
>
> 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.
>
> Thanks,
> Matt
>
> ------------------------------------------------------------------------
> *From:* devel-bounces at lists.sailfishos.org 
> [devel-bounces at lists.sailfishos.org] on behalf of Superpelican 
> [superpelican at zoho.com]
> *Sent:* Sunday, August 04, 2013 8:42 PM
> *To:* devel at lists.sailfishos.org
> *Subject:* [SailfishDevel] Bug in the Silica Reference docs and 
> possible bug in the Dialog component
>
> Hello,
>
> Sfiet_Konstantin and I have had another debugging session on IRC 
> recently with my app.
> (http://merproject.org/logs/%23sailfishos/%23sailfishos.2013-08-03.log)
>
> I had defined a handler that would be called when the user accepted a 
> dialog. However
> we saw that the handler was never called. Then I noticed that the 
> documentation page
> on the Silica Reference about the Dialog component has an error in it. 
> The description part
> of the page described that an user can accept a dialog by pushing it 
> *from right
> to left*.
>
> But the onAccepted() signal hander description described that the user 
> could accept a dialog
> by pushing it *from left to right*. Well I tested it in the emulator 
> and the description of the
> Dialog component at the top of the page is correct. However the 
> description of the onAccepted()
> signal handler is incorrect. Instead when you push the dialog *from 
> left to right* you *reject it*!
>
> So every time I thought I was accepting the dialog, I actually 
> rejected it! ;) I had only read the wrong part
> of the documentation page.
>
> The onRejected() signal handler description is incorrect too. It says 
> you can reject a dialog by pushing it
> *from right to left*. Which actually accepts the dialog.
>
> I hope someone can edit the Silica Reference, so that not more 
> developers read the wrong part and wonder
> why their defined action doesn't occur! ;)
>
>
> Also we noticed that when a dialog is accepted, it isn't popped from 
> the pageStack. While according to Sfiet_Konstantin
> this should happen. This is especially a problem in my app, where the 
> app has a homescreen where a mode is chosen.
> Then when a particular mode is chosen the user is first prompted for a 
> dialog, to enter information that is required for
> that mode to operate. After the user has accepted the dialog, the mode 
> begins. The user can quit the mode and return
> to the homescreen by simply pushing away the "mode page".
>
> However when the user does that, the dialog is still there and he/she
> 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,
> 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.
> But if they do, they'll return to the "mode page", not the homescreen. 
> This can be very confusing.
>
> This can all be seen in this video: 
> http://ubuntuone.com/7MIfo6vKsdqg9PmgSQ9iH4 
> <http://ubuntuone.com/7MIfo6vKsdqg9PmgSQ9iH4> (note: this requires a 
> browser that supports HTML5, otherwise
> 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
> 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
> applications and games with another recordmydesktop frontend on a much 
> lower spec'd computer, so I doubt that computer is too slow.
>
> The source code of my app can be found at 
> http://bitbucket.org/Superpelican/quick_clamshell/src/ 
> <http://bitbucket.org/Superpelican/quick_clamshell/src/>
>
> I hope this is helpful for the sailors/Jollaians,
>
> Superpelican

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.sailfishos.org/pipermail/devel/attachments/20130811/1f3cd5b7/attachment.html>


More information about the Devel mailing list