[SailfishDevel] Refreshing pages

Franck Routier (perso) alci at mecadu.org
Mon Dec 1 17:03:13 UTC 2014


Hummm.... in fact the cardName is indeed the same in the cardPage and 
the delegate... but it is not updated when the cardPage is loaded.
But what puzzles me is that the two other properties (value and 
backImageSource) are updated !

So the problem must happen before that. Let me search a bit more and 
come back after that. Thanks for your help.

Franck



Le 01/12/2014 17:10, sfietkonstantin at free.fr a écrit :
> Hi Franck,
>
> What do you experience with this flow. Isn't the cardname the same in CardPage.qml and in your delegate ?
>
> Regards,
> Lucien
>
> ----- Mail original -----
> De: "Franck Routier (perso)" <alci at mecadu.org>
> À: devel at lists.sailfishos.org
> Envoyé: Lundi 1 Décembre 2014 16:56:56
> Objet: Re: [SailfishDevel] Refreshing pages
>
>
> well, in fact the cardPage itself is pushed from the mainPage with:
>
> delegate: Card {
>                   id: myCard
>
>                   backImageSource: ico
>                   value: val
>                   name: cardname
>                   height: gridView.cellHeight-3
>                   fullSize: false
>
>                   onClicked: {
>                       pageLoader.setSource("CardPage.qml",
> {"appSettings": settings,
> "backImageSource": myCard.backImageSource,
> "backname": myCard.name,
>                                                             "value":
> myCard.value,
> "backsLibrary": backsLibrary
>                                                            }
>                                            )
>                       pageStack.push(pageLoader.item)
>                   }
>               }
>
>
> So here is the flow:
>
> MainPage -> CardPage -> AboutBackPage
>
>
> Le 01/12/2014 16:40, sfietkonstantin at free.fr a écrit :
>> Hi Franck
>>
>> How do you push the cardPage ? How do you expect backname to change ?
>>
>> Regards,
>> Lucien
>>
>> PS: Sorry for top-posting (my webmail don't give me any other option :()
>>
>> ----- Mail original -----
>> De: "Franck Routier (perso)" <alci at mecadu.org>
>> À: devel at lists.sailfishos.org
>> Envoyé: Lundi 1 Décembre 2014 16:27:10
>> Objet: [SailfishDevel] Refreshing pages
>>
>> Hi,
>>
>> I have aproblem with a page that has a property I can't update.
>> I'm using this page in a PullDownMenu, as this:
>>
>> Page {
>>        id: cardPage
>>        property string backname
>>        property CardBacksLibrary backsLibrary
>>
>>        SilicaFlickable {
>>            Loader {
>>                id: pageLoader
>>            }
>>
>>            PullDownMenu {
>>                MenuItem {
>>                    text: qsTr("About this card back...")
>>                    onClicked: {
>>                        pageLoader.setSource("AboutBackPage.qml",
>> {"backname": backname, "backsLibrary": backsLibrary})
>>                        pageStack.push(pageLoader.item)
>>                    }
>>                }
>>            }
>>
>> But once loaded, the backname property stays forever unchanged, while
>> I'd like to change it each time the cardPage  is shown again.
>>
>> I know I'm missing some fundamental point about pages / objects
>> lifecycle / etc, but any pointer would be welcome.
>>
>> Thanks in advance,
>> Franck
>> _______________________________________________
>> SailfishOS.org Devel mailing list
>> To unsubscribe, please send a mail to devel-unsubscribe at lists.sailfishos.org
>> _______________________________________________
>> SailfishOS.org Devel mailing list
>> To unsubscribe, please send a mail to devel-unsubscribe at lists.sailfishos.org
> _______________________________________________
> SailfishOS.org Devel mailing list
> To unsubscribe, please send a mail to devel-unsubscribe at lists.sailfishos.org
> _______________________________________________
> SailfishOS.org Devel mailing list
> To unsubscribe, please send a mail to devel-unsubscribe at lists.sailfishos.org



More information about the Devel mailing list