AGB  ·  Datenschutz  ·  Impressum  







Anmelden
Nützliche Links
Registrieren
Zurück Delphi-PRAXiS Delphi-PRAXiS - Lounge Delphi-News aus aller Welt Updated and Open Source CanTools Wizards
Thema durchsuchen
Ansicht
Themen-Optionen

Updated and Open Source CanTools Wizards

Ein Thema von DP News-Robot · begonnen am 29. Okt 2020
Antwort Antwort
Benutzerbild von DP News-Robot
DP News-Robot

Registriert seit: 4. Jun 2010
15.391 Beiträge
 
#1

Updated and Open Source CanTools Wizards

  Alt 29. Okt 2020, 13:30
In the very early days of Delphi I wrote a collection of IDE plugins I called" Cantools Wizards" and made available for free in binary format. The old page is still at*https://www.marcocantu.com/cantoolsw/*(I'll update it, time permitting).

The original collection had more wizards, but some are very old (like the database wizard) or don't work great or have been replaced by features of the IDE (like the clipboard history, added and recently removed for performance and security reasons). At this time the open source version for 10.4.x has only two wizards, activated by an add-on*menu in the IDE (under Tools).

Rebuild Wizard

The Rebuild Wizard allows you to select all projects in a folder (and its subfolders), open them all, and build them all. This is the UI:


</br>
</br> The list button*fills the list below with projects in subfolders, and the other buttons have options for building all of the projects or opening and building one. Notice that if you look at the source code you can see that there isn't a OpenToolsAPI for compiling, so the wizard activates the matching IDE menu item.

OOP Form Wizard

This wizard allows you to hide the published components of a form, making your form more object-oriented and providing a much better encapsulation mechanism. You activate it while a form is the active module in the editor, and it creates for you an OnCreate event handler with instructions to set each field to the matching component. It also generates a RegisterClass call you need to manually move to the initialization section of the unit. You also need to manually move the component fields to the private section of the form class declaration.*

This is the code the wizards adds to a very simple form:



And this is how you should manually update it:



The value here is for a form with dozens of components and a project with dozens of forms, as the wizard is fairly limited, but the code it generated would be very tedious to write directly.

The GitHub Project

As mentioned, this time round I published the code for the current subset of wizards on GitHub*with an MIT license at https://github.com/marcocantu/cantools

The code is very old, and not very clean (or even fully matching standard Delphi coding conventions), but I think it is fairly instructive*in the way it hooks to ToolsAPI and the IDE, with hooks to the About box and splash screen. I plan adding a couple more of my other old wizards to it.

You can also find the ready-to-use binary at*https://www.dropbox.com/s/whflj6062tiscb8/cantools_104.bpl



Weiterlesen...
  Mit Zitat antworten Zitat
Antwort Antwort


Forumregeln

Es ist dir nicht erlaubt, neue Themen zu verfassen.
Es ist dir nicht erlaubt, auf Beiträge zu antworten.
Es ist dir nicht erlaubt, Anhänge hochzuladen.
Es ist dir nicht erlaubt, deine Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks are an
Pingbacks are an
Refbacks are aus

Gehe zu:

Impressum · AGB · Datenschutz · Nach oben
Alle Zeitangaben in WEZ +1. Es ist jetzt 03:07 Uhr.
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz