Re: Eval Script
- Posted by cklester <cklester at yahoo.com> Dec 15, 2005
- 560 views
The thing is with scripting or plug-ins, I expect those things to modify data in the current program. For instance, if I've got a music player and I provide an interface for filtering, I expect that plug-in to be able to modify the stream of bits representing the music. The same for a graphics program. If I have an image and I want to run it through a plug-in filter, how would that program interact with the plug-in so that the internal data- the graphic- is modified by the plug-in? I can think of at least two ways: + Plug-ins are actual Euphoria program files. In this case, the program creates a file called "mod_this.dat". Then it opens and loads the plug-in file, which is actually just a Euphoria program. The program runs this code using scripting (like Alex C's Multiplatform Eval Script). The program reads the plug-in's output and continues with the new data... The plug-in can provide a progress bar and cancel button if desired. This way would not crash the original program. + Plug-ins are Euphoria include files, which can be dynamically included with Vincent's dynamic include library. They have to call a registration routine. This could cause the program to crash if the plug-in wasn't robust. + Other ways...? -=ck "Programming in a state of Euphoria." http://www.cklester.com/euphoria/