CGDevTools Forum

Welcome to the Official CGDevTools Support Community Forums.

Picture file Load and Export

by Alexander Bulei » 13 Oct 2016 09:25

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.
Group: Developers | Support Team

  • info [at] cgdevtools.com - General information
  • sales [at] cgdevtools.com - Sales department
  • support [at] cgdevtools.com - Product and Technical Support
User avatar
Alexander Bulei
Site Admin
 
Posts: 3635
Joined: 15 May 2012 08:52
Location: Mealhada, Portugal

by zsleo » 13 Oct 2016 10:28

.. 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?
zsleo
 
Posts: 776
Joined: 03 Feb 2013 03:33

by Alexander Bulei » 13 Oct 2016 10:31

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.
Group: Developers | Support Team

  • info [at] cgdevtools.com - General information
  • sales [at] cgdevtools.com - Sales department
  • support [at] cgdevtools.com - Product and Technical Support
User avatar
Alexander Bulei
Site Admin
 
Posts: 3635
Joined: 15 May 2012 08:52
Location: Mealhada, Portugal

by zsleo » 14 Oct 2016 00:08

Believe me I tried AjaxRerender and many, many other experimenting ( code hacking...:roll: )

Still having the same problem....

Regards
zsleo
 
Posts: 776
Joined: 03 Feb 2013 03:33

by zsleo » 14 Oct 2016 05:00

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....
zsleo
 
Posts: 776
Joined: 03 Feb 2013 03:33

by Alexander Bulei » 14 Oct 2016 09:15

Hi,

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


Browser Cache

Best Regards.
Group: Developers | Support Team

  • info [at] cgdevtools.com - General information
  • sales [at] cgdevtools.com - Sales department
  • support [at] cgdevtools.com - Product and Technical Support
User avatar
Alexander Bulei
Site Admin
 
Posts: 3635
Joined: 15 May 2012 08:52
Location: Mealhada, Portugal

by zsleo » 14 Oct 2016 11:29

Is there a method to force clearing or not use browser cache in a specific procedure
zsleo
 
Posts: 776
Joined: 03 Feb 2013 03:33

by Alexander Bulei » 14 Oct 2016 11:52

Hi,

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

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


Best Regards.
Group: Developers | Support Team

  • info [at] cgdevtools.com - General information
  • sales [at] cgdevtools.com - Sales department
  • support [at] cgdevtools.com - Product and Technical Support
User avatar
Alexander Bulei
Site Admin
 
Posts: 3635
Joined: 15 May 2012 08:52
Location: Mealhada, Portugal

by zsleo » 17 Oct 2016 10:15

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
zsleo
 
Posts: 776
Joined: 03 Feb 2013 03:33

by Alexander Bulei » 18 Oct 2016 17:42

Hi,

did not work for me.


Hm...

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


Works as expected here...

Best Regards.
Group: Developers | Support Team

  • info [at] cgdevtools.com - General information
  • sales [at] cgdevtools.com - Sales department
  • support [at] cgdevtools.com - Product and Technical Support
User avatar
Alexander Bulei
Site Admin
 
Posts: 3635
Joined: 15 May 2012 08:52
Location: Mealhada, Portugal

Previous

Return to JQWPaint

cron

Who is online

Users browsing this forum: No registered users and 1 guest

Contact Us.