maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Alternatives (https://talk.maemo.org/forumdisplay.php?f=36)
-   -   Palm WebOS on N900 (https://talk.maemo.org/showthread.php?t=44150)

marmistrz 2012-03-07 14:57

Re: Palm WebOS on N900
 
I know what's the problem !!!! :)
I've just looked into the files out there, and seems that sources.json isn't read & loaded

I'm attaching sources.json soon

So..... Now it's time to share your knowledge, WebOS experts!!! :)
How does the sources.json work?

ivgalvez 2012-03-07 16:20

Re: Palm WebOS on N900
 
Hi marmistrz, your effort and enthusiasm is highly appreciated. Please don't give up, I hope you can reach something semi usable soon.

marmistrz 2012-03-07 17:51

Re: Palm WebOS on N900
 
Hi, I'd like to have it semi usable but I doubt I'll do it on my own.
If I knew what's about that sources.json, how they are loaded maybe I'd be able to do something

I'm just an enthusiast :)
I've never used Palm, unfortunately, but hope some experimenting can succeed. But I dont know the mojo mechanism and any help would be appreciated

marmistrz 2012-03-08 16:52

Re: Palm WebOS on N900
 
I'm uploading that sources.json:

Code:

[
    {"source": "app/assistants/app-assistant.js"},
    {"source": "app/assistants/Tools.js"},
    {"source": "app/assistants/ChessBoard.js"},
    {"source": "app/assistants/stage-assistant.js"},
    {
        "scenes": "Board",
        "source": "app/assistants/Board-assistant.js"
    },
    {
        "scenes": "Login",
        "source": "app/assistants/Login-assistant.js"
    },
    {
        "scenes": "GameList",
        "source": "app/assistants/GameList-assistant.js"
    },
    {
        "scenes": "NewGameRequest",
        "source": "app/assistants/NewGameRequest-assistant.js"
    },
    {
        "scenes": "RegisterUser",
        "source": "app/assistants/RegisterUser-assistant.js"
    },
    {
        "scenes": "AnalysisBoard",
        "source": "app/assistants/AnalysisBoard-assistant.js"
    },
    {
        "scenes": "UserPreferences",
        "source": "app/assistants/UserPreferences-assistant.js"
    },
    {
        "scenes": "TacticsBoard",
        "source": "app/assistants/Tactics-assistant.js"
    },
    {
        "scenes": "Help",
        "source": "app/assistants/Help-assistant.js"
    },
    {
        "scenes": "Chat",
        "source": "app/assistants/Chat-assistant.js"
    },
    {
        "scenes": "Computer",
        "source": "app/assistants/Computer-assistant.js"
    },
    {
        "scenes": "TacticsBoard",
        "source": "app/assistants/TacticsBoard-assistant.js"
    }
]

Here's doc about sources.json: https://developer.palm.com/content/a...rces.json.html

Anyone's got an idea how to make it work in mozilla/chromium?

EDIT: Current goal: How is it loaded on Palm? If I know that I may try to reproduce it

marmistrz 2012-03-10 14:07

Re: Palm WebOS on N900
 
1 Attachment(s)
I managed to find the cause of problem!!!
I added this at the end of <head>. But as with Palm, a solution causes more problems :)

Code:

log.js:259 ERROR: native parser didn't like '{"screenWidth": undefined, "screenHeight": undefined, "minimumCardWidth": undefined, "minimumCardHeight": 188, "maximumCardWidth": undefined, "maximumCardHeight": undefined, "keyboardType": "QWERTY"}'
log.js:259 EXCEPTION [JSON.parse], (SyntaxError): "Unexpected token u"
prototype.js:516 Uncaught SyntaxError: Badly formed JSON string: '{"screenWidth": undefined, "screenHeight": undefined, "minimumCardWidth": undefined, "minimumCardHeight": 188, "maximumCardWidth": undefined, "maximumCardHeight": undefined, "keyboardType": "QWERTY"}'

I used Chromium with --allow-file-access-from-files

Firefox throws the same errors and doesn't like some css

Attaching new index.html. Gzipped.

How can I fix these parser errors?

marmistrz 2012-03-14 18:28

Re: Palm WebOS on N900
 
Heeeeey!!!
undefined is forbidden in json!

Now, how can I set a value of a json-variable? (please send me a link with a good explanation)

because

I need to correct the variable

Code:

PalmSystem.deviceInfo

marmistrz 2012-03-20 17:14

Re: Palm WebOS on N900
 
4 Attachment(s)
It works!!!!!
I needed to change the /usr/palm/frameworks/mojo/submissions/347/javascripts/framework.js
line 109
to the json two posts ago, where undefined was replaced by ""

Some stylesheets fail to load, but it's a success anyway

I'll create a patch file, if this becomes noticed :)

Screenshot attached, further testing will be performed. This works only in Chromium, doesn't in Firefox. Not tested in other browsers

ivgalvez 2012-03-20 19:46

Re: Palm WebOS on N900
 
A small step for a man... :D

marmistrz 2012-03-20 20:06

Re: Palm WebOS on N900
 
Quote:

Originally Posted by ivgalvez (Post 1182095)
A small step for a man... :D

Yeaaah, it's only a small step: this sould at the end work on mozilla

I performed a bit more testing.
Unfortunately, I tried to login, and seems that login/register is not working here. - chromium (iron) to be precise is throwing error: Unsafe heder "X-JSON"

I dont know the mechanism of this... I tried googling a bit, but no success. Could anyone help me with this one? Why is this eeror thrown when a network activity is performed?

marmistrz 2012-03-24 11:12

Re: Palm WebOS on N900
 
IT WORKS!

I run
chromium-browser --disable-web-security and it works!\
http://desmond.imageshack.us/Himg221...png&res=medium

http://img846.imageshack.us/img846/35/86088756.png

it doesnt work on firefox yet. Chrome/Chromium/Iron only.


All times are GMT. The time now is 12:16.

vBulletin® Version 3.8.8