| STATIC SUB Attach ( Object AS Object, Parent AS Object, Name AS String ) |
Every event raised by the object will be managed by an event-handler located in its parent.
If the parent is a class, then the the event-handlers will be static methods of the class.
PUBLIC Process1 AS Process
...
SHELL "find /" FOR READ AS Process1
Object.Attach(Process1, ME, "Process1")
...
PUBLIC SUB Process1_Read()
Message.Info("Got output from Process1!")
' and then read and do something with the output...
END