Hi.
I've recently installed gambit on my android phone ( https://play.google.com/store/apps/details?id=org.keithflower.gambit ) and it seems to work fine. I would now like to know if it's possible to create from this gambit an UI for the apps I want to develop?
I'm not looking at much, I'd just like to be able to print some text, and then to print a keypad on which to feed data. Something as simple as http://img.softpile.com/mobile/screenshots/38/2012042621504410.png
So, is it possible?
That webview thing seems to be available, and an old comment at http://comments.gmane.org/gmane.lisp.scheme.gambit/5285 seems to say that UIs could be written with it, but I don't really see how. Assuming I have a form, where do I post to?
If there's another way to run apps written in Gambit and that use a GUI, I'd be interested to hear about it.
Cheers,
P!
-- Français, English, 日本語, 한국어
Afficher les réponses par date
Marc has some super old examples of talking to Qt from Gambit. You could try using that with the new Qt 5 for Android (also experimental I think) from Digia. Assuming you can setup a sane build environment, that should work well.
On Fri, May 3, 2013 at 11:02 AM, Adrien Piérard pierarda@iro.umontreal.cawrote:
Hi.
I've recently installed gambit on my android phone ( https://play.google.com/store/apps/details?id=org.keithflower.gambit ) and it seems to work fine. I would now like to know if it's possible to create from this gambit an UI for the apps I want to develop?
I'm not looking at much, I'd just like to be able to print some text, and then to print a keypad on which to feed data. Something as simple as http://img.softpile.com/mobile/screenshots/38/2012042621504410.png
So, is it possible?
That webview thing seems to be available, and an old comment at http://comments.gmane.org/gmane.lisp.scheme.gambit/5285 seems to say that UIs could be written with it, but I don't really see how. Assuming I have a form, where do I post to?
If there's another way to run apps written in Gambit and that use a GUI, I'd be interested to hear about it.
Cheers,
P!
-- Français, English, 日本語, 한국어 _______________________________________________ Gambit-list mailing list Gambit-list@iro.umontreal.ca https://webmail.iro.umontreal.ca/mailman/listinfo/gambit-list
In Keith Flowers Gambit-C for Android, there is a "program.scm" file that contains:
(define (set-page content handler) (set! event-handler handler) (set-webView-content content) (show-webView))
and that's pretty much what you would do. The same file shows building and html string for the content, and adding a function for the handler.
http://apps.keithflower.org/?page_id=152
to download the source archive.
I believe Android supports html5, so I would play with the <canvas> tag and a bit of javascript (you can just dump the graphic you want into the webView content to try). Interaction will be limited so a drawing program may not be.. um.. a good thing to do, but basic stuff like editing the scripts, and pushing buttons is done is program.scm, and can be "borrowed".
Anyway, you don't "post", you generate "events" using javascript embedded in the content.
If your application started an "integrated" web server, you could "post" to that web server. But, I think the content/handler approach brings everything together nicely, and is preferable.
FredW
Alright, thanks. I'll investigate that when I have a bit more time.
Cheers,
P!
On 8 May 2013 13:26, Fred Weigel fred.weigel@zylog.ca wrote:
In Keith Flowers Gambit-C for Android, there is a "program.scm" file that contains:
(define (set-page content handler) (set! event-handler handler) (set-webView-content content) (show-webView))
and that's pretty much what you would do. The same file shows building and html string for the content, and adding a function for the handler.
http://apps.keithflower.org/?page_id=152
to download the source archive.
I believe Android supports html5, so I would play with the <canvas> tag and a bit of javascript (you can just dump the graphic you want into the webView content to try). Interaction will be limited so a drawing program may not be.. um.. a good thing to do, but basic stuff like editing the scripts, and pushing buttons is done is program.scm, and can be "borrowed".
Anyway, you don't "post", you generate "events" using javascript embedded in the content.
If your application started an "integrated" web server, you could "post" to that web server. But, I think the content/handler approach brings everything together nicely, and is preferable.
FredW
Gambit-list mailing list Gambit-list@iro.umontreal.ca https://webmail.iro.umontreal.ca/mailman/listinfo/gambit-list
A couple of warnings, now that I am playing around with Flowers Android Gambit-C
1 - The (splash) procedure must be called before editing of scripts on the device can be done. 2 - The first script is always executed. Normally, this calls (splash). 3 - If you add a script, make THAT call splash, and any other startup code before that. 4 - Edit the original "splash" script.
So, the script editing is a bit weird. The editing box is 9 lines by half the screen on my phone. Maybe the html can be replaced to fix this.
5 - If you mess up the scripts, you should still get DIRECTLY into the REPL.
From the REPL, use (reset-scripts), then exit, kill Gambit-C and re-enter.
Scripts will be reset to default.
6 - You WILL need to keep separate copies of all your local scripts.