Marshal provides three options for implementation:
- Pure Code using an event handler (minimal changes)
- Marshal Button component (Button as visual component)
- App Inspector component (Marshal automatically starts with the application)
Pure Code
Implementing Marshal in pure code provides you with complete control for layout and build inclusion. Pure code does not require the design time packages in the IDE. This method requires no changes to the DFM file. The changes to the PAS files are:
- Add an entry to the implementation uses clause for the Marshal API class (ex. VCL.SERTTK.Marshal).
- Modify an event handler to call TSERTTKMarshalAPI.ShowMarshal.
**Sample is provided in the procedure MarshalCode in the samples below.
Use this option if your goals are to:
- Control build inclusion / exclusion using conditional compilation with IFDEF statements.
- Not introduce any new controls to existing forms
- Not require design time components in the IDE
- Control the search path at the project level
Marshal Options are allowed using an overloaded constructor to control re-opening inspectors and form width and height. Sample is provided in the procedure MarshalCodeWithOptions in the samples below.
VCL sample Marshal FNC Chart Demo - pure code VCL, FMX sample Marshal FNC Chart Demo - pure code FMX
Marshal Button Component
The button component is provided for quick implementation when you have design space on a form where you can easily add a button.
Use this option when:
- Design space allows you to add the button (button can be set to visible = false using conditional compilation)
App Inspector Component
The app inspector component is a non-visual component for quick implementation when you want Marshal to show automatically every time you start your application.
Use this option when:
- You would like to show Marshal on each startup
- Prefer to re-open inspectors each time
Web Core Source Code
For web core you need to add the source path to the project options.
- Locate the source path from Caddie by clicking on the Directories menu item and selecting RTTK source.
ex. C:\Users\%USERNAME%\AppData\Roaming\RTTK\Source\src - Right click a Web Core project and select project options. Select the options under TMS WEB
- Edit "TMS WEB Source paths" and add the directory found in step 1