08-09-2012 06:14 AM
I have weirdest issue, my application, build on top of bbui dies right after pushing first screen onto stack (with bbui 0.9.3), but only on 6.0 devices (9800), works correctly on 7.0 devices (I was able to run it without any issues on 5.0 devices, but I dropped support for it. I have denoted that giving some timeout after load may fix this issue, but main reason remains the same. Why and how to hunt for this error?
How can I instruct WebWorks to show error which caused such death? How can I check this issue?
08-09-2012 08:03 AM
Have you tried on others OS6 devices? The main difference with the 9800, after the os version, is the keyboard: does it happens the same with the physical keyboard closed/opened?
Have you tried to connect the debugger with eclipse for BB Java developers? Usually it is not really verbose, but maybe you can pull an interesting log from it.
08-11-2012 10:54 AM
I have found source of the issue. I was starting ajax download inside of the onload function. When I have moved ajax outside of this function (with some minimal timeout) application is starting much faster, it is also not breaking on os 6.0. It looks like webworks show splash until all loading processes are over, and each ajax started during onload is counted as crutial resource which must be downloaded before splash is off.
Conclusion: do not start ajax in onload function, use setTimeout and queue it for later.
08-11-2012 11:19 AM
Hi gluth,
Might be a good idea to make use of the 'ondomready' function provided in bbUI if you're not already. I've found timeouts alone aren't always the most reliable. ![]()
bb.init(onscreenready : function(element, id) {
},
ondomready: function(element, id) {
// your code here
});
08-11-2012 12:10 PM
Well ondomready is fired with some delay, when screen is visible (look into bbui sources, it still setTimeout
). It ends with clean screen which is filled after noticable moment. This is not good from user point of view. I'm using onscreenloaded events to fill screen.