1234567891011121314151617181920212223242526272829303132333435 |
- unit hello;
- {$mode ObjFPC}
- {$modeswitch externalclass}
- interface
- uses
- Rtl.WorkerCommands;
- Type
- TJSHelloCommand = class external name 'Object' (TCustomWorkerCommand)
- msg : string;
- end;
- { TJSHelloCommandHelper }
- TJSHelloCommandHelper = class helper (TCustomWorkerCommandHelper) for TJSHelloCommand
- class function create(aMessage : String) : TJSHelloCommand; static;
- end;
- implementation
- { TJSHelloCommandHelper }
- class function TJSHelloCommandHelper.create(aMessage: String): TJSHelloCommand;
- begin
- Result:=TJSHelloCommand(createCommand('hello'));
- Result.msg:=aMessage;
- end;
- end.
|