- Gordon Leishman
- PowerBuilder
- Tuesday, 14 May 2019 06:48 AM UTC
Issue:
An application crash occurs when a Close or CloseWithReturn of the parent window is invoked either directly or indirectly from the DoubleClicked or Clicked event of the MonthCalendar control.
Background:
We currently use a really old ActiveX Calendar control which I want to replace with the standard PB MonthCalendar control that is almost identical.
The Calendar control sits in a popup window and on the DoubleClicked event of the control a CloseWithReturn of the parent window is executed which closes the window and returns the selected date.
I am trying to recreate this using the PB MonthCalendar, however, it causes an app crash both when running from the IDE or compiled.
I have also tried coding the CloseWithReturn in a button and on the Key event of the window and then calling these events from the DoubleClicked event of the CalendarMonth, but this still causes a crash.
When debugging I can see that all of the code in the Key event or button clicked events is executed (plus any code that I put in the Close event of the windows), PB then returns to the DoubleClicked event and crashes.
Does anyone have any ideas to get this to work, am I missing something obvious?
FYI - I am using PB 2017 but have also tried this in the 2019 Beta and get the same issue.
Find Questions by Tag
Helpful?
If a reply or comment is helpful for you, please don’t hesitate to click the Helpful button. This action is further confirmation of their invaluable contribution to the Appeon Community.