xsharp.eu • DateSLE showing a blank calendar? How is this possible?
Page 1 of 2

DateSLE showing a blank calendar? How is this possible?

Posted: Thu Jun 30, 2022 4:02 am
by jonhn
Any suggestions? It must be local to this persons' new laptop, but it looks OK to me.
Does Willie's calendar rely on any Windows functions to display the dates? The C++ redistributable pack wasn't installed so I was hoping installing that would solve it, but no.

Hi guys,
I use Willie Moore's DateSLE on a couple of forms in my old VO2.7b application - it works perfectly100% and has done for many years on many different systems, OS and users, and I love it.

Today I have one user suffering from a blank calendar when they open the date field (i.e. click on the calendar icon)
There are no "days" showing in the grid when the box opens, and the user can't click on any of the empty areas. (I had a look using teamviewer)

Their IT guy synchronised this PC's date/time for them just before they noticed this problem, so I suspect it is related, but no idea why.
I have not seen this happen in 20 years of using that control. (I am using the Jan 2001 version.)

The user is on a new laptop, Win 10, nothing special, and it was working fine for the last few days before the date / time synchronisation that their IT guy did

Any ideas why the calendar is suddenly blank? it's got to be a Windows thing...

Thanks, Jonathan

DateSLE showing a blank calendar? How is this possible?

Posted: Thu Jul 28, 2022 7:18 am
by jonhn
Hi all... Any wild suggestions I could try? It is obviously local to this persons' new laptop.
Does Willie's calendar rely on any Windows functions to display the dates? The C++ redistributable pack wasn't installed so I was hoping installing that would solve it, but it didn't help - is there anything else the calendar display might require?.

DateSLE showing a blank calendar? How is this possible?

Posted: Thu Jul 28, 2022 10:30 pm
by Jamal
Hi Johathan,

Does the included example which is in the DateSLE aef work on your client's machine?

Create a small sample reproducible program and post here and include all required code.

What's your programming environment?
What is clients environment, graphics card, type of monitor and resolution?

Jamal

DateSLE showing a blank calendar? How is this possible?

Posted: Sun Jul 31, 2022 7:54 am
by jonhn
Thanks Jamal,

I am using Visual Objects (Version 2.7. Build 2.2735), Version 2.7b
The client is using a new Lenovo laptop, Win 10 Pro, build 19044.1826, with a dock that runs 2 external monitors

Graphics card Internal - Intel Iris Xe Graphics, External Trigger 6 external graphics
Monitor PHL 272V8, 1920 x 1080, 50hz
User reports that the calendar malfunctions on both the external monitors and when she tested it with the laptop screen open and the Trigger 6 disconnected.
Intel 11 Gen, I5 1135G7 @ 2.40GHz, 64bit
16GB Ram

I created a standard VO 2.7b application with only the RightSLE library as suggested and runs fine everywhere except on the clients' laptop.
Good news is that it threw an error this time on her laptop, but runs perfectly on all the other PC's, so there is a clue now, although it didn't help me solve it as the line number reported in the error is not right.

So, does the below give any useful clues?

***********************ERROR********************************
Visual Objects (Version 2.7. Build 2.2735), Version 2.7b
29/07/2022 04:21:08 pm
Application: H:Application.EXE

Error message:
--------------
Error Code: 4 [ NUMERIC OVERFLOW ]
Subsystem: VO-CODE
CallStack:
PECALENDAR:CASTDATE2COLUMN (Line: 3)
PECALENDAR:DRAWDAYS (Line: 113)
PECALENDAR:EXPOSE (Line: 13)
PECALENDAR:DISPATCH (Line: 61)
RIGHTSLE:SHOWCALENDAR (Line: 41)

Error Object created:
--------------------
SubSystem :VO-CODE
SubCode :0
GenCode :Numeric overflow
OsCode :0
ArgType :NIL
FuncPtr :0x00000000
ArgNum :0
FuncSym :
Severity :2
CanDefault :.T.
CanRetry :.F.
CanSubstitute :.F.
Operation :
Description :
FileName :
Tries :0
FileHandle :0
SubCodeText :
Arg :
ArgTypeReq :NIL
MaxSize :0
SubstituteType :NIL
CallFuncSym :
--------------------

I've attached the test AEF and the version of RightSLE I'm using.

Thanks!
Jonathan

DateSLE showing a blank calendar? How is this possible?

Posted: Sun Jul 31, 2022 9:27 am
by Chris
Hi Jonathan,

Most likely this is caused by a setting in the Regional Settings of this PC that isn't expected by the code in the calendar (and is different to the setting in all other PCs). My bet is that it's the "First day of the week" setting, which must be different (Settings->Time & Language->Region->First day of week setting in Windows 10).

So you cat either tell them to adjust this setting, or debug the problem in the code and fix it. I see this code in the CastDate2Column() method:

nReturnVal := INT(_CAST,(DoW(dDate) - ( SELF:dwFirstDayoftheWeek -1 )))

I would make the app show some output before it executes this line and show the values of DoW(dDate) and SELF:dwFirstDayoftheWeek. Maybe for some reason DoW(dDate) returns zero?

.

DateSLE showing a blank calendar? How is this possible?

Posted: Sun Jul 31, 2022 9:32 am
by jonhn
Thank you very much.

DateSLE showing a blank calendar? How is this possible?

Posted: Sun Jul 31, 2022 10:54 pm
by jonhn
The issue was exactly as Chris suggested - First Day of Week was set to Wednesday so it is now corrected and working nicely.
Thank you for taking a look!

DateSLE showing a blank calendar? How is this possible?

Posted: Sun Jul 31, 2022 11:52 pm
by TimothyS
Hi Jonathan,
An interesting problem and thanks for posting it. Haven't run into it yet, but having the answer sure beats all the depression and anxiety involved when something like this happens out of the blue.
It is wonderful having the wisdom of Chris in moments like this.

Regards,
Tim

DateSLE showing a blank calendar? How is this possible?

Posted: Mon Aug 01, 2022 12:10 am
by jonhn
Yep! There is a team of extremely clever people behind X# and among the other contributors involved here- it is humbling when they freely share their knowledge and help out on such mundane queries. in this (rare) case it wasn't something I had screwed up! haha.
I for one am very grateful, and hope to be able to buy them a beer in person sometime.

DateSLE showing a blank calendar? How is this possible?

Posted: Mon Aug 01, 2022 4:53 am
by Jamal
Johnathan,

I am glad Chris was able to point you to the solution based on the sample you posted.

Jamal