[SailfishDevel] PageStack: rePushing a page / popping with parameters

christopher.lamb at thurweb.ch christopher.lamb at thurweb.ch
Fri Jan 17 14:21:08 UTC 2014

Hi all

This morning I found that if a page element is repeatedly pushed to  
the PageStack, repeated instances of the page are created on the  
PageStack, as shown by the breadcrumb indicators on the top of the  

So why try and repush a page?

What I really wanted to do was to pop back to the previous page, but  
pass some information back to the previous page. As the pop() method  
does not allow properties to be set, but push() does, I had misused  
push(). On Harmattan this worked well enough (or rather if it was  
adding multiple page instances, I did not see it due to the lack of  

Looking closer at the code of the app where I found the problem I  
discovered that for another page wanting to pass info back I had taken  
a different approach. Here I had used pop() but before calling pop() I  
had directly passed info to the previous page by setting properties of  
that page.

Both approaches are shown in this mini-throwaway demo.


To my mind the cleanest solution would be if Sailfish supported:

pop(page, properties, operationType)



More information about the Devel mailing list