Page 1 of 1

getpoly bug (DCAL for Delphi)

PostPosted: Fri Aug 11, 2017 10:58 pm
by dhs
Hi,
I'm trying to use GetPoly. As far as I can see the init field in the getPolyArg record should control how it behaves in a re-entrant call. But the routine appears to re-initialise itself regardless of the value of init.

This looks like a bug to me. Am I missing something ?

In my code GetPoly breaks out of its processing when a key that it does not handle internally is pressed (as expected). All I am doing is setting a Boolean flag based on this keypress and then GetPoly gets called again without modifying anything in the getPolyArg record, but it is discarding the already input points and prompting for the 1st point again no matter how many points had already been entered (I have used the debugger to confirm the init field is set to false and npnts is correctly set immediately before the re-entrant call to GetPoly).

It is going to be very hard to write my own 'GetMode' without this proc (not impossible, but I'm close to giving up the idea of seriously using D4D).

Re: getpoly bug (DCAL for Delphi)

PostPosted: Sat Aug 12, 2017 7:13 am
by David A. Giesselman
David,

I can't see why this would not work if "Init" is truly false. If you like to send me a compiled test macro, I'd be glad to watch what happens within DataCAD through the debugger.

Dave

Re: getpoly bug (DCAL for Delphi)

PostPosted: Sat Aug 12, 2017 10:45 pm
by dhs
Thanks Dave,
Have sent you a file .... hopefullIy have done something incorrectly which is causing the problem!

Re: getpoly bug (DCAL for Delphi)

PostPosted: Mon Aug 28, 2017 2:16 pm
by dhs
Hi Dave,
Any update on this? Were you able to reproduce the problem with the macro I sent you?
Thanks,
David