Discussions related to Visual Prolog
Faddey
Posts: 16
Joined: 11 Mar 2018 16:09

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

Unread post 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.
Attachments
CustomGrid_test.zip
(91.85 KiB) Downloaded 131 times
User avatar
Thomas Linder Puls
VIP Member
Posts: 1437
Joined: 28 Feb 2000 0:01

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

Unread post 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.
Regards Thomas Linder Puls
PDC
User avatar
Thomas Linder Puls
VIP Member
Posts: 1437
Joined: 28 Feb 2000 0:01

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

Unread post 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).
Regards Thomas Linder Puls
PDC
Faddey
Posts: 16
Joined: 11 Mar 2018 16:09

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

Unread post by Faddey »

Thank you very much Thomas. Brilliant.
Best regards, Faddey.
Post Reply