Page 2 of 2

Re: Picture file Load and Export

PostPosted: 13 Oct 2016 09:25
by Alexander Bulei
Hi zsleo,

I have checked, and works as expected here, if you have right url...

Anyway, I have detected, the Image property is not prepared to accept the relative url in ISAPI.

3.
IWCGJQWPaint.JQWPaintOptions.Image := 'files/page.png'
No errors but does not display the image


Try this:

Code: Select all
IWCGJQWPaint.JQWPaintOptions.Image := CGGetLink('','files/page.png', False, False);


In next releases, the component will do it internally.

Best Regards.

Re: Picture file Load and Export

PostPosted: 13 Oct 2016 10:28
by zsleo
.. still not working...

button click event:
IWCGJQWPaint.JQWPaintOptions.Image := CGGetLink('','files/page.png', False, False);

Does not display the image.

Ctrl-F5 does display the image.

TIA
...getting close to remote control time... what do you think?

Re: Picture file Load and Export

PostPosted: 13 Oct 2016 10:31
by Alexander Bulei
Hi zsleo,

button click event:
IWCGJQWPaint.JQWPaintOptions.Image := CGGetLink('','files/page.png', False, False);


:o

If it doesn't work, because doesn't support ajax change, use AjaxRerender...~

Best Regards.

Re: Picture file Load and Export

PostPosted: 14 Oct 2016 00:08
by zsleo
Believe me I tried AjaxRerender and many, many other experimenting ( code hacking...:roll: )

Still having the same problem....

Regards

Re: Picture file Load and Export

PostPosted: 14 Oct 2016 05:00
by zsleo
Further testing

Please don't ask me how or why because I dont understand but here are my findings.

=============

I start a Chrome browser

The first time I assigng an image file name to TIWCGJQWPaint it displays correctly.

TIWCGJQWPaint.JQWPaintOptions.Image := 'files/123.jpg"
TIWCGJQWPaint.AjaxRerender;

I then Rename file on the hard disk and I call the same code:
-Also tried with same result for delete file and rewrite another image to the same file name.

TIWCGJQWPaint.JQWPaintOptions.Image := 'files/123.jpg'
TIWCGJQWPaint.AjaxRerender;

The old image 'files/123.jpg' is displayed >>> BUT <<< there is no physical image file of that name on the hard disk...

I close the session and terminate the application.

I rebuild and restart the application

I then call the same code:

TIWCGJQWPaint.JQWPaintOptions.Image := 'files/123.jpg'
TIWCGJQWPaint.AjaxRerender;

The old image 'files/123.jpg' is displayed >>> BUT <<< there is no physical image file of that name on the hard disk...

I then call the code:

TIWCGJQWPaint.JQWPaintOptions.Image := ''
TIWCGJQWPaint.AjaxRerender;

The image is CORRECTLY cleared

I then call the code:

TIWCGJQWPaint.JQWPaintOptions.Image := 'files/123.jpg'
TIWCGJQWPaint.AjaxRerender;

The old image 'files/123.jpg' is displayed >>> BUT <<< there is no physical image file of that name on the hard disk...

======

I start a Firefox

I then create a new file from the hard disk and I call the same code:

TIWCGJQWPaint.JQWPaintOptions.Image := 'files/123 a.jpg'
TIWCGJQWPaint.AjaxRerender;

The image 'files/123 a.jpg' is displayed correctly

I then Rename the file and then call the same code:

TIWCGJQWPaint.JQWPaintOptions.Image := 'files/123 a.jpg'
TIWCGJQWPaint.AjaxRerender;

The old image 'files/123 a.jpg' is displayed >>> BUT <<< there is no physical image file of that name on the hard disk...

I then call the same code:

TIWCGJQWPaint.JQWPaintOptions.Image := ''
TIWCGJQWPaint.AjaxRerender;

The image is CORRECTLY cleared

I then call the same code:

TIWCGJQWPaint.JQWPaintOptions.Image := 'files/123 a.jpg'
TIWCGJQWPaint.AjaxRerender;

The old image 'files/123 a.jpg' is displayed >>> BUT <<< there is no physical image file of that name on the hard disk...

=====

I go back to the already open Chrome browser session.

I then call the same code:

TIWCGJQWPaint.JQWPaintOptions.Image := 'files/123.jpg'
TIWCGJQWPaint.AjaxRerender;

The image is CORRECTLY cleared because the old image 'files/123.jpg' image file does not exist...

============

I have to stop because it is now making no sense to me....

Re: Picture file Load and Export

PostPosted: 14 Oct 2016 09:15
by Alexander Bulei
Hi,

I have to stop because it is now making no sense to me....


Browser Cache

Best Regards.

Re: Picture file Load and Export

PostPosted: 14 Oct 2016 11:29
by zsleo
Is there a method to force clearing or not use browser cache in a specific procedure

Re: Picture file Load and Export

PostPosted: 14 Oct 2016 11:52
by Alexander Bulei
Hi,

If you want use the same name of file, you can do like this:

IWCGJQWPaint1.JQWPaintOptions.Image := 'aircraftsmall.png?cache=' + CGGenAutoID;


Best Regards.

Re: Picture file Load and Export

PostPosted: 17 Oct 2016 10:15
by zsleo
Alexander
IWCGJQWPaint1.JQWPaintOptions.Image := 'aircraftsmall.png?cache=' + CGGenAutoID;


did not work for me.

Over the weekend I rewrote this portion of the app to generate a new file with every use of the image. Painful but at least it working as I require it now.

On another part of this post, the missing ";". After updating to the CGD Version 3.0.0.65 it is now working correctly when JavaScript debug is disabled. Thanks.

Regards

Re: Picture file Load and Export

PostPosted: 18 Oct 2016 17:42
by Alexander Bulei
Hi,

did not work for me.


Hm...

IWCGJQWPaint1.JQWPaintOptions.Image:= 'aircraftsmall.png?cache=' + CGGenAutoID;
IWCGJQWPaint1.AjaxReRender(True,False);


Works as expected here...

Best Regards.