Skip to content

Counter is wrong #4

@czhower

Description

@czhower

Running the console app I get:

host :: tobyOnLoad called
node :: hi~
node :: toby.version = 0.1.7
host :: tobyHostCall called. dory : {"num":42,"foo":"foo"}
node :: toby.hostCall() = from tobyHostCall
node :: toby.on(test) = 3
node :: toby.on(test) = 4
host :: tobyOnUnload called. 42

If I change the code to:
Sleep(3000);
while true do begin
i := i + 1;
toby.emit('test', PAnsiChar(IntToStr(i)));
end;

It appears that .start returns before the init is finished instead of waiting. Is there a way to detect when it is ready? Or is the intended usage meant to just wait on the tobyOnLoad callback which the Console demo does not wait on?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions