With version 2.0 we have spent some precious development time into a new package manager. Similar to other solutions it allows to separate components into packages that can be independently installed in the IDE. Although there is no imminent need for it right now, it opens the IDE for 3rd party and user components that can be integrated into the RAD environment easily.
While there is still some work ahead to iron out some teething problems in the upcoming beta version, it is already used in combination with the new visual designer and its basic set of components, called the “Smart Component Library” (SCL). In addition to the basic set of components, two additional 3rd party packages are shipped with the product TeeChart.spk (by Steema Software) and Grid.spk (by Berg Software). The packages are built to integrate neat-less into the IDE’s component palette.
Furthermore we added an example package called W3Slider.spk with embedded source code. It is designed according to the all-in-one-file approach, that can also be used for the project. With packages designed like this, installation can be as easy as dropping the spk file to the ‘Packages’ folder. In the future we will also add support for encrypted package source code, so that it is possible to build closed source packages.
While the amount of changes (compared to Version 1.x) in this regards seem to be very little, it meant infact to rewrite the entire chain of handling components (in the component palette, visual designer & property inspector) from scratch. Previously all components were “hard coded” in Delphi, which means for every new component we added, we needed to update the component palette, add a dedicated Delphi component for the visual designer & property inspector, convert from Delphi to DWS at compile time and handle property storage in form file. All this code was convoluted in several manners and one couldn’t change one part without affecting other parts in the IDE.
But let’s stick on what we have now, let’s stay on topic! The packages are basically in a similar XML format as your projects, which means you can – in case of emergencies – edit (and eventually fix) the packages at any time. This can be quite useful, since at the moment the GUI part of the package manager is limited to the essentials. For example it’s not possible at the moment to specify different categories for different components in one package. So far you may only specify one category per package, while the packages would allow an even more detailed specification of categories (per component). Also it’s not yet possible to change/specify icons for a component other than by editing the package files.
But of course you don’t need to know all the details if you only want to work with the packages, so let’s move on to the next chapter.
Package installation / usage
The installation of packages is very easy. All you need to do is to drop the package to the ‘Packages’ subdirectory.
Note that it might also be necessary to add glyphs for the component palette to the glyphs directory, but that depends whether the icons are specified internally or externally. At the moment a basic set of (external) glyphs is shipped with the product. We decided to make them available externally, so you can change them anytime to your favorite set of icons (the current icons are not always as clear as possible).
Once you have added/removed a package to the package subdirectory you have to restart the IDE in order to get the packages enumerated and listed in the component palette. If you have deleted a package, it will remain in the IDE’s cache until you restart the IDE.
After the packages have been installed, you can use the components in the same manner as you used the components in version 1.x.