irigsoft Posted March 24, 2025 Posted March 24, 2025 Hi. Sometimes i get freezing mask on form Google console show this error: at this moment form looking by this way Is it possible to hide mask in this situation and keep working. uniSession is alive, but can't work while mask is shown. Quote
Sherzod Posted March 24, 2025 Posted March 24, 2025 Hello, The error MainForm is not defined seems a bit strange on its own. Could you clarify what might be causing this? Quote
irigsoft Posted March 24, 2025 Author Posted March 24, 2025 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 Quote
irigsoft Posted March 24, 2025 Author Posted March 24, 2025 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 ? Quote
Sherzod Posted March 24, 2025 Posted March 24, 2025 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? Quote
irigsoft Posted March 24, 2025 Author Posted March 24, 2025 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. Quote
Sherzod Posted March 24, 2025 Posted March 24, 2025 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? Quote
Sherzod Posted March 24, 2025 Posted March 24, 2025 Are you relying on the button's ScreenMask feature, or do you show the mask manually? Quote
irigsoft Posted March 24, 2025 Author Posted March 24, 2025 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. Quote
irigsoft Posted March 24, 2025 Author Posted March 24, 2025 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. Quote
irigsoft Posted March 24, 2025 Author Posted March 24, 2025 @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)? Quote
irigsoft Posted March 25, 2025 Author Posted March 25, 2025 @Sherzod is it possible to hide mask on client side after some seconds? Quote
Sherzod Posted March 25, 2025 Posted March 25, 2025 20 minutes ago, irigsoft said: is it possible to hide mask on client side after some seconds? We are checking. Quote
irigsoft Posted March 25, 2025 Author Posted March 25, 2025 31 minutes ago, Sherzod said: We are checking. ok Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.