Telegram_2023-05-31T07

<< Click to Display Table of Contents >>

Navigation:  Telegram > 2023 > 05 > 31 >

Telegram_2023-05-31T07

Telegram link

 

2023-05-31T07:03:44

 

I'm creating a second data module (when i need it), and it takes a few seconds, however, nothing happens on the screen... how do I invoke a busy signal manually while the unit is being created ? In win apps it used to be something like screen.cursor := crHourGlass etc... finally,... screen.Cursor := crDefault. How do I achieve this in IW ?

 


 

Telegram link

 

2023-05-31T07:04:51

 

try HoldOn.js

 


 

Telegram link

 

2023-05-31T07:04:58

 

nice

 


 

Telegram link

 

2023-05-31T07:05:48

 

so nothing built into IW then ?

 


 

Telegram link

 

2023-05-31T07:07:28

 

You could use LockOnAsyncEvents if the creation is triggered by a control but it means the whole screen would be overlayed rather than a cursor.

 


 

Telegram link

 

2023-05-31T07:07:38

 

dang

 


 

Telegram link

 

2023-05-31T07:08:08

 

long as i dont get into callback hell. LOL

 


 

Telegram link

 

2023-05-31T07:09:46

 

maybe a promise execution inside a function to resolve during a setTimeout()... hmmm

 


 

Telegram link

 

2023-05-31T07:10:33

 

the way I did it was created a unit which has the following procedures

 


 

Telegram link

 

2023-05-31T07:10:35

 

procedure HoldOn_Open(inMsg: string);

 

begin

 

var aCmd :=

 

' type: link HoldOn.open ({theme:\sk-rect\, '+#13+

 

' message:'''+inMsg+''','+#13+

 

' textColor:\white\ '+#13+

 

' });';

 

Usersession.WebApplication.CallBackResponse.AddJavaScriptToExecuteAsCDATA(aCmd);

 

end;

 

procedure HoldOn_Close;

 

begin

 

Usersession.WebApplication.CallBackResponse.AddJavaScriptToExecuteAsCDATA('HoldOn.close();');

 

end;

 


 

Telegram link

 

2023-05-31T07:11:13

 

then I just reference the unit and call HoldOn_Open('Loading');

 


 

Telegram link

 

2023-05-31T07:11:26

 

yeah that looks like what i'm trying to achieve.

 


 

Telegram link

 

2023-05-31T07:11:32

 

when done, I call HoldOn_Close;

 


 

Telegram link

 

2023-05-31T07:11:54

 

im looking at holdon now.

 


 

Telegram link

 

2023-05-31T07:12:09

 

it's 8 years old. LOL

 


 

Telegram link

 

2023-05-31T07:12:12

 

type: link https://github.com/sdkcarlos/HoldOn.js/tree/master/src/download

 


 

Telegram link

 

2023-05-31T07:21:11

 

hmmm... well i'd like the current customlocker image i'm using to work ( as it does internally by IW in other places )... to be the one that happens when i'm opening up this secondary data module.

 


 

Telegram link

 

2023-05-31T07:31:25

 

well it kind of works. i mean, the locker image shows up for a quick second and then goes away.

 


 

Telegram link

 

2023-05-31T07:31:32

 

try

 

HoldOn_Open('Loading...' );

 

FFORM_TOOL_OFAC_SEARCH := TformToolOfacSearch.Create( WebApplication );

 

FFORM_TOOL_OFAC_SEARCH.Show ;

 

FDM_OFAC := TdmOFAC.Create( WebApplication );

 

finally

 

HoldOn_Close ;

 

end ;

 


 

Telegram link

 

2023-05-31T07:31:40

 

i thought by putting it inside a try/finally it would behave.

 


 

Telegram link

 

2023-05-31T07:34:53

 

and yeah, thanks - the sk-rect is what i wanted. so this should work once i play around with it for a bit.

 


 

Telegram link

 

2023-05-31T07:39:01

 

TformToolOfacSearch.Create( WebApplication ).Show ;

 

try

 

HoldOn_Open('Loading...' );

 

FDM_OFAC := TdmOFAC.Create( WebApplication );

 

finally

 

HoldOn_Close ;

 


 

Telegram link

 

2023-05-31T07:46:59

 

now i'm wondering if \WebApplication.TryLock\ does anything these days.

 


 

Telegram link

 

2023-05-31T07:51:13

 

if FFIRST_TIME then

 

begin

 

FFIRST_TIME := False ;

 

try

 

HoldOn_Open('Loading...');

 

UserSession.FDM_OFAC := TdmOFAC.Create( WebApplication );

 

finally

 

HoldOn_Close ;

 

end;

 

// now fetch latest data

 

UserSession.FDM_OFAC.FetchLatestData ;

 

end;

 


 

Telegram link

 

2023-05-31T07:52:45

 

seems that I had to move the creation of the datamodule to the child form's \OnShow\ event - and i use an inherited base form that has a variable called \FFIRST_TIME\... if i ever want to use it on any child form. So this made it all work nicely. Only difference is that HoldOn's version of the sk-rect is huge compared to the one i'm using in my ServerController customlockeranimation gif. But I think it's doable.

 


 

Telegram link

 

2023-05-31T07:53:46

 

but in the end, yeah, thanks prosper the HoldOn works nicely. maybe i'll just use a different image for the HoldOn when I use it.