Thanks Rex and Ashley for the info
I looked through the example code you posted, Rex,
and in the context of some of the things you said, Ashley,
I think I kind of see what's going on.
Is there a place in any of the runtime files I could look to see the implementation of the SOL system?
In particular I'd be interested to see a list of the available methods and fields you can use to interact with the SOL.
Kind of the SOL "interface".
Is a SOL attached to each C2 object type, and implemented as a SOL JavaScript object, assigned to a JavaScript field of the c2 object type?
Or is it something global to the entire runtime?
I might be misremembering, but it seems like I've been seeing things that looked to me like they could indicate that it's handled on a per C2 object type basis.
I haven't yet been able to track the references to the SOL far enough back upstream to see where they are originating from.
I also gather that there is a SOL stack that is used to store (for later restoration) SOL state as you recurs into deeper levels of events. Though again, I'm having trouble finding the actual code that would make it clear if that stack is a field of a C2 object type. I suspect that it might be in the commonace.js file, but I haven't been able to spend much time poking around in it yet.
Sorry for the noobly questions.