Non-GUI .NET Components
The classes created under the
Before creating the .NET object, the
The following method shows how the generated classes and methods are used.
vars b, b2 : Basic; // Subclass of JadeDotNetType begin // Create a Jade instance of the class representing the .NET object create b transient; // Optionally, specify where the actual .NET object is created b.usePresentationClient := false; // Request the creation of the corresponding .NET object b.createDotNetObject; // Use methods and properties on the Jade instance // to access members of the .NET object write b.integer; b2 := b.anotherOne; epilog delete b; delete b2; end;
Event handling on components is a little more complex. By default, component events are not passed onto Jade. To start receiving such events, a call is made to the
-
The first parameter indicates to which object the event should be delivered.
-
The second parameter specifies a reference property on the receiver, of the type that contains the events.
Events are implemented in the Class Browser, by clicking on the reference property in the receiver class, which displays all of the events available in the method pane. These events are shown grayed out until you add code to that event. This is identical to how you code an event on a control in a form; that is, with the form selected, click the control reference, select the methods to implement (