ImageEn for Delphi and C++ Builder ImageEn for Delphi and C++ Builder

 

ImageEn Forum
Profile    Join    Active Topics    Forum FAQ    Search this forumSearch
Forum membership is Free!  Click Join to sign-up
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 ImageEn Library for Delphi, C++ and .Net
 ImageEn and IEvolution Support Forum
 TImageEnMView.OnDestroyImage.
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

wesleybobato

Brazil
367 Posts

Posted - Jul 25 2014 :  13:03:32  Show Profile  Reply
Hello Nigel.

Another Error found in TImageEnMView.OnDestroyImage.
you are calling the method OnDestroyImage After Destroying the Object

Please check this example

You can fix this error

https://www.dropbox.com/s/ah3becgsg5rw3sg/CustomThumbs2.zip

xequte

38602 Posts

Posted - Jul 26 2014 :  09:46:33  Show Profile  Reply
Hi Wesley

That is not the case. OnDestroyImage is called immediately before freeing the object.



Nigel
Xequte Software
www.xequte.com
nigel@xequte.com
Go to Top of Page

wesleybobato

Brazil
367 Posts

Posted - Jul 26 2014 :  10:00:29  Show Profile  Reply
Hi Nigel.

you noticed an error with m_checkboxes.Free ();
because this object is first destroyed and then the Events OnDestroyImage are Called.

Runs and Closes This App will occur an Access Violation

Nigel I sent an email from the heart to help him in his advances
Go to Top of Page

xequte

38602 Posts

Posted - Jul 26 2014 :  15:51:00  Show Profile  Reply
Hi Wesley

That issue is outside of ImageEn.

Change your ImageEnMView1DestroyIMage event to:
if assigned(m_checkboxes) then
  m_checkboxes.Delete(idx);


And your FormDestroy event to:
FreeAndNil(m_checkboxes);




Nigel
Xequte Software
www.xequte.com
nigel@xequte.com
Go to Top of Page

wesleybobato

Brazil
367 Posts

Posted - Jul 26 2014 :  15:52:37  Show Profile  Reply
Thank you Nigel.
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
Jump To: