As Dave stated, it were some more than 5 minutes.It took a little more than five minutes
You are right, another example of the great support of neosoft.
Regards
Moderator: Neosoft Support
As Dave stated, it were some more than 5 minutes.It took a little more than five minutes
Now you have just basic and simplest example, and you are just at the beginning of your annoying researches. After you dig into marshalling datatypes and structures you will face another problem - error trapping. Read more about catching errors from unmanaged code, it's not trivial task. Then (if you have serious project) you will run into memory management issues ("garbage collect"'ed pointers and so on), syncronization issues (if u have async tasks, nb interface functions must not be called async (or via interfaces) directly)... If you'll need help I will answer smart questions regarding all this stuff.Tons of thanks again and the 5 minutes for you saved me (and most likely many others) weeks of annoying researches that have nothing to do with our daily business, so don't really bring along any benefits for us after "the job is done".
The array tells NeoBook what types of parameters the action requires. The integer tells NeoBook how many parameters there are which is the same as the length of the array.The function syntax in your template seems to follow this structure:
AddActionProc(int function_id, string function_call_name_in_neobook, string function_description_in_neobook, byte[] mysterious_byte_array, int mysterious_integer, int parameter_amount);
So as you can guess: I fail to understand what the "mysterious_byte_array" and the "mysterious_integer" are used for.
One of the parameter types above is called "ACTIONPARAM_VARIABLE". This parameter is assumed to be the name of a NeoBook variable. This is where you can insert the results of your function using the nbSetVar function defined in the C# template.Furthermore the question I ask myself is, how does the structure need to look like, when I want to return values to NeoBook (maybe even int/string arrays) and how do I access return value fields in the _nbExecAction function? It only returns bool to give a feedback over fail or success of the function...
NeoBook is very forgiving about variables. If you try to read or write to a variable that doesn't exist, NeoBook will automatically create it for you. It's not an error to reference a variable that doesn't exist in NeoBook.- we have a variable with action text and we start our nbPlayAction(variable)
what if our variable doesn't exist anymore (or it's contents has changed) just right after we started nbPlayAction? Is it okay to neobook? or maybe it needs variable to be alive during nbPlayAction execution time?
nbPlayAction is not thread safe because nearly every NeoBook action has the potential to update the screen. It's actually unusual to make numerous calls to nbPlayAction from a plug-in. There are occasional uses for it, but typically the role of a plug-in is to provide some type of feature NeoBook doesn't support. The out of resources error you posted appears to be coming from NeoBook's debugger. It may be that whatever you're doing is creating too many nested actions.- we have started nbPlayAction(variable) and immediately (first call is not finished yet) we have another call to nbPlayAction? Is interface functions thread-safe? Can it be the reason to crash?
I'm just making neobook react to some event by playing GoSub "Subroutine", nothing unusual. And event may occur whenever it (user) wants.nbPlayAction is not thread safe because nearly every NeoBook action has the potential to update the screen. It's actually unusual to make numerous calls to nbPlayAction from a plug-in.
No just making researches on net-nb interoperability in details under different circumstances.Are you trying to feed some kind of live data to NeoBook?