Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
IWSignaturePad demo generates an error
#1
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.
Reply
#2
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.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)