/ comp / gb / object / attach
Object.Attach (gb)
Syntax

    STATIC SUB Attach ( Object AS Object, Parent AS Object, Name AS String )

Attach an object to its parent.

Name is the name used for searching event handlers in the Parent object.

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.

### Examples

    PUBLIC Process1 AS Process
    ...
    Process1 = SHELL "find /" FOR READ
    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