[SailfishDevel] Binding weirdness on Jolla device after deploy with screen locked

2014-01-26 Thread christopher . lamb

Hi all

I have come across some weird behaviour on the Jolla:

Bindings don't seem to work immediately after an app has deployed when  
the screen is locked.


To demonstrate this I have created the code snippet at the end of this  
mail. To reproduce, create a default Sailfish project, paste the code  
into FirstPage.qml.


My code has:
1) an Item dummy with an enabled property bound to applicationActive.
2) a BackgroundItem with an enabled property bound to dummy.enabled
3) a Label in the BackgroundItem with with text property bound to  
dummy.enabled


When the app is active, the label should display Correct Label

However, if the app is deployed when the screen is locked, on  
unlocking and activating the app
the label text shows Oops Wrong label even though console.log output  
suggests that the text has changed to Correct Label.


Also, when the backgroundItem is clicked, the highlight colour is not  
shown (but an onClicked event is generated).


The app behaves as expected (label correctly displayed, highlight  
colour shown) when:

a) The app is pushed to the left, and then reactivated,
b) The app is deployed while the screen is unlocked (immediately shown  
fullscreen),

c) The app is opened from the app icon direct on the Jolla,
d) The app is deployed to the Emulator.

Grüsse

Chris


//Start FirstPage.qml
import QtQuick 2.0
import Sailfish.Silica 1.0

Page {
id: page

Item {
//represents a much more complex object (e.g. c++ plugin)
//reduced to item here for demo purposes
id: dummy
enabled: applicationActive
onEnabledChanged: console.log(QML dummy onEnabledChanged:   
+ enabled);

}

BackgroundItem {
enabled: dummy.enabled
onEnabledChanged: console.log(QML BackgroundItem  
onEnabledChanged:  + enabled);

width: parent.width
height: 160
anchors.horizontalCenter: parent.horizontalCenter
anchors.verticalCenter: parent.verticalCenter
Label {
anchors.horizontalCenter: parent.horizontalCenter
anchors.verticalCenter: parent.verticalCenter
text: dummy.enabled ? Correct Label : Oops! Wrong label
onTextChanged: console.log(QML text onTextChanged:  + text);
color: Theme.primaryColor
}
onClicked:console.log(BackgroundItem clicked)
}
}
//End FirstPage.qml

___
SailfishOS.org Devel mailing list


Re: [SailfishDevel] Binding weirdness on Jolla device after deploy with screen locked

2014-01-26 Thread christopher . lamb

Hi Ove

That's pretty much the behaviour I get, and the swipe to multitasking  
and back fixes things.


The behaviour 1s 100% reproducible  when the screen is locked during  
deploy, and never occurs when deploying to an unlocked screen.


That the problem to do with bindings is only a wild assumption on my  
part, it could be down to the screen not updating as you suggest.


Grüsse

Chris


Zitat von Ove Kåven o...@arcticnet.no:


Den 26. jan. 2014 13:42, skrev christopher.l...@thurweb.ch:

Hi all

I have come across some weird behaviour on the Jolla:

Bindings don't seem to work immediately after an app has deployed when
the screen is locked.


Are you able to tell the difference between something like this, and  
the more straightforward issue of the app display simply not  
updating? I frequently experience the latter immediately after a  
deploy. If I click anything, or try to use the pulley menu, I can  
hear the sounds and get the console logs, but the display doesn't  
start updating before I swipe out to the multitasking view and then  
reactivate it. Everything works otherwise.


___
SailfishOS.org Devel mailing list





___
SailfishOS.org Devel mailing list


Re: [SailfishDevel] Binding weirdness on Jolla device after deploy with screen locked

2014-01-26 Thread Tero Siironen
Just to confirm this, I'm having same issues with my app. If I launch
it and put the screen off right away the application's screen is not
updated when I open it again from the cover. Have to swipe it back to
home and reopen it to get updated window.


-- 
Tero

2014/1/26  christopher.l...@thurweb.ch:
 Hi Ove

 That's pretty much the behaviour I get, and the swipe to multitasking and
 back fixes things.

 The behaviour 1s 100% reproducible  when the screen is locked during deploy,
 and never occurs when deploying to an unlocked screen.

 That the problem to do with bindings is only a wild assumption on my part,
 it could be down to the screen not updating as you suggest.

 Grüsse

 Chris


 Zitat von Ove Kåven o...@arcticnet.no:


 Den 26. jan. 2014 13:42, skrev christopher.l...@thurweb.ch:

 Hi all

 I have come across some weird behaviour on the Jolla:

 Bindings don't seem to work immediately after an app has deployed when
 the screen is locked.


 Are you able to tell the difference between something like this, and the
 more straightforward issue of the app display simply not updating? I
 frequently experience the latter immediately after a deploy. If I click
 anything, or try to use the pulley menu, I can hear the sounds and get the
 console logs, but the display doesn't start updating before I swipe out to
 the multitasking view and then reactivate it. Everything works otherwise.

 ___
 SailfishOS.org Devel mailing list




 ___
 SailfishOS.org Devel mailing list
___
SailfishOS.org Devel mailing list