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
 Violation error and EIEException while navigating
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

ioster

Germany
18 Posts

Posted - Apr 13 2021 :  03:48:46  Show Profile  Reply
Hi,

I use the ImageEnMView in combination with the ImageEnView in my application.

The filenames of the pictures are in a table referenced to another table with the details of machines.

I copied a sequence of your demo projects for databinding the viewer objects.

(* Datasource with filenames *)
fDBMultiBitmap := TIEDBMultiBitmap.create(Datenmodul.MaschinenFotosSource, '', 'Dateiname');
fDBMultiBitmap.ImagePath := Datenmodul.Bilderpfad;

ImageEnMView.SetExternalMBitmap(fDBMultiBitmap);
fDBMultiBitmap.FollowDBCursor := True;

// Create our DB Bitmap and point to our table which contains display name and image blob fields
fDBBitmap := TIEDBBitmap.create(Datenmodul.MaschinenFotosSource, '', 'Dateiname');
fDBBitmap.ImagePath := Datenmodul.Bilderpfad;
// Now make our ImageEnView1 use our DB Bitmap as its image container
ImageEnView.SetExternalBitmap(fDBBitmap);

If I navigate through the main dataset with the machine details, the dataset with the picture information changes.

Now I get a violation error or an eieexception of the TImageEnView.Assign method after setting the property AttachedImageEnView to my object. I don't get these errors if this property is empty.

Best regards
Ingo

xequte

38107 Posts

Posted - Apr 13 2021 :  05:57:27  Show Profile  Reply
Hi Ingo

Your code looks OK, but don't use AttachedImageEnView if the TImageEnView is connected to a database.

You might want to create a simple demo that illustrates the issue.

Nigel
Xequte Software
www.imageen.com
Go to Top of Page

ioster

Germany
18 Posts

Posted - Apr 14 2021 :  04:48:17  Show Profile  Reply
Hi,

I have extended your demo project with a second table called items. There is a new field and index in the existing table images for referencing to the items.

If you append items and images and navigate through the main dataset, you'll get violation errors and sometimes the unknown source type message.

Best regards
Ingo

attach/ioster/20214144553_imageenmviewtest.zip
1202.7 KB

Download Attachment: 20214144553_imageenmviewtest.zip
Go to Top of Page

xequte

38107 Posts

Posted - Apr 20 2021 :  02:05:28  Show Profile  Reply
Hi

As I mentioned you cannot use AttachedImageEnView as well as set an external bitmap. That means you have two sources competing to update the active image in TImageEnView.

If I add this to your demo:

ImageEnMView1.AttachedImageEnView := nil;

The access violations stop occurring.

I will also add a block in the code to prevent the AttachedImageEnView being used at the same time as ExternalBitmap.

Nigel
Xequte Software
www.imageen.com
Go to Top of Page

ioster

Germany
18 Posts

Posted - Apr 20 2021 :  15:25:06  Show Profile  Reply
Hi,

yes, you can stop the violation error with unassigning the AttachedImageEnView.

I set it because you wrote that it is the only way to use the navigation buttons of the ImageEnViewToolbar in combination with the ImageEnMView an ImageEnView component.

My customer isn't happy because the shown pictures don't correspond to the items.

How can I synchronize the master and detail dataset and the ImageEnMView with the ImageEnView inclusive the toolbar?

Best regards
Ingo

Go to Top of Page

ioster

Germany
18 Posts

Posted - Apr 20 2021 :  15:52:31  Show Profile  Reply
I commented out the externalbitmap of the ImageEnView in the last line of the OnFormCreate event and I can navigate through the datasets without a violation error.

If I select an image in the ImageEnMView it is shown in the ImageEnView. That's fine. But if I use the navigation buttons of the toolbar, I can only change the selection of the ImageEnMView.


Go to Top of Page

xequte

38107 Posts

Posted - Apr 22 2021 :  22:37:14  Show Profile  Reply
Hi

Please email me for an update that fixes this.

Nigel
Xequte Software
www.imageen.com
Go to Top of Page

ioster

Germany
18 Posts

Posted - Apr 27 2021 :  05:16:33  Show Profile  Reply
Hi,

I installed your beta version but there are no significant changes in relation to the violation errors, the unknown source type and the still standing picture in the ImageEnView.

The datalink of the ImageEnView is commented out, the AttachedImageEnView property of the ImageEnMView is set to the ImageEnView component.

I can navigate with the toolbar in the ImageEnMView but the selected picture is only shown in the attached ImageEnView if I click with the mouse on tile.

"Unknown source type" is shown especially if the detail dataset is empty.

Best regards
Ingo
Go to Top of Page

ioster

Germany
18 Posts

Posted - Apr 27 2021 :  05:47:19  Show Profile  Reply
Hi,

I have to revise my last posting after updating the Delphi specific folder of imageen components. I had deleted this folder because your folder structure is unclear for me. The program was still running with the violation error.

Now I copied all files in the Delphi10.3Rio folder, compiled and all seems to be fine. I will keep an eye on it.

Best regards
Ingo

Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
Jump To: