Loading...

Bug when using ImageForceTemporaryMode

Support for GdViewer OCX and GdViewer Pro ActiveX/SDK.

Bug when using ImageForceTemporaryMode

Postby JNewhouse » Sun Apr 20, 2008 2:31 am

Hi Loic,

I've found an issue with the 5.1.09 build of the gdpicture control that was not in previous versions.

When the ImageForceTemporaryMode property is set to TRUE and you load the same image twice (consecutively), you get an untrapped error in the gdpicture control.

In VFP 9
add the viewer control to a form.
in the Init() place the following code:

thisform.olecontrol1.SetLicenseNumber("NNNNN")
thisform.olecontrol1.ImageforceTemporaryMode= .T.

Add a button to the form and place the following code in the Click():

lcFile = GETFILE()
IF !EMPTY(lcFile)
THISFORM.OleControl1.DisplayFromFile(lcFile)
ENDIF

launch the form and click the button. works fine.
click the button again and select the *same* file, you get an untrapped error.

of course, my actual code does not look like this and for reasons too lengthy to explain i have to use ImageForceTemporaryMode and i have to redisplay the same file (even though it's already loaded)

Thanks for looking into this!!
JNewhouse
 
Posts: 41
Joined: Thu Nov 15, 2007 9:37 pm

Re: Bug when using ImageForceTemporaryMode

Postby Loïc » Sun Apr 20, 2008 12:46 pm

Hi JNewhouse.

Thanks for this clear explication.

This problem can be bypassed using the CloseImage() method before calling the DisplayFromFile() method.

Also, I will fix this behaviour for the next GdPicture 5.2 release which will be available within a couple of days.


Best regards,

Loïc Carrère
Loïc Carrère, support team.
www.orpalis.com
User avatar
Loïc
Site Admin
 
Posts: 4441
Joined: Tue Oct 17, 2006 10:48 pm
Location: France


Return to GdViewer [Pro] ActiveX

Who is online

Users browsing this forum: Google [Bot] and 2 guests