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
 compiler define for ImageEn version number
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

davenovo

USA
26 Posts

Posted - Apr 25 2021 :  12:45:01  Show Profile  Reply
Hello,
Is there a compiler define for the ImageEn version number.

i.e. the Delphi compiler defines VerXXX for different delphi version numbers. Does ImageEn have a similar set of defines so I can test which version number I am dealing with?

xequte

38128 Posts

Posted - Apr 26 2021 :  22:39:09  Show Profile  Reply
Hi Dave

No, there's not at this time, but you can parse the ImageEnVersion property:

https://www.imageen.com/help/TIEImageEnGlobalSettings.ImageEnVersion.html

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

davenovo

USA
26 Posts

Posted - May 11 2021 :  20:49:17  Show Profile  Reply
Hi Nigel,
I tried this and did a search in ieSettings.pas and did not even find the text ImageEnVersion in that file. Am I missing something?
Go to Top of Page

xequte

38128 Posts

Posted - May 12 2021 :  00:11:01  Show Profile  Reply
Hi Dave

The consts are:

IEMAINVER
IEMAINVERSION

They are defined in hyiedefs.

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

davenovo

USA
26 Posts

Posted - May 12 2021 :  20:35:57  Show Profile  Reply
Thanks. Defining a compiler directive would be helpful in the future and easy to do. That way I can check certain things at compile time, instead of waiting for crashes, exceptions at runtime.
Go to Top of Page

xequte

38128 Posts

Posted - May 13 2021 :  05:29:01  Show Profile  Reply
Hi Dave

Can you give me an example of how you would use it?

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

davenovo

USA
26 Posts

Posted - May 13 2021 :  10:22:31  Show Profile  Reply
For any of the same reasons that you use the version compiler directives. To compile conditional code based on the version of Delphi.

In our case, we have some cracker classes where we have to access private fields from some ImageEn classes to add some functionality we need. We do this for many components and we have some code like

{$IFNDEF IEVERxxx} (where xxx is the latest version
{$Message FATAL You have upgraded ImageEn from Version xxx. Check the cracker class YYY to ensure the new ImageEn version did not change the layout of the fields}
{$ENDIF}
Go to Top of Page

xequte

38128 Posts

Posted - May 13 2021 :  22:14:39  Show Profile  Reply
Thanks Dave,

From 10.0.1 you can use the define in ie.inc

{$define IEVER_****}


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