PROGRAM SetWord.ms.script
USES
Testing.ms.dict
;
: Holder
; // Holder
Test&Dump SetWordTest
VAR W
@ Holder @ . 'A' AddMethod >>> W
W pop:KeyWord:Name .
W pop:KeyWord:Word .
W pop:KeyWord:Word pop:Word:Name .
'X' W pop:KeyWord:Word DO
'Y' Holder -> A
'Z' Holder ->^ 'A' DO
@ Holder .AddMethodWithParams: 'B' 'Hello' .
Holder -> B
@ Holder .AddMethodWithParams: 'C' @ . .
Holder -> C
@ Holder .AddMethodWithParams: 'D' ( 1 2 3 ) ( . . . )
Holder -> D
@ Holder .AddMethodWithParams: 'E' ( 1 2 3 ) ( IN p1 IN p2 IN p3 p1 . p2 . p3 . )
Holder -> E
; // SetWordTest
SetWordTest
Пример использования:
INTERFACE elem_func RegisterServiceImplementationMethod
//Cached:
(
'bind' nil MakeFunction
DUP
VAR l_Boxed
pop:WordBox:Boxed >>> l_Boxed
l_Boxed -> Stereotype := st_ini::Operation
l_Boxed -> Visibility := PrivateAccess
l_Boxed -> %SUM := ( 'Регистрация ' Self .TypeName Cat )
//l_Boxed ->^ cUserCodePrefix ^:= ( Self .BindServiceImplementationUC )
l_Boxed .AddMethodWithParams: cUserCodePrefix Self .BindServiceImplementationUC
)
>>> Result
; // RegisterServiceImplementationMethod
Комментариев нет:
Отправить комментарий