NETWEBEND problem

Previous topic - Next topic

Crivens

Ok, this is a weird one. If I make a new project with the single following line:-
NETWEBEND "http://developer.palm.com/appredirect/?packageid=com.teamgates.rotaslider"

Then it works fine. Windows opens it in the browser and my WebOS devices (Pre2/TP) open a browser which immediately opens the app store (TP fails as isn't for TP but Pre2 works fine), which is what I want, and what is expected.

However, when I put this exact same line as the first line of my game (3000+ commands) it quits the program as expected but then nothing else happens... ie. no browser, no app store, nothing. It's like you quit the program. I found this out after quite a bit of time moving the line around (thought it was not working in different functions or files initially). However being the first line of the program I thought it wouldn't matter...

So what the hell eh? Gernot, any ideas? Note it definitely used to work on my old game (Free version of Rotaslider) but now even that has the same problem. I can't remember when I last compiled that so I don't know if it's a new GLB problem or a WebOS one.

Cheers
Current fave quote: Cause you like musicians and I like people with boobs.

ampos

it happened to my a while ago, and although I can't remdmber it, was related go glb calling a END znd not returning to exe the web string.

Hope my vague idea can help you :-)
check my web and/or my blog :D
http://diniplay.blogspot.com (devblog)
http://www.ampostata.org
http://ampostata.blogspot.com
I own PC-Win, MacBook 13", iPhone 3G/3GS/4G and iPAC-WinCE

Ian Price

You can't put NETWEBEND as the first line of your app, you must use ALLOWESC FALSE prior to calling it on Pre IIRC. That should stop the app exiting :)
I came. I saw. I played.

Crivens

Strange it works fine as a single line app on the pre and the TP but not as the first line in my main app.

I will try your suggestions a bit later.

Cheers
Current fave quote: Cause you like musicians and I like people with boobs.

Crivens

Nah that didn't work. I *want* the app to quit and then load up the store on WebOS. It totally used to work in my first app but now isn't. However if I put the NETWEBEND command as the *only* line of an app then it works fine (quits app then runs a browser which kicks off the app store). Using the NETWEBEND command in the main app just quits the app and does nothing else. My old app used ALLOWESCAPE FALSE and yes it used to get the app store up while keeping my app alive. Not working at all now.

Ampos, I don't quite understand what you are saying there. Can you explain again?

Cheers
Current fave quote: Cause you like musicians and I like people with boobs.

Ian Price

Maybe Gernot has changed something? Maybe it's a bug that has always been there, just never discovered. I know in my old earlier apps using NETWEBEND wouldn't go to the site and also terminated the app (which seems to be what you are experiencing), but I then started using one of MrT's functions to keep the app alive, which also required ALLOWESCAPE FALSE. I did actually report to Gernot prior to this what you are experiencing, although this was a long while back, when I first started devving for webOS.

Dunno.
I came. I saw. I played.

Crivens

Hmm possibly. My original app doesn't work (quits but doesn't run the browser) now but I can't remember if it ever did or whether it only worked in iOS and I never tested the same code in WebOS. Pretty sure I tested it at the time though so possibly a bug in the latest WebOS?

Still it's a bit weird how the exact same command works perfectly in WebOS if it's the only line of code (or two as I also tried it with a string variable for the URL originally).

Seriously annoying though as the whole reason I wrote an shop function was because WebOS can't search the app store like iOS can (although iOS is a bit rubbish for searching too especially if your company name has a space in it).

Hopefully Gernot can fix the problem though. It's almost the last thing to do before releasing my new app really.

Cheers
Current fave quote: Cause you like musicians and I like people with boobs.

Kitty Hello

did you play with AUTOPAUSE, too?
What does the console windows show?

Crivens

Quotedid you play with AUTOPAUSE, too?
Not yet at all on my new project, but my old one sets it to TRUE if that helps. How does it make any difference though if two projects use the same command and one works and the other doesn't when the command is the first thing that happens in both projects (even though one of those projects *only* uses this command)? I'll give it another go a bit later if I get a chance.

QuoteWhat does the console windows show?
You will have to explain what you mean a bit more to me for WebOS.

Cheers
Current fave quote: Cause you like musicians and I like people with boobs.

Kitty Hello

in compiler/platform/webos/tools/bin is a "deviceshell.bat". That should give you the ability to run a program from command line and view the stdout printout. Also the GLBasic engine log.
To make it easier, make a symlink to the apps-directory:
Code (glbasic) Select

ln -s media/cryptofs/apps/usr/palm/applications apps


you can then do:
Code (glbasic) Select

cd apps
cd com.company.yourapp
./glbasic-webos-exe

Crivens

#10
QuoteShut down GLB
glb is shut down
exiting with url http://developer.palm.com/appredirect/?packageid=com.teamgates.rotaslider
Ignore the segfault that will come now ;)PDL_Quit
</PDL_Quit>
exit
Ok, here is what I get. After this nothing is on the Pre2. Just the desktop.

Note that I also did this for my test program that *only* does the exact same NETWEBEND command that is above (and I end up with the app store in the correct location and a browser window open which is fine). And the trace is identical to the above at the end.

Cheers
Current fave quote: Cause you like musicians and I like people with boobs.

Kitty Hello

Oh. That's very strange then.
Maybe you must clear some memory before?

Crivens

Hmm. First perhaps I should make my test app load tonnes of sprites and see if that can still exit to a browser.

It's weird though as the trace specifically says it is "exiting with URL" which is identical to the test app.

Honestly this "finish the game off" stage takes bloody forever. Wrote the main game in an afternoon, and that code has hardly changed since then, and it's now been about 4 months of "everything else"...

As an alternative is there any other way to kick off a URL do you think? I know Trucidare has/will have a library to allow a URL inside an app. Do you think (or anything else you can think of) this would be a good (possibly better) workaround the problem?

Cheers
Current fave quote: Cause you like musicians and I like people with boobs.

Kitty Hello

No. There's no other way than the PDL_ function I use :(

Crivens

Hmm. Ok I will try the memory release later. Out of interest, assuming that is the problem, could the same thing be done by GLB? ie. if WebOS and doing NETWEBEND then clear out all memory it can first before exiting?

Cheers
Current fave quote: Cause you like musicians and I like people with boobs.