Jump to content
Ian Branch

GExperts Replace Components..

Recommended Posts

Hi Team,

So what is it exactly that is broken that now prevents this extremely useful functionality from working?

"Due to a bug in the Open Tools API since Delphi XE3 XXXXXXXX cannot be replaced because it has sub components"

I have, where possible, been doing replacements in D2007, where I can, but that is annoying to say the least.

Is there an EMB issue open on it?  Number please so I can vote.

If it can't be fixed, are we better off not showing the option in XE3 & up?

Regards,

Ian

 

Share this post


Link to post
9 hours ago, Ian Branch said:

Is there an EMB issue open on it?  Number please so I can vote. 

It says so right in the release blog post:

"Since Delphi XE3 and later no longer allow creating components with subcomponents (the OTAPI function for that crashes – bug report here), GExperts no longer supports these components in the Replace Components expert."

 

The link goes to:

https://quality.embarcadero.com/browse/RSP-25645

Share this post


Link to post

Ahh.  Apologies.  Didn't think to look at/for the Blog post.  :-(

I have voted for it but with only two votes att I don't see it getting much traction/attention. :-(

I also posed the question about disabling the option.  I later realised that it is still valid for many other components.

Apologies for any inconvenience,

Ian

 

Share this post


Link to post
2 hours ago, Ian Branch said:

I have voted for it but with only two votes att I don't see it getting much traction/attention. 😞

I won't hold my breath either. The interesting part is that it took several years until somebody noticed that the expert does no longer work in some circumstances and wrote a bug report for GExperts. I didn't notice it myself, but that's not surprising given that most of my work is still with Delphi 2007 and doesn't involve databases.

I was thinking about a workaround by closing the form and manipulating the dfm and pas file directly. But so far I haven't bothered.

Share this post


Link to post

So, is it a bug or their re-design and that is the way it is?

I for one would really appreciate an alternative as I am constantly trying different components to get the best result.

Regards,

Ian

Share this post


Link to post

Sorry, my curiosity got the better of me.  I currently use D10.3.2.

I have indeed experienced the problem on older, multiple, upgraded (D2007 to D10.2+) converted Apps.  I have the issue in my main app att. :-(

I found that if I fudged things and opened the App in D2007 then Replace Components would do its thing without issue.  Not surprising.

Hmmm.  I thought.  I tried Replace Components on a purely D10.x created App.  Replace Components works, without issue.  :-)

I created a brand new App with multiple xxTable & xxQuery components in it and was able to Replace Components between various vendors without issue.  :-)

I tried copying components from my 'converted' app and pasting them into a new D10.2.3 form, Replace Components didn't work.  :-(

Are the above observations to be expected?

 

Regards,

Ian

 

Share this post


Link to post

The issue as reported to Embarcadero happens with a newly created plugin that uses some small code part copied from GExperts. It's reproducible as described there.

Share this post


Link to post

Is OTAPI still an issue for the GExperts Replace Components functionality in the latest Delphi??

Share this post


Link to post
7 hours ago, Ian Branch said:

Is OTAPI still an issue for the GExperts Replace Components functionality in the latest Delphi??

I seem to remember that it was fixed in Delphi 11 but I am not quite sure.

Share this post


Link to post

I just tried it on D 11.1 Prof and I successfully replaced a TButton with a TEdit, no error message. 

Share this post


Link to post

The bug in the Open Tools API still exists in Delphi 11.1 + April 2022 patch. I just re-enabled the code and got an access violation trying to replace a TAdoTable with some fields with a TAdoQuery. You might want to vote for this issue:

https://quality.embarcadero.com/browse/RSP-25645

 

Edited by dummzeuch

Share this post


Link to post

Hi Thomas,

Thanks for checking.  Unfortunate/disappointing. 

I voted for the issue a long time ago. 🙂

 

Regards,

Ian

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×