Jump to content

why not access to UniApplication.ClientInfoRec in TUniGUIMainModule ?


Freeman35

Recommended Posts

Not sure if it's by design or not, but some confusing... What I understand the UniSession.UniApplication.ClientInfoRec record is filled at different times - or more precise shortly after the first form is shown. So to my understanding, the ClientInfoRec can first be retrieved/used in the first Form's AfterShow event?

So it can't be used in the mainmodule.create event nor in the LoginForm.create or show event.

Below some logging. (In the  beginning no text/data in the end of each row. First at "At Login Form AfterShow" there is text/the record is filled)

login.exe: 0000382C: 15:39:44 []:Mainmodule:
login.exe: 0000382C: 15:39:44 []:BrowserType:
login.exe: 0000382C: 15:39:44 []:BrowserVersion:0
login.exe: 0000382C: 15:39:44 []:OSType:

login.exe: 0000382C: 15:39:44 []:At Login Form Create:
login.exe: 0000382C: 15:39:44 []:BrowserType:
login.exe: 0000382C: 15:39:44 []:BrowserVersion:0
login.exe: 0000382C: 15:39:44 []:OSType:

login.exe: 0000382C: 15:39:44 []:At Login Form Show:
login.exe: 0000382C: 15:39:44 []:BrowserType:
login.exe: 0000382C: 15:39:44 []:BrowserVersion:0
login.exe: 0000382C: 15:39:44 []:OSType:

login.exe: 00005AC4: 15:39:44 []:At Login Form AfterShow:
login.exe: 00005AC4: 15:39:44 []:BrowserType:chrome
login.exe: 00005AC4: 15:39:44 []:BrowserVersion:80
login.exe: 00005AC4: 15:39:44 []:OSType:windows

login.exe: 00004170: 15:39:51 []:At Login Button click:
login.exe: 00004170: 15:39:51 []:BrowserType:chrome
login.exe: 00004170: 15:39:51 []:BrowserVersion:80
login.exe: 00004170: 15:39:51 []:OSType:windows
login.exe: 00004170: 15:39:51 []:At MainForm Create:
login.exe: 00004170: 15:39:51 []:BrowserType:chrome
login.exe: 00004170: 15:39:51 []:BrowserVersion:80
login.exe: 00004170: 15:39:51 []:OSType:windows


If in the MainModule instead using the BeforeLogin event and there sets Handled to true to bypass the login form - the same pattern occur. The MainForm is then the first form created, so it's first at the MainForm.AfterShow event the record is filled.

login.exe: 000055E8: 15:51:57 []:Mainmodule:
login.exe: 000055E8: 15:51:57 []:BrowserType:
login.exe: 000055E8: 15:51:57 []:BrowserVersion:0
login.exe: 000055E8: 15:51:57 []:OSType:

login.exe: 000055E8: 15:51:57 []:At MainForm Create:
login.exe: 000055E8: 15:51:57 []:BrowserType:
login.exe: 000055E8: 15:51:57 []:BrowserVersion:0
login.exe: 000055E8: 15:51:57 []:OSType:

login.exe: 000055E8: 15:51:57 []:At MainForm Show:
login.exe: 000055E8: 15:51:57 []:BrowserType:
login.exe: 000055E8: 15:51:57 []:BrowserVersion:0
login.exe: 000055E8: 15:51:57 []:OSType:

login.exe: 00004068: 15:51:58 []:At MainForm AfterShow:
login.exe: 00004068: 15:51:58 []:BrowserType:chrome
login.exe: 00004068: 15:51:58 []:BrowserVersion:80
login.exe: 00004068: 15:51:58 []:OSType:windows

So seems that this record is filled quite late and can't be used for example early in sessions for logging different types of browsers being used. (I'm also not sure if the functions UniSession.IsMobile and UniSession.IsDesktop have the same limitations - i believe they have or perhaps shouldn't be used? I believe the function UniApplication.UniPlatform is the one that works best - (another option is to use the agentstring directly - UniSession.UserAgent)

Just let me know if I've missunderstod anything...^_^

UniGui Professional 1.90.0.1523

DemoLoginCookies.zip

Link to comment
Share on other sites

  • 1 year later...

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...