Hscript with classes, aka "hscript-ex"

So in my never ending pursuit to procrastinate, in a looooooong meeting one day, i added classes to hscript :slight_smile:

They arent particularly clever, but they are functional, you can extend from haxe classes (and hscript “classes”), i dont really have a need for this to be honest, but i thought it might be kinda cool to try, especially once i found that hscript already processed modules / classes, so its just a matter of using them.

As i mentioned, i dont really have a specific need for them, and script classes will not feature in haxeui (directly at least) but i thought maybe someone might have some fun with them too, so heres the repo: GitHub - ianharrigan/hscript-ex

Speaking of fun, in the repo there is a very boring “plugin” system to show how useful hscript classes might be (keep in mind these “plugins” will work on all haxe platforms, not a js module, or a java jar, etc). So with that in mind i decided to see how far i could take this type of plugin system, so created a very straight forward windowing and “application” framework in haxeui (about 1-1.5k LoC), then plugged in some hscript classes to see how it all fared - it worked out far too well!




So maybe this lib might be useful after all! Regardless, it was fun to develop (the windowing system and the hscript-ex itself) and maybe, just maybe, someone might get some actual use out of it.

Enjoy!
Ian

8 Likes

Forgot to add the obligatory gif of it the script classes in action (its from an older version, styled differently, but the concept is the same):

2 Likes

thank you for share this .it’s useful for me!

1 Like

It would be better if support static function call ! :grinning: