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
 Strange issue with mouse interactions
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

PeterPanino

914 Posts

Posted - Mar 04 2024 :  11:07:18  Show Profile  Reply
Please look at this small test project:

attach/PeterPanino/20243411231_MouseInteractionsTest.zip
76.92 KB

1. Start the test app.

2. Don't load an image.

3. Click the 'Create Rectangle' button; don't click on the rectangle.

4. Click the 'Set Selection Mode' button.

5. Create a selection on the background by dragging with the mouse.

6. Click the background to deselect.

7. Repeat steps 5 - 6 a few times to ensure it works.

8. Create a selection on the background by dragging with the mouse.

9. WHILE THE SELECTION IS STILL VISIBLE, click the rectangle (this deselects the selection).

10. Now, try to create a selection on the background by dragging with the mouse. The selection frame can be drawn up, but it does not remain (even if you click the 'Set Selection Mode' button again)!

Why the selection mode does not work anymore?

How can this issue be prevented?

xequte

38457 Posts

Posted - Mar 04 2024 :  15:31:05  Show Profile  Reply
Hi Peter

I cannot reproduce the issue in your demo.

I believe that this is an issue we fixed last week where selections are used in combination with non-image layers. Let me know if the latest beta I've emailed you does not fix it.


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

PeterPanino

914 Posts

Posted - Mar 05 2024 :  10:51:51  Show Profile  Reply
Hi Nigel,

Are you sure you've followed the steps EXACTLY as I described them?

Unfortunately, the latest beta you sent me (ImageEn_Source_1301_Beta_10305) does not solve the problem.

And MouseInteractLayers.mlEditLayerPoints and MouseInteractGeneral.miSelect are still mutually exclusive at design time! You can easily test this in ObjectInspector.

I've created a small screen video that shows the problem:

https://app.screencast.com/fhUkDshWDycgK
Go to Top of Page

xequte

38457 Posts

Posted - Mar 05 2024 :  13:48:09  Show Profile  Reply
Hi Peter

Please run the following code:

procedure TfrmMain.Button2Click(Sender: TObject);
begin
  ImageEnView1.MouseInteractGeneral := [miSelect];
  ImageEnView1.MouseInteractLayers := [mlEditLayerPoints];

  if ( ImageEnView1.MouseInteractLayers <> [mlEditLayerPoints]) or
     ( ImageEnView1.MouseInteractGeneral <> [miSelect]) then
    raise Exception.create( 'Not Beta 10305' );
end;


Do you get an exception?


Note: You won't be able to set the interactions at *Design* time unless you recompile your packages.


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

PeterPanino

914 Posts

Posted - Mar 05 2024 :  16:43:58  Show Profile  Reply
Hi Nigel,

Solved - but the problem is much more complex!

1. The original ImageEn installer creates only one library path in the Delphi IDE: For Delphi 12 32-bit, it is:
\ImageEn\Delphi12Athens
This is enough for just using the BPLs which are created in this folder.
So, updating a beta source without the installer to:
\ImageEn\Source
has no effect.

2. BUT, when MANUALLY reinstalling the "ImageEn Controls" package, the package expects its source files to be in:
\ImageEn\Delphi12Athens
...and NOT in:
\ImageEn\Source
...as stated by the readme.rtf (although that path is in IDE Library paths!)

3. There is another confusing mismatch in the readme.rtf:
"Open and compile PKIECTRL*.DPK (where * is the version number for your Delphi/C++ builder product, e.g. DPKIECTRL27.BPL for Delphi 10.4 Sydney)."

4. The readme for beta updates should consider all this and advise the user to take into account all these path considerations.

5. I had this code in my main project:
bmp.PixelFormat := ie8g;

This was marked as an error because ie8g is now apparently declared in hyiedefs.pas (and not in hyieutils.pas as stated in the documentation). I fixed this by changing my code to:
bmp.PixelFormat := hyiedefs.ie8g; // changed from hyieutils to hyiedefs


I ended up re-installing the "ImageEn Controls" package (after having copied all source files to the package directory - although the source directory is contained in the IDE Library path).

This issue with the ImageEn paths is really a mess - although the ImageEn installer (which is not provided with the beta updates) generally does not create any problems - until you update sources manually.

So I suggest to provide an installer with even beta updates. I suppose you have an automated build process for the installer, so it would not create any more work when distributing betas.

In conclusion, I thank you for your excellent support in providing solutions to problems like the selection problem above!
Go to Top of Page

PeterPanino

914 Posts

Posted - Mar 05 2024 :  17:40:10  Show Profile  Reply
The reinstallation with the beta source has created another problem:

IEVision does not work anymore - although I provide the correct credentials:

IEVisionSetSerialNumber('xxx', 'xxx');
Go to Top of Page

PeterPanino

914 Posts

Posted - Mar 06 2024 :  07:35:23  Show Profile  Reply
Meanwhile, I have corrected the wrong version value in ievision.pas that was delivered among the ImageEn beta files. After that, IEVision now works again.

I am not sure why ievision.pas containing a specific version number was delivered in the ImageEn beta package.
Go to Top of Page

xequte

38457 Posts

Posted - Mar 06 2024 :  19:20:51  Show Profile  Reply
Hi Peter

Naturally, the beta version is the state of our code at the present time, which includes support for our beta version of IEVision.

Nigel
Xequte Software
www.imageen.com
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
Jump To: