- This topic has 1 reply, 1 voice, and was last updated 5 years, 7 months ago by .
Viewing 1 reply thread
Viewing 1 reply thread
- You must be logged in to reply to this topic.
Hi Kim
In OnShow event of my main form I have the following code:
v:= DM.kbmMWPooledSimpleClient1.Request(‘SVC_Common’, ‘1.0’, ‘GetLookupTable’, [‘all’]);
RefreshLookupAll_LoadTables(v);
And it works ok. I would like to do it in a thread, but this code doesn’t work:
Scheduler.Run(procedure
begin
v := DM.kbmMWPooledSimpleClient1.Request(‘SVC_Common’, ‘1.0’, ‘GetLookupTable’, [‘all’]);
end
)
.SynchronizedAfterRun(
procedure
begin
RefreshLookupAll_LoadTables(v);
end
)
.Activate(True);
It never comes to AfterRun part. Variable v is variant declared in global space and nothing is touching it, except this code.
Is there some settings in kbmMWPooledSimpleClient which should be set? I was not able to figure it out. Am I missing something?
Thank you.
Scheduler.Run(procedure(const AScheduledEvent:IkbmMWScheduledEvent)
begin
v := DM.kbmMWPooledSimpleClient1.Request(‘SVC_Common’, ‘1.0’, ‘GetLookupTable’, [‘all’]);
AScheduledEvent.Data := v;
end
)
.SynchronizedAfterRun(
procedure(const AScheduledEvent:IkbmMWScheduledEvent)
begin
RefreshLookupAll_LoadTables(AScheduledEvent.Data);
end
)
.Activate(True);
Doesn’t work either… 🙁