![]() | ![]() Products ![]() ![]() ![]() ![]() |
Home » Technical Support » Elevate Web Builder Technical Support » Support Forums » Elevate Web Builder General » View Thread |
Messages 1 to 1 of 1 total |
![]() |
Tue, Feb 23 2021 6:18 PM | Permanent Link |
erickengelke | Bug in prototypes for external functions passing a procedure.
I was porting an interesting Artificial Intelligence project. It tracks a face on camera. Fun! https://erickengelke.com/faces/faces.html (it has to be https for permissions for your camera) When porting from EWB2 to EWB3 and came across a strange compiler bug: if you declare an external function that is passed a local function as a parameter, EWB balks at the definition. The solution that works is to declare pointer to the function and then pass that. But it didn’t used to be necessary in EWB2. The following simple code will not compile in EWB3 but does in EWB2! Type TDrawLandMarks = procedure (results : variant); // local function external TOnPlay = function ( videoE1 : variant; options : variant ; drawlandmarks :TDrawLandMarks ): array of variant; var external onPlay2 :TOnPlay; procedure DrawLandmarks2( results : variant ); begin Form1.localdrawlandmarks( results ); end; function somefunction(); var playoptions : variant; begin playoptions := 0; // next line fails, wanting an integer or variant, or whatever, but not accepting the function face3 := onPlay2( videoE2, playoptions, drawLandmarks2 ); end; EWB Programming Books and Component Library http://www.erickengelke.com |
This web page was last updated on Thursday, April 3, 2025 at 06:55 PM | Privacy Policy![]() © 2025 Elevate Software, Inc. All Rights Reserved Questions or comments ? ![]() |