I tried using trigger.io with amber. It worked on the first try: I got the amber browser running right away on my phone!
Now I am testing some apps with socket.io and pharo webclient, but I've run into a basic error with loadAmber used within trigger.io: here is my loadAmber call in index.html: <script type="text/javascript"> loadAmber({ files: ['paper.js', 'Ludus.js' , 'Ludus-Examples.js' , 'AFI.js', 'HackerGame.js', 'Morphic.js', 'TB-Morphic.js', 'WebChessBoard.js', 'SubPilotPaper.js'], prefix: './', ready: function() { $(function() { smalltalk.ChessManager2._start(); }); }}); </script> ChessManager2 is defined in "WebChessBoard.js". However when the app runs it says that ChessManager2 is undefined. This code works correctly when run from the browser with the same files as I'm using in trigger.io. However on the phone it fails. I also tried loading WebChessBoard.js in a <script> tag in the document's <head> tag, however then "smalltalk is undefined". Any ideas why this isn't working? It appears the loadAmber doesn't work properly with trigger.io.
<zenchess@gmail.com>
|
Maybe this is entirely irrelevant but when you get undefined messages, I would be really careful how I pass objects from one place to the other, especially javascript objects. Be carefull how you inline javascript code as well.
2012/7/13 Zenchess [via Smalltalk] <[hidden email]>
-- Sincerely yours, Apostolis Xekoukoulotakis |
In reply to this post by Jacob Wagner
Hi Zenchess, Are you using an Android device? Mine worked fine initially with Amber using PhoneGap or better, Trigger.IO. But then my Android device got upgraded from 2.2 to 4.0.3 and all my Amber apps stopped loading. I found the problem is that Android 3+ will not allow file: loads with query strings (which Amber uses). It does allow query strings over http:. Andrew On Jul 13, 2012 12:42 PM, "Zenchess" <[hidden email]> wrote:
I tried using trigger.io with amber. It worked on the first try: I got the amber browser running right away on my phone! |
The latest version of Trigger.io includes the http loading into the WebView, so worth giving it a try to see if that resolves the issue. Andrew On Jul 13, 2012 7:52 PM, "Andrew McQuiggin" <[hidden email]> wrote:
|
Free forum by Nabble | Edit this page |