Delay in hide syntax (hiding dropdown/buttons)


Amin Mousavi

Hi David,

In a few places in my app I need to show and hide some elements depending on the tabs that users clicks on. The problem I have is long delay after user clicks on the tab and before the element is hidden. In short user needs to wait a second till he/she sees the changes!

By reading through the forum I have got the idea that I might be able to use SetStyle or AddClass and use CSS to hide and how my stuff quicker but I thought I better double check that with you in case I have done something wrong or there is a trick I am not aware of.

Thanks,


decsoft

Hello Amin,

Please, try to use the"ApplyModel" action after you hide the stuff.




Amin Mousavi

Hi David,

Used "ApplyModel" but it does not make any difference. To describe the scenario in more details, here is the code I have in a function:

>

SetStyle "Button7" "color" ""

SetStyle "Button8" "color" "#ffffff"

SetStyle "Button9" "color" ""

Show "Button26"

Hide "Button20"

Hide "DropDown1"

ApplyModel

>

The setstyle and show part works fine and quick but hide part lags behind. As you can see I used Applymodel at the end of the code but made no difference.

Thanks 

decsoft

Hello Amin,

The "ApplyModel" action can work in certain situations: since I am not sure about what exactly is your situation, I suggest their usage, so maybe do the trick.

My recomendation is that you run the app Firefox with the Console Developer opened (press F12 in Firefox and select the Console tab) and see if some error occur, which can cause that the code that you want to executed are not executed in the proper way.

On the other hand, since it's not a common situation, I need a way to reproduce the problem here, so I can take a look by myself. Maybe you can prepare an small app sample that reproduce the problem, or, maybe you can give me access to the whole app, then I can take a look.

What do you think about?



decsoft

Hello Amin,

After take a look at the app sample that you send to me, I certainly can see a non very good delay when show and hide controls, at least in similar circumstances like in the refered sample app (I don't see this before). Please, upgrade your App Builder copy, remove the "_Compiled" directory of your app, compile your app with the new release of App Builder and take a look: if everything is right you can see now that the "Hide" and "Show" actions works without the refered delay.



Amin Mousavi

Hi David,

You are awesome! Just managed to test it and it is working great now, quick and smooth, THANKS A MILL


decsoft

Hello Amin,

Always thanks you for your support and for your kindly words. :-)


Todo el mundo puede leer el foro de soporte de DecSoft para aprender del mismo, sin embargo, sólo los clientes de DecSoft pueden abrir nuevos hilos. Compre una o más licencias de productos de DecSoft y obtendrá este y otros beneficios.

Este sitio utiliza "cookies" útiles para almacenar sus preferencias.

Bien. Ocultar esta nota. Obtener más información.