dgh2112 / the-open-tools-api-project Goto Github PK
View Code? Open in Web Editor NEWThis is a collection of code and articles for my Open Tools API blog post.
This is a collection of code and articles for my Open Tools API blog post.
Hello,
Your repository was recommended to me by Embarcadero support itself. I looked for something that could help me in your e-book "The Delphi IDE Open Tools API - Version 1.2", but I didn't find exactly what I was looking for. So I hope you read this Issue and can help me!
Let's go!
For some time I have been trying (but without success) to use OTAFormWizard and register a Wizard to create forms that are based on another base form.
The idea is to have a base form, with all the common visual parts (buttons, panels, etc.) already defined, and for the Wizard to create new forms from this base form.
I managed to get the Wizard to create the unit (.pas) with the desired code, but it does not inherit the visual part (.dfm) as expected, the new form is created empty,
without the components that are in the base form.
I used the IOTAModuleCreator interface to create the .pas implementing the NewImplSource function, and that worked.
But even implementing NewFormFile with the desired .dfm code, when I create the new form through File|New|Other|New I receive this message:
It seems that the Wizard doesn't understand that I want to create a form that inherits the components of its ancestor. Then he adds the unit to the project (.dpr) using:
...
contains
....
Unit1 in 'Unit1.pas' {fmBaseForm1: TfmBaseForm};
rather than:
...
contains
....
Unit1 in 'Unit1.pas' {fmBaseForm1};
that would be correct.
And also in the .dproj file something like:
<DCCReference Include="Unit1.pas">
<Form>fmBaseForm1</Form>
<FormType>dfm</FormType>
<DesignClass>TfmBaseForm</DesignClass>
</DCCReference>
where the DesignClass element should not be added for it to work as expected.
I know I can get a similar result using the "Add to Repository" option, but I think that with wizard it would be better to standardize several IDE installations.
I'll attach an example of the approach I'm trying to use.
InheritedFormWizard.zip
Finally, I would like to know if this is possible, and what might be missing in my example to make it work.
Grateful! Any help will be welcome!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.