Real Software Forums

The forum for Real Studio and other Real Software products.
[ REAL Software Website | Board Index ]
It is currently Mon Sep 23, 2019 10:12 am

All times are UTC - 5 hours

Post new topic Reply to topic  [ 1 post ] 
Author Message
 Post subject: Workaround regarding WebDialog bug when WebPage refreshed
PostPosted: Wed Feb 16, 2011 8:46 am 
User avatar

Joined: Sun Nov 15, 2009 10:56 am
Posts: 111
Location: Rogny-Les-Sept-Ecluses (89), FRANCE

Just wanted to share some workaround I came up regarding this bug:

If you show a WebDialog in a WebPage (login, message, etc..) and a user click on the reload button of his browser (at least here with Firefox), then the WebDialog disappear from the screen while its status is still as 'shown' (and the page behind and all its controls became available again).

The solution seems simple: Close() then Show() again the WebDialog to have it reappearing on the screen in its correct state. (it works).

But how you detect the page has been refreshed ?

In the Session.Reloaded Event. But there is a catch. This Event is triggered several times, and even when a page is not actualy reloading (happens to me with Animator and changing Visibility status of some controls in the AnimationComplete Event, very odd).

The solution for me was to create a flag in the Session class, that is setted by any page in the Shown Event.

When the Session.Reloaded Event is triggered, then this flag is checked, if it is on, then it is reseted and the Session call a current page method to update its status (at least regarding the WebDialog(s) status).

To make this method accessible on every page, I've created a sub-class of the WebPage I called WebPageExt then all the web pages I create are sub-classed from this WebPageExt class. (also usefull if you want all your webpages having some sort of common methods and behaviors).

If someone came up with another workaround on this one, let me now.

Hope this helps.

guy rabiller | | radfac founder/ceo

Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC - 5 hours

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group