<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<meta name="qrichtext" content="1">
<pre style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><!--StartFragment--><span style=" color:#c0c0c0;"><font color="#000000">Sali Markus
I would also love to see a pop() method with parameters so I can pass info back to the previous page, jus like the push()
As a workaround I just set the page's properties directly immediately before the pop() call e.g:
</font> </span><span style=" color:#800080;">
AreaSelectionPage</span><span style=" color:#c0c0c0;"> </span>{</pre>
<pre style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" color:#c0c0c0;"> </span><span style=" color:#800000;">id</span>:<span style=" color:#c0c0c0;"> </span><span style=" font-style:italic; color:#000000;">areaSelectionPage</span></pre>
....<br>
<pre style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" color:#c0c0c0;"> </span><span style=" color:#800000;">onBackPageWithInfo</span>:<span style=" color:#c0c0c0;"> </span>{</pre>
<pre style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" color:#c0c0c0;"> </span><span style=" font-style:italic; color:#000000;">mainPage</span>.areaSet<span style=" color:#c0c0c0;"> </span>=<span style=" color:#c0c0c0;"> </span>true;</pre>
<pre style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" color:#c0c0c0;"> </span><span style=" font-style:italic; color:#000000;">mainPage</span>.area_id<span style=" color:#c0c0c0;"> </span>=<span style=" color:#c0c0c0;"> </span><span style=" font-style:italic; color:#2985c7;">area_id</span>;</pre>
<pre style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" color:#c0c0c0;"> </span>pageStack.pop(<span style=" font-style:italic; color:#000000;">mainPage</span>);</pre>
<pre style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" color:#c0c0c0;"> </span>}</pre>
<pre style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" color:#c0c0c0;"> </span><span style=" color:#800000;">onCancelled</span>:<span style=" color:#c0c0c0;"> </span>pageStack.pop(<span style=" font-style:italic; color:#000000;">mainPage</span>);</pre>
<pre style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" color:#c0c0c0;"> </span>}<!--EndFragment--></pre>
<style type="text/css">
p, li { white-space: pre-wrap; }
</style><br>
mfg<br>
<br>
Chris<br>
<br>
<br>
<br>
<br>
<div class="moz-cite-prefix">On 05.06.14 13:48,
<a class="moz-txt-link-abbreviated" href="mailto:info@flyingfischer.ch">info@flyingfischer.ch</a> wrote:<br>
</div>
<blockquote cite="mid:53905905.3070005@flyingfischer.ch" type="cite">Beginners
follow up question
<br>
<br>
Hello
<br>
<br>
while transfering parameters works fine with
<br>
<br>
pageStack.push(Qt.resolvedUrl("nextPage.qml", {topic: "myTopic"}))
<br>
<br>
there seems not to be any method like this in
<br>
<br>
pageStack.pop()
<br>
<br>
How can I give back a parameter from the top of the stack to the
previous page?
<br>
<br>
Thanks for you inputs and patience!
<br>
<br>
Markus Fischer
<br>
<br>
------------------------------------------
<br>
<br>
I tried:
<br>
<br>
Page {
<br>
id: onTopOfStack
<br>
property string topic
<br>
...
<br>
Column {
<br>
id: column
<br>
...
<br>
Button {
<br>
id: myTopic
<br>
text: qsTr("MyTopic")
<br>
anchors.horizontalCenter: parent.horizontalCenter
<br>
onClicked: {
<br>
topic: "MyTopic"
<br>
pageStack.pop();
<br>
}
<br>
}
<br>
------------------------------------------
<br>
<br>
Page {
<br>
id: previousPage
<br>
property string topic
<br>
...
<br>
SilicaFlickable {
<br>
id: mainFlickable
<br>
...
<br>
Column {
<br>
id: mainColumn
<br>
...
<br>
PageHeader {
<br>
id: header
<br>
title: qsTr(topic)
<br>
}
<br>
<br>
_______________________________________________
<br>
SailfishOS.org Devel mailing list
<br>
To unsubscribe, please send a mail to
<a class="moz-txt-link-abbreviated" href="mailto:devel-unsubscribe@lists.sailfishos.org">devel-unsubscribe@lists.sailfishos.org</a>
<br>
</blockquote>
<br>
</body>
</html>