hi,
onInit() onSetStrValue()
Yes you are right, that it should be unified. I will leave all naming upon you so I will definitely change it into Init() and SetStrValue
I'm not so clear on how fscript.js/onSetStrValue() should behave -- specifically, the return value seems to get decided purely on whether a single sub-plugin returns true.
Well this behaviour is for pcommand where you have to tell FARR that at least 1 plugin treated it so FARR would not display error message. I do not know other usage of returning value to FARR from OnSetStrValue, so if you know of any we can implement it
But at least some implementation is necessary because pcommand is used quite often.
onInit() in the original fscript.js took a single parameter iirc, in the most recent code candidate the sub-plugin's onInit() doesn't take a parameter. I wonder whether mirroring the original interface is preferable or not. May be it's not a big deal. Any thoughts?
I did it so because there is already curdir implementation via directory variable, so why to have it twice? So I would keep it without any parameter
I'm not sure about loading all fsubscript*.js files -- I wonder whether the loading order might matter in some cases and with the way the code is currently, a sub-plugin writer can only control this based on coming up with appropriate filenames. I hadn't really thought about multiple files per sub-plugin so I start to wonder about the potential consequences and alternative designs smiley
Inclusion of other files can be done with eval(getTextFile("json.js")) if your plugin is too big to practically work in one file.
Well aceradec showed one way which is in fact very easy and straitforward, but still I would keep name variation just for the case when you want to have several small subplugins in one directory which can easily occur. But we can discuss that and if we find it as "baad" idea we can always erase it
I think sub-plugins should not extend global state. fsubscript could expose many useful functions so that plugin developers have less need for sharing things.
Yes exactly that is what I proposed to ewemoa. To have list of useful functions which make js developers life easier. The problem is to decide which to add on the list
I have also one request to ewemoa and aceradec and maybe mouser. Could one of you pls create any environment where we could colaborate on fsubscript plugin? Like propose new modifications etc... I have no experience with that so I will leave it on somebody else