GithubHelp home page GithubHelp logo

the-open-tools-api-project's People

Contributors

dgh2112 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

marcellomello2

the-open-tools-api-project's Issues

OTAFormWizard using form inheritance.

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:

image

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!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.