XojoScript scheduled for any updates?

I’ve been gearing up for a soft protocol implementation with xojoScript so that I don’t have to have quite so many separate command line apps, just one and many small scripts to handle different versions. I read the entire 2 pages of documentation in the users manual on it and just assumed that it was very similar to xojo proper, but not 4 lines into my startup code I find there is no binary stream and no memory block. Is there a more extensive look somewhere at what is implemented in there and what is not? I’ve pretty much given up using it for this project because I do not want to imagine the acrobatics necessary to pull double values out of a string having to write my own accessors using mid and asc commands. Obviously I understand the sandbox won’t let it directly access disk files but the conversion between string and memory block and binary streams is one of the most useful things to me in Xojo proper and I can’t do it in xojoscript? I didn’t realize that xojoscript and xojo were really totally separate things I guess and am disappointed. I don’t think I can use it for this project at all.

you an extend what methods are available in xojo script by adding them to the context object
you still cant pass objects from xojo script to xojo or the other way but you can add a lot of functionality in the context

Keep in mind that you can add “classes” to XojoScript as well, albeit mostly implemented as a front end with calls to functions through the Context object Norman refers to above.

so I can create my own binary stream class and pass the string and the current offset off to global methods in the context class for reading and writing specific entities to it and then return the string back into the script again… Or I could not pass the data at all and just an ID number for an indexed binary stream in the host app and pass that back and forth, looking up the stream in question and performing the reads/writes and managing the data reply.

That would probably work…

Before I do that though I need to experiment with my other assumption :wink: Reading ancient articles that, I think, Thomas Templeman, wrote about RBScript he had a clever way of threading them. I don’t need to be threaded by I need to send events into the script. I was planing to send it commands through input. The script would be initialized and then when it was ready for a packet it would call the input method, and in the host programs handler for that I will just call doEvents until I have a packet for it to handle, and then serialize it and pass it as the response. Before everyone starts having palpitations this will be a single threaded command line app so calling doEvents will be acceptable and even necessary :wink: Is hanging it up in the input handler like that still likely to work? I think Thomas did it by starting up the script in a thread and calling yield to next thread until he needed it to do something again, but I don’t need multiple threads at once. I just need to be able to pass data back into the script to trigger events rather than just run it…

Another way to handle that is to create an external storage mechanism in the context object and then run the script each time with the context attached. To fire off “events” you can just append a call to the approriate method at runtime.