I have a Webcanvas within WebDialog. It works perfectly the 1st time I show the webdialog with the canvas.
I then close the webdialog, and re-open it, but the image disappears. Upon tracing through the code using googles Developer tools, the image does show up but immediately disappears when the following it calls Xojo.controls routines.
This is what it called 2nd time it is opened and the screen is blank. In quicksnapshot I am populating the canvas with an image.
quickSnapShot(‘MtyF50UW_video’,‘QQVBuSjP_canvas’,0);
Xojo.controls[‘QQVBuSjP’].setAttribute(‘width’,‘640’);
Xojo.controls[‘QQVBuSjP’].setAttribute(‘height’,‘480’);
Xojo.controls[‘QQVBuSjP’].editScript(2,‘context.clearRect(0,0,640,480);’,3);
Xojo.controls[‘QQVBuSjP’].runScript(5);
Xojo.controls[‘MFDadF0g’].setMode(1);
Xojo.comm.ajax.begin();
This is what it calls the 1st time when it works:
quickSnapShot(‘FMOxQzdk_video’,‘Gbny16Lj_canvas’,0);
Xojo.controls[‘Gbny16Lj’].setAttribute(‘width’,‘640’);
Xojo.controls[‘Gbny16Lj’].setAttribute(‘height’,‘480’);
Xojo.controls[‘Gbny16Lj’].editScript(3,‘var canvas = document.getElementById(\‘Gbny16Lj_canvas\’);’,0);
Xojo.controls[‘Gbny16Lj’].editScript(3,‘if(canvas) {’,1);
Xojo.controls[‘Gbny16Lj’].editScript(3,‘var context = canvas.getContext(\‘2d\’);’,2);
Xojo.controls[‘Gbny16Lj’].editScript(3,’}’,3);
Xojo.controls[‘Gbny16Lj’].runScript(1);
Xojo.controls[‘Gs9t4ecb’].setMode(1);
Xojo.comm.ajax.begin();
Thanks in advanced.