Jump to content

Recommended Posts

Posted

Hi.

Sometimes i get freezing mask on form 

Google console show this error:

image.png.12b2e0d6f6ec6b8522a0cc817d3f868a.png

 

at this moment form looking by this way

image.thumb.png.6fdab724744deb8e3f88d03d6eafe020.png

 

Is it possible to hide mask in this situation and keep working.

uniSession is alive, but can't work while mask is shown.

 

image.png

Posted
34 minutes ago, Sherzod said:

Hello,

The error MainForm is not defined seems a bit strange on its own. Could you clarify what might be causing this?

I'm not sure what the exact problem is.

I've seen how users work (and I've done a test myself), they think the app is slow and sometimes they click more on some components (sometimes it's a button, a grid or something else).

 

I think for some reason they manage to click on the Mask

Posted

Now i make new test and "Mainform is not defined" is not main problem that blocking my app.

New question: is it possible on client side to hide mask after some seconds ?

Posted

Could you please clarify — the “Mask” you're referring to, is it shown on a specific component (like a grid or a button), or is it a general loading mask over the whole form? Also, at what point exactly does it appear — after a server request, a click, or something else?

Posted
7 minutes ago, Sherzod said:

is it a general loading mask over the whole form

they show it on component click. I try some blocking method on Form.Script

var done = false;
var Mytimeout;
document.body.addEventListener('click', function(e){
    if (!done) {

       let Mytimeout = setTimeout(function() {done = true}, 1000); // holds the other handlers for 1sec
       e.preventDefault ();
       e.stopPropagation ();
    }
});

document.body.addEventListener('load', function(e){
    clearTimeout (Mytimeout);
    done = true;
    return true;
    e.startPropagation ();
});
 

I try to addJS on component click :

TuniControl (Sender).ClientEvents.ExtEvents.Values['click'] := 'function click(sender, e, eOpts)'
 + '{'
 // holds the other handlers for 1sec
 + '      let Mytimeout = setTimeout(function() {done = true}, 1000);'
 + '      e.preventDefault ();'
// + '      e.stopPropagation ();'
 + '}';
UniSession.JSCode('Ext.resumeLayouts(true);');

 

but this not help.

 

 

Posted

Do I understand correctly that this logic is meant to delay processing of the first click until the page finishes loading, or just to prevent fast re-clicking?

Posted
15 minutes ago, Sherzod said:

Do I understand correctly that this logic is meant to delay processing of the first click until the page finishes loading, or just to prevent fast re-clicking?

Wait until page finish loading, every time when click on component. Purpose is to block fast re-clicking.

important thing: the tests are done on desktop and mobile device. On mobile devices (Android), the problem appears more often

My unigui is Professional.

5 minutes ago, Sherzod said:

Are you relying on the button's ScreenMask feature, or do you show the mask manually?

on Form I have component uniScreenMask and is Enabled.

every component have properties ScreenMask.Enabled = True, so I am not sure what exactly Mask is shown.

 

Posted

on form creation i have this code:

If (not TuniControl (UniMainModule.NewComponent).ClassNameIs('TuniDBGrid')) then
     TuniControl (UniMainModule.NewComponent).ScreenMask.WaitData := True;

When I click on button and need to show data in grid, application work like waitdata wait forever.

Posted

@Sherzod i think, problem is on this last code.

My problem always occurs when I click the button and need to load the DBgird - video from above.

So, now I set WaitData = False and the application works more stable.

But why did this problem happen and is it possible to use waitdata = true and limit the waiting time (after a few seconds, if the data does not come, the application will stop waiting and hide the mask)?

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...