Jump to content

Anyone Having this Problem?


bruno-pere

Recommended Posts

Hi!

 

My project is working very well (25 forms and frames). Thx Farshad!

 

But I have a random problem here...

 

Windows 7 Pro 64 Bits - Brazilian Portuguese Locale

Delphi XE2 32 bits with Update 1

UniGUI 0.92.0.993

Using dbGO (ado) with Microsoft Sql Server 2005 Database (upgrading to 2012 soon)

 

Usually and basically, in my frames I put a TADOQuery, a Datasource, an UniDBGrid and a ComboBox.

 

I open the AdoQUery in FrameCreate event and close in FrameDestroy event.

 

I also close and reopen the AdoQuery when a filter is chosen in the combobox. As many times as the user changes the combobox.

 

Everything works as expected. No errors, no exceptions. The data is read and the grid shows it.

 

But sometimes nothing happens, the grid shows nothing, no exception is raised (tested without try blocks) and nothing I do shows data again. I need to close the application and reopen again (the app server does not need to be closed and reopened, only the user session).

 

Because the error is random I could not identify yet.

 

Anyone having this problem too?

 

Any tips?

 

Thx!

 

Bruno Lovatti

Link to comment
Share on other sites

Farshad, the problem happened again and I was unable to debug because it's random.

 

What's the correct method to reopen a query inside a frame?

 

Do I need to disablecontrols / enablecontrols?

 

I usually do like this:

 

procedure TUniFrame.ReOpen();

begin

 

try

  ADOQry.DisableControls;

 

  if ADOQry.Active then

    ADOQry.Close;

  ADOQry.Paramaters.ParamByName('PAR1').Value := paramvalue;

  ADOQry.Open;

inally

  ADOQry.EnableControls; 

end;

 

end;

 

Is this correct with UniGUI?

 

Bruno

Link to comment
Share on other sites

Sometimes we have a similar response, always randomly, and always has to restart application. But, in our case, we think (are not sure) that some kind of delays are involved so the problem might be related with how the browsers+AJAX manage situations where are some more delay.

 

Therefore, those random problems appears after "quick responses" from the user, when the proxy has more load than the average (our users access UniGUI application through a proxy) or when the server doesn't respond as fast as usual.

 

This is why we are trying to include screenmasks everywhere to ensure 1) a complete page loading so there are no AJAX requests before the end of loading  

2) and there are not excessive queued AJAX requests.

 

We have seen that those forms called from ones that activate whole screenmasks are less likely to generate this problem. But those screenmasks don't run as well as expected (we have problems that we can't reproduce in a test case, may be because of complexity of some forms), hoping this issue will be solved in future updates of the framework.

 

I do not know if this experience helps, but that's what happens to us.

 

Regards,

Link to comment
Share on other sites

  • Administrators

Sometimes we have a similar response, always randomly, and always has to restart application. But, in our case, we think (are not sure) that some kind of delays are involved so the problem might be related with how the browsers+AJAX manage situations where are some more delay.

 

Therefore, those random problems appears after "quick responses" from the user, when the proxy has more load than the average (our users access UniGUI application through a proxy) or when the server doesn't respond as fast as usual.

 

This is why we are trying to include screenmasks everywhere to ensure 1) a complete page loading so there are no AJAX requests before the end of loading  

2) and there are not excessive queued AJAX requests.

 

We have seen that those forms called from ones that activate whole screenmasks are less likely to generate this problem. But those screenmasks don't run as well as expected (we have problems that we can't reproduce in a test case, may be because of complexity of some forms), hoping this issue will be solved in future updates of the framework.

 

I do not know if this experience helps, but that's what happens to us.

 

Regards,

 

You must make sure screen masks don't overlap.

Also in new versions of framework each control has its own ScreenMask property with new WaitData property. WaitData enables you to wait until all data are loaded into grid.

 

See UIMask-Data demo.

Link to comment
Share on other sites

You must make sure screen masks don't overlap.

Also in new versions of framework each control has its own ScreenMask property with new WaitData property. WaitData enables you to wait until all data are loaded into grid.

 

See UIMask-Data demo.

ScreenMask property is an important advance so thank you for including it.

Our screenmasks don't overlap, however, we will review this point.

 

One question: It's true that target property must point to a specific control?... If so, this control could be the form itself?... If so, when we activate it, the caller form produces an access violation error when tries to show it.

 

Don't worry, if I could confirm this point, I will send you a test case within the Bug Report forum.

 

Regards,

Link to comment
Share on other sites

Thank you!

 

Farshad, the error happens in the local network too.

 

estrify, Can you show me a sample code of how are you using the screenmask? I was looking at the mask demos but could not get it to work properly.

 

Where you code to show the mask and where you hide?

 

Thx!

 

Bruno

Link to comment
Share on other sites

Thank you!

 

Farshad, the error happens in the local network too.

 

estrify, Can you show me a sample code of how are you using the screenmask? I was looking at the mask demos but could not get it to work properly.

 

Where you code to show the mask and where you hide?

 

Thx!

 

Bruno

You can look at UniGUI demos directory (demos are very simple and clear. Farshad redirects to UIMask-Data demo)... However, you can look at test case of http://forums.unigui.com/index.php?/topic/2896-problems-with-screenmasks-and-showmodal/ where screenmasks are used (sorry for the title because the test case was for ShowMessage issue only, not for screenmasks issue, which we could not reproduce yet in a controlled way)...

 

No mystery on it: simply activate the ScreenMask property of the button that will show the next form you will display. As Farshad said, also remember to enable WaitData property.

 

Regards

Link to comment
Share on other sites

Farshad,

 

 

I was not using ScreenMask and now I'm trying using it to see what happens. Thx!

 

 

But I have another question...

 

When I close and reopen a query, what should I do?

 

Use EnabledControls / DisableControls or not?

 

What's the best way?

 

 

Thx!

 

Bruno

Link to comment
Share on other sites

Farshad,

 

 

I was not using ScreenMask and now I'm trying using it to see what happens. Thx!

 

 

But I have another question...

 

When I close and reopen a query, what should I do?

 

Use EnabledControls / DisableControls or not?

 

What's the best way?

 

 

Thx!

 

Bruno

Take a bookmark first, Just close the dataset (or query) and reopen it and use the bookmark to reposition... We use this practically in every form we have... This way you can alter the query if you need and there is no performance issues for big amounts of data...

For UniGUI components, you don't have to disable anything... UniGUI component responds to client events only, at least in web mode.

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...