02-28-2011 07:06 PM
I am trying to use the following in a playbook webworks app and seem to be having some problems with them:
blackberry.ui.dialog.customAsk
blackberry.ui.dialog.standardAsk
blackberry.app.version
I have the following in my config.xml:
<feature id="blackberry.app" version="1.0.0"/> <feature id="blackberry.ui.dialog" version="1.0.0"/>
The issue that I have is that "blackberry" is undefined... but not always. I have some initialization code hooked up to the onload event of the HTML body tag. With the code running here, I find that attempting to use the blackberry.ui methods results in exceptions. But if I call them from a timer set for about 2s later, it works.
For blackberry.app.version, I know that it was working a few days ago, but it isn't today. Again, I get exceptions when trying to access it. I didn't make any kind of significant changes to the code using it, so I'm not sure why it stopped working.
Is there some reason why the blackberry object is not accessible when the code starts running? And if so, when can I be sure that it is accessible?
Thanks for any pointers. I'm new to BlackBerry development so I might be missing something basic. This is one of the last items I need to get figured out before my app is ready for submission.
Regards,
Wayne
03-01-2011 01:39 PM
Hi Wayne,
There is a known issue with Beta2 of WebWorks for PlayBook where the APIs sometimes are not available before the onload runs.
We should have a fix available for this available in a week or two from now.
03-01-2011 02:18 PM
Ok. Thanks for the feedback. I thought that I was doing something strange or just going crazy.
In the mean time, I have worked around it by removing the calls to blackberry.ui.dialog and added a delay before accessing blackberry.app.
Regards,
Wayne