On 10/27/2009 09:30 PM, Roland Plüss wrote:
On 10/26/2009 08:10 PM, Roland Plüss wrote:
Why the gst_set_executable_path does not exist in gstpub.h
I don't know.
Just an old version of GST.
It's 3.0.5 , that should not be too old shouldn't it?
No, but set_executable_path was added in 3.1. :-)
from that time on I operate on the game object sending all kinds of
messages. What goes for calling the initGame method I think I figured
out from the docs how this is supposed to be done but what goes for
loading the script files and parsing them I'm still at a loss.
_gst_process_file works. If the file is just a bunch of class and
method definition, it won't block.
If the main program is written in Smalltalk, you actually want to make
it blocking though.
What exactly you understand as a main program? What I want is to load
only a bunch of classes with the script files. The main program is the
game loop run inside the game engine (c++) which then occasionally sends
messages to the game object ( which in turn is an instance of some game
base class provided to the developer ). So if I get you correctly then I
can simply call _gst_process_file for any single script file without
getting a block.
Yes. I now understand you.
Is there a way to prevent this function call from ever
blocking?
No, that's not possible. You could run _gst_process_file in a separate
thread though. When _gst_process_file finishes, the thread would tell
the main thread that it can execute Smalltalk code. Until
_gst_process_file finishes, the main thread could keep executing, but
would not be able to execute Smalltalk code.
I guess I posed the wrong question. I talk about the c functions in the
gstpub.h file like for example _gst_process_file and company. I didn't
find a man page or anything in the docs which outlines how to use these
c functions or which kind of parameter values they know/accept.
The functions beginning with _gst_ are not public, only those beginning
with gst_ are (each gst_ function has a private counterpart; they're
exactly the same and are separated just for optimization purposes).
Most of these are documented in the info manual. gst_process_file is an
exception (it is documented by an example, but not in the function
reference).
Paolo
_______________________________________________
help-smalltalk mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-smalltalk