5

Use Javascript language with Seed looks great. But how do you use it in Windows, Mac, Android? Is there any port available for those?

I was trying to test them in cross-platforms where in my Gnome it works only, such as: http://git.gnome.org/browse/seed-examples/tree/

#!/usr/bin/env seed

Gtk = imports.gi.Gtk;
Gtk.init(Seed.argv);

var window = new Gtk.Window({title: "Example"});

window.signal.hide.connect(Gtk.main_quit);
window.show_all();

Gtk.main();

2 Answers2

3

It might not be the answer you are looking for, but the seed wiki states that seed is for the "GNOME platform", it's not coming with a cross platform GTK all-in-one package.

If you want to do lightweight and interpreter-centric cross platform development with javascript, you may want to look at Mozilla's rhino (probably coupled with swt, I found that pretty easy - did a couple of scripts that work on osx/win/linux if the machine has java and js.jar), or node.js (if no gui is required, I never had luck with node graphical bindings in a cross platform fashion) - node-webkit from Intel's opensource department also looks interesting.

If Android is a must and you care to give up interpreters, you may try as3 (the flex sdk is "free" and now we have captive runtime air apps) or neko/haxe, they are ecmascript dialects, but of course there are quite a lot of possibilities; these are the ones I looked at earlier. Hope it helps and sorry if it did not.

  • Just want to tell you: node-webkit is amazing. It fits my own needs perfectly. Thank you for making us aware! :) – DaVince Jul 09 '13 at 21:40
0

Szabolcs Kurdi is right but there is a solution to get javascript to work with gui in Windows.

its called app.js and is a highly developed nodejs module. (Windows, Mac, Linux)

appjs.org

check it out if you like. i personaly use it and love it.

you even can use webkits javascript debugger IN it by calling window.frame.openDevTools(); and you can forward module methods into the dom of it.

besides using appjs you could use .hta files in windows in order to create forms using javascript. i would not recommend this though since microsoft jscript is very limited in debuggability, performance and support.

you also need to keep in mind that gnome uses javascript in its core in multiple ways so it has api's to native methods that you will not find in microsoft's jscript.

in order to get something similar i would srsly recommend you nodejs since you can extend it with thousands of modules (while appjs is one of them).

GottZ
  • 4,824
  • 1
  • 36
  • 46