02-25-2012 08:15 PM - edited 02-25-2012 08:17 PM
My config file looks like this:
<?xml version="1.0" encoding="utf-8"?> <widget xmlns="http://www.w3.org/ns/widgets" xmlns:rim="http://www.blackberry.com/ns/widgets" version="1.0.0"> <name>App Name</name> <author>My Name</author> <content src="html/index.html"/> <feature id="blackberry.app"/> <rim:permissions> <rim:permit>access_shared</rim:permit> </rim:permissions> <feature id="blackberry.io.file" required="true"/> <feature id="blackberry.io.dir" required="true"/> </widget>
I am trying to list the app dirs:
var dirs = blackberry.io.dir.appDirs;
I get an error in the Ripple console saying: "ReferenceError: Can't find variable: blackberry".
Ripple info is:
Ripple Mobile Emulator (v0.9.1)
What am I doing wrong here?
Solved! Go to Solution.
02-25-2012 09:08 PM
Actually it seams the problem is actually that the page load event is being triggered twice. The first time BB is not defined, the second time it is. Not sure why the load happens twice.
02-27-2012 01:52 PM
Yes, Ripple does load itself twice. It has to do with capturing a missing event that is needed for page navigation.
Where and how (code snippet please) are you calling your code? Is it part of your page onload event, or before?
02-27-2012 01:58 PM
I started another thread with a better title. But I was using $(document).ready(....). You can see the solution I used in the other thread, but basically I just wrapped it in a setTimout();