IWSignaturePad demo generates an error

<< Click to Display Table of Contents >>

Navigation:  Forum >

IWSignaturePad demo generates an error

Forum link

 


 

07-27-2022, 02:52 PM:

 

Hi Alexandre,

 

Tested IWSignaturePad for the first time but see an DevTools console error. 

 

Code:

 

(index):53 Uncaught TypeError: Cannot read properties of null (reading 'getContext')

 

    at Initialize ((index):53:15)

 

    at HTMLDocument.<anonymous> ((index):98:23)

 

var c=IW.$("").getContext("2d");c.fillStyle="#FFFFFF";

 

 

 

The property HTMLName for the control is empty in TIWCustomCanvas.AddContext() when called from TIWCustomCanvas.InitControl()

 

Tested with IW15.2.64 running Chrome.

 

Update: Also when using the upload button on a 'big or complex' signature, the exception EIdReadLnMaxLineLengthExceeded is raised.

 


 

07-28-2022, 04:41 AM:

 

Thanks for reporting this.

 

The JS error has been fixed, and the Indy issue needs to be configured accordingly:

 

program IWSignaturePad;

 

uses

 

IWRtlFix,

 

IWStart,

 

InIOHandler, // <- add this unit

 

Unit27 in 'Unit27.pas' {IWForm27: TIWAppForm},

 

ServerController in 'ServerController.pas' {IWServerController: TIWServerControllerBase},

 

UserSessionUnit in 'UserSessionUnit.pas' {IWUserSession: TIWUserSessionBase};

 

{$R *.res}

 

begin

 

IdMaxLineLengthDefault := 128 * 1024; // <- Increase to something like 64 or 128 kb

 

TIWStart.Execute(True);

 

end.