схема
Add(MainForm,1950040,91,70)
{
Width=298
Position=1
}
Add(Button,5706304,238,119)
{
Left=75
Top=15
Caption="Test!"
link(onClick,6087008:doEvent1,[])
}
Add(Edit,13453822,336,70)
{
Left=15
Top=15
Text="1000"
}
Add(For,6980961,329,126)
{
Start=1
link(onEvent,8686094:doEvent1,[])
link(End,13453822:Text,[])
}
Add(Label,7779441,476,133)
{
Left=135
Top=20
Width=10
Height=17
Caption="0"
}
Add(CounterEx,14700149,427,133)
{
Max=999999999
link(onNext,7779441:doText,[])
}
Add(Hub,8686094,385,126)
{
link(onEvent1,16037272:doWork,[])
link(onEvent2,14700149:doNext,[])
}
Add(StrCatDelim,6856616,637,126)
{
Delimiter=": "
link(onStrCatDlm,6742944:doAdd,[(685,132)(685,118)])
}
Add(InlineCode,16037272,581,126)
{
WorkPoints=#6:doWork
EventPoints=#8:onResult|
Code=#15:unit HiAsmUnit;|0:|9:interface|0:|4:uses|28: Windows, KOL, Share, Debug;|0:|4:type|29: THiAsmClass = class(TDebug)|11: private|0:|10: public|29: onResult: THI_Event; |54: procedure doWork(var _Data: TData; Index: Word);|6: end;|0:|14:implementation|0:|3:var|19: Counter: Integer;|0:|60:procedure THiAsmClass.doWork(var _Data: TData; Index: Word);|3:var|22: OutDT, TmpDT: TData;|16: FreeDT: PData;|5:begin|15: Inc(Counter);|2: |35: // Хочу выдать в поток 2 элемента|28: dtInteger(OutDT, Counter);|36: dtString(TmpDT, Int2Str(Counter));|2: |36: AddMTData(@OutDT, @TmpDT, FreeDT);|2: |32: _hi_OnEvent_(onResult, OutDT);|2: |19: FreeData(FreeDT);|4:end;|0:|0:|0:|0:|4:end.|
link(onResult,6856616:doStrCatDlm,[])
}
Add(ListBox,6742944,700,112)
{
Left=15
Top=45
Width=260
Height=215
}
Add(Hub,6087008,287,119)
{
link(onEvent1,6742944:doClear,[])
link(onEvent2,6980961:doFor,[])
}