HI HI HI!
JavaFX Script is dead. No, it isn't, it will rebirth as Visage. You know I love JavaFX Script because it's easy and fast to build what you want. Anyway, JavaFX will be better on next months...
Well, I'm presenting another JavaFX app tagged as Useful, at least for me and some brazilian fishers... Our goal is to search basic information about fishes using the art of Screen Scrapping. The information is in Portuguese, because the easiest page I found to scrap was in Portuguese...
I'm using Google images too. Take a look below, all I can say is: JavaFX is great.
public function getFishImages(fishName: String, callback: function(: String[]): Void) {
var urls: String[];
imageRequest.stop();
imageRequest = HttpRequest {
location: "http://ajax.googleapis.com/ajax/services/search/images?v=1.0&q={fishName}&rsz=large&start=1"
onError: function(e){println(e)}
onInput: function(is: InputStream) {
def parser:PullParser = PullParser {
documentType: PullParser.JSON
input: is
onEvent: function(e: Event) {
if (e.type == PullParser.END_VALUE) {
if (e.name == "url") {
insert e.text into urls;
}
}
if (e.type == PullParser.END_DOCUMENT) {
callback(urls);
}
}
}
parser.parse();
}
}
imageRequest.start();;
}
The app:
Now you can run the app and/or download the source.
If you are still interested in JavaFX Script you should check my humble JavaFX applications page :).
Peace.
Willian, very god app!
ResponderExcluirThe JavaFX Script is very good!
Thanks for the source code!
Here, Leonardo Fabris from the group.
Thanks again!
Thank you Leonardo!
ResponderExcluir