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
 Issue with OnAfterEvent
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

graph_man

328 Posts

Posted - Feb 11 2022 :  14:56:06  Show Profile  Reply
Before version 10.1
I used OnAfterEvent event
to handle actions after page selection in ImageEnMView2
loading the selected page in ImageEnView

I used this code

void __fastcall TAFTV_FormMain::ImageEnMView2AfterEvent(TObject *Sender,
	TIEAfterEvent Event)
{
    if (Event == ieaeMouseUp)
    {
        int idx = ImageEnMView2->SelectedImage;

	if (idx == SelectedImage && ((TImageEnMView*)Sender)->Name == "ImageEnMView2")
			return;
    ...
}

Everything worked fine before installing the new version 10.3

(idx == SelectedImage && ((TImageEnMView*)Sender)->Name == "ImageEnMView2")

Previously, when manually selecting a page, this expression gave FALSE.

In the new version, it gives the TRUE.

Why and how to fix it?
Why make such cardinal changes that break the program when installing a new version of a component?

graph_man

328 Posts

Posted - Feb 11 2022 :  15:07:14  Show Profile  Reply
In the new version, when you select another page, it is no longer selected at all.
I will have to revert to the previous version.
Go to Top of Page

graph_man

328 Posts

Posted - Feb 11 2022 :  15:19:35  Show Profile  Reply
Many other issues with page selection. If you select pages 1-5 and then click on page 1 (so that only page 1 remains selected), nothing changes. Group selection is not canceled as in previous versions.

I will be returning to the previous version 10.1.
But how to fix this problem in it?

https://www.imageen.com/ieforum/topic.asp?TOPIC_ID=5126

Go to Top of Page

xequte

38608 Posts

Posted - Feb 11 2022 :  22:25:18  Show Profile  Reply
Hi

I'm not aware of any selection issues in v10.3.0. Does it occur in any of our demos?

What is SelectedImage in your code above? Are you able to create a simple demo that shows the issue?

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

graph_man

328 Posts

Posted - Feb 12 2022 :  05:11:00  Show Profile  Reply
> Does it occur in any of our demos?
I need it to work in my programs and not in the demo.
Everything worked fine in version 10.1 and first stopped working in version 10.3

> What is SelectedImage in your code above?

This is the number of the page that has already been loaded in ImageEnView

Please write what has changed in the logic of working with page selection in ImageEnMview and the OnImageSelect and OnAfterEvent events.

ImageEnMView2->SelectedImage

As if it stopped working at the right moment. When does it work now?
Go to Top of Page

graph_man

328 Posts

Posted - Feb 12 2022 :  10:17:24  Show Profile  Reply
When selecting a page in ImageEnMView
the value
ImageEnMView2->SelectedImage
stopped changing
on "OnAfterEvent"

In version 10.1 it worked fine
Go to Top of Page

xequte

38608 Posts

Posted - Feb 12 2022 :  18:01:43  Show Profile  Reply
Hi

I have added the following to the AfterEvent:

  if Event = ieaeMouseUp then
    Caption := IntToStr( ImageEnMView1.SelectedImage );


And it seems to be changing as expected.

Can you give me some specific steps to see the issue you are getting?


I've reviewed all the iemview.pas source changes between 10.1.0 and 10.3.0 and cannot see anything relevant (unless you use Filtering).

I think something else might be going on here (e.g. other code interacting with TImageEnMView?)



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

graph_man

328 Posts

Posted - Feb 13 2022 :  14:28:36  Show Profile  Reply
In my tests, for each selected page, I get
ImageEnMView2->SelectedImage = 0;
Go to Top of Page

graph_man

328 Posts

Posted - Feb 13 2022 :  14:53:38  Show Profile  Reply
I am getting the same result in a test empty project. I sent it to you by mail.
Go to Top of Page

xequte

38608 Posts

Posted - Feb 13 2022 :  17:41:21  Show Profile  Reply
Hi

I haven't seen that message. Please check that your zip doesn't contain any blocked types, such as EXE, and resend.

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

graph_man

328 Posts

Posted - Feb 14 2022 :  05:17:01  Show Profile  Reply
I deleted the exe file and sent the email again.
Go to Top of Page

xequte

38608 Posts

Posted - Feb 15 2022 :  04:01:05  Show Profile  Reply
Thanks, we have received it. I'm out of the office till Friday, but will check it after that.

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

graph_man

328 Posts

Posted - Feb 15 2022 :  10:12:18  Show Profile  Reply
Were there any changes in the work with the "MouseInteract" parameter in the new version?
Go to Top of Page

xequte

38608 Posts

Posted - Feb 15 2022 :  14:29:44  Show Profile  Reply
Hi

Only changes that would affect usage of the PDFViewer.


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

graph_man

328 Posts

Posted - Feb 16 2022 :  03:50:40  Show Profile  Reply
However, in version 10.1 everything worked without problems.
Go to Top of Page

graph_man

328 Posts

Posted - Feb 16 2022 :  03:53:30  Show Profile  Reply
In version 10.3, the correct value "ImageEnMView2->SelectedImage" occurs only when the parameter "MouseInteract-Select" is enabled.
In version 10.1, this worked even when it was turned off.
Go to Top of Page

xequte

38608 Posts

Posted - Feb 18 2022 :  23:06:27  Show Profile  Reply
Hi

What method are you using to set ImageEnMView2.SelectedImage if MouseInteract-Select is not enabled?

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

graph_man

328 Posts

Posted - Feb 19 2022 :  05:25:26  Show Profile  Reply
Once again, in version 10.1 I can get the correct value of the changed page (using OnAfterEvent and ImageEnMView2->SelectedImage) even though "MouseInteract-Select" is disabled. In version 10.3 this does not work.

Go to Top of Page

xequte

38608 Posts

Posted - Feb 19 2022 :  14:10:51  Show Profile  Reply
To clarify, you are wanting to select the page, even though "MouseInteract-Select" is disabled? Why don't you want to use "MouseInteract-Select" for this?

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

graph_man

328 Posts

Posted - Feb 19 2022 :  15:00:54  Show Profile  Reply
Yes

I no longer remember why it is organized this way, but it has been working for more than 5 years and there were no problems with it before version 10.3.
Go to Top of Page

xequte

38608 Posts

Posted - Feb 19 2022 :  20:35:56  Show Profile  Reply
I'm afraid that was a bug. Naturally, the SelectedImage property should not change when an image is clicked if "MouseInteract-Select" is disabled.

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