Page 1 of 1

Compiling projects from the Visual Prolog 10 version into Visual Prolog 11

Posted: 11 Feb 2024 10:36
by Faddey
Dear Thomas!
I wrote to you about the problems of compiling projects from the Visual Prolog 10 version into Visual Prolog 11.
Another problem has arisen. I have a project that uses a custom grid.
When you click on any grid field, the program crashes.
The program works correctly only when the “Require Administrative Rights” flag is set or is run as an administrator. I was unable to find an error for such strange behavior of the program.
When compiling a similar project in Visual Prolog 10, this error does not occur.
I am sending the project for testing.
I ask for your help.
Best regards, Faddey.

Re: Compiling projects from the Visual Prolog 10 version into Visual Prolog 11

Posted: 12 Feb 2024 10:20
by Thomas Linder Puls
Your program dies with a stack overflow.

The problem comes from this clause (in gridinplaceControlSupport):

Code: Select all

    onNative(_, gui_native::wm_getdlgcode, WParam, LParam) = window::nativeResult(gui_api::mkR(dlgc_translate(gui_api::getInteger(Ret)))) :-         !,         Ret = ctl:sendEvent(vpiDomains::e_Native(gui_native::wm_getdlgcode, WParam, LParam)).
Where ctl is the same control that receives the event in the first place. So the control is asking itself, and then asking itself, ...

I have not studied why it worked in Vip10, but my guess was that in Vip10 there was an extra window in the equation: your in-place control (ctl) was embedded inside some additional window and the purpose of the clause was to delegate the handling of this event from the extra window to your control.

Such a window does not exist in the current implementation, and it seems that your program works if you delete the mentioned clause.

Re: Compiling projects from the Visual Prolog 10 version into Visual Prolog 11

Posted: 12 Feb 2024 10:30
by Thomas Linder Puls
By the way, there are in-place controls in PFC now. Perhaps you can replace some of you code with standard PFC code (there is no slider-switch-control).

Re: Compiling projects from the Visual Prolog 10 version into Visual Prolog 11

Posted: 12 Feb 2024 12:12
by Faddey
Thank you very much Thomas. Brilliant.
Best regards, Faddey.