Marshal was designed to be implemented with one line of code and an entry in the implementation uses statement. A code sample is provided with the demo applications. look at the following lines:
implementation {$R *.dfm} uses {$IFDEF DEBUG} Vcl.SE.RTTK.Marshal, {$ENDIF} dmRTTKVCLU; procedure TfrmRTTKVCL.btnMarshalClick(Sender: TObject); begin {$IFDEF DEBUG} TSERTTKWorker.ShowMarshal; {$ENDIF} end;
This approach ensures that Marshal will never go into a release build. The button "btnMarshal" will still be on the form, an assignment to visible = false would hide the button. The calling method could be a hot key combination, image click, any event that you can catch.
ShowMarshal is a class static method that checks for an application form by name and either creates or shows the form if it already exists. No private variables are needed in the calling form, the ShowMarshal method will handle the lookup.
- Details
- Written by: Administrator
- Category: Marshal
Session Review
The session holds a log of your actions in Marshal so that you can modify as many times as necessary without taking notes on the side.
Navigation
The session is organized by time.
Object Plus Change
Click on an event that is Object Inspector modification to bring up the detail.
Here you see the detail of your change, and a side by side view of screenshots before and after.
Analysis in Caddie
- Details
- Written by: SwiftExpat
- Category: Marshal
Exercise 1 : Label and Edit
This exercise uses the demo applications to get familiar with Object Plus and Marshal. The form has alignment and width issues for practice.
The problems are:
-
Label is not aligned to client
-
Edit is not aligned to client
-
List box is not wide enough
Start the FMX demo and then click on Marshal. Marshal creates its own form so that you can put it next to your application or on a second monitor. I will show them side by side in this exercise.
Edit1 Alignment
Edit1 should read “The Quick Brown Fox Jumped over the lazy moon”, but only “ver the lazy moon” is visible. To fix this you will use Marshal to start an Object Plus Inspector for Edit1 by locating it in the navigation tree. Marshal provides a context menu to “Go To Active” which will navigate the tree to the active control.
-
Click on the Edit1 to make it active in the main form.
-
Switch to the Marshal form and then right click on the form to show Go To Active and then select it.
Now we will use Object Plus to modify the alignment from center to client.
The final result is here:
Listbox1 Width
In this step you will use Object Plus to modify the width of the listbox1. Navigate up to the listbox1 to open an Object Plus inspector for this control. Scroll down in the properties to width
.
Now modify the width property to 300. Here is the result and now we can read the entire text.
Label1 Alignment
In this step you will use Object Plus to modify the alignment of Label1. Navigate to listboxitem1 and expand it to show Label1.
Now modify the alignment to client and here is the result.
Review the Session
Continue on by reviewing the session Session Review
- Details
- Written by: SwiftExpat
- Category: Marshal
VCL |
FMX |
|||||
---|---|---|---|---|---|---|
Delphi |
Win32 |
Win64 |
Win32 |
Win64 |
Android |
OSX |
11.X | Yes | Yes | Yes | Yes | Yes | Yes |
10.4 | Yes | Yes | Yes | Yes | Yes | Yes |
10.3 | Yes | Yes | Yes | Yes | Yes | -- |
10.2 | Yes | Yes | Yes | Yes | Yes | -- |
10.1 | Yes | Yes | Yes | Yes | Yes | -- |
10.0 | Yes | Yes | Yes | Yes | Yes | -- |
FNC Required Version
Marshal requires version of 3.3.2.0 of FNC UI Pack which includes a fix to prevent a stack overflow in object inspector.
- Details
- Written by: SwiftExpat
- Category: Marshal
Marshal displays a left hand tree of forms and datamodules to allow you to navigate your applications components to inspect at runtime. The first page is the the app info inspector which captures some runtime values from your application.
Navigation Elements
-
Application / forms tree
Marshal builds a tree of your applications forms and datamodules. Clicking on the items in the tree allow you to drill down. Each element opens an inspector for that class type. -
Tabs for each component
Each component receives a separate tab for inspection to allow easy comparison of components. -
Inspectors by class type
Inspectors are custom views based on class types, each object gets an Object Plus inspector by default -
Inspector view area
This client area displays the detail view(s) of the inspector -
Path in application to component
Status bar display of the active component.
- Details
- Written by: SwiftExpat
- Category: Marshal
Subcategories
Inspectors
Inspectors allow you to explore details of your application at runtime. Inspectors contain the code to generate the information and visualize it depending on the type of information. They are similar to debug visualizers in the IDE, presenting the information in a more usable form.
Inspectors - visualizers / support tools
Object Plus provides access to component properties and events at runtime
Application Inspector Essential results based on RTL
Dataset Grid Grid view of an TDataset
Query SQL Adhoc query for TFDConnection