11-09-2011 02:58 PM
I'm using Ripple to test a PhoneGap application I'm building. However, using Ripple to emulate PhoneGap events does not seem to fire them.
Using the event interface to fire the 'deviceready' event outputs the following to the console:
PhoneGap :: fired deviceready event!
However, the code is not reacting to the event. I have an alert firing on 'deviceready', and it fires at application startup (when the event should fire), but manually triggering it afterwards, or any other PhoneGap event (like "menubutton"), doesn't have any effect. As such, it seems as though the PhoneGap events are indeed firing, just not when simulated by Ripple
I've searched the Ripple forums and I saw the suggestion to comment out phonegap.js (which I have tried, to no effect).
Any help would be greatly appreciated!
PS. Apologies if this is the wrong place to post this, but I have no idea where else to post about Ripple now that they have been acquired by RIM.
11-10-2011 04:39 PM
I took a peek at the Ripple code and I think you discovered a hard to find bug!
If you look here:
You can see that we are raising the event on the document object , the problem is that the event is raised the outer windows document and not your applications.
I created a bug to track this here:
We correctly find and raise the documentready event on startup:
Which explains why you see your callback get executed when refreshing.