Difference between revisions of "FileMan Delphi Components/FMDC Quick Start Guide"
DavidWhitten (talk | contribs) |
DavidWhitten (talk | contribs) |
||
Line 35: | Line 35: | ||
<tr><th>For this [[VA_FileMan_field_data_type|Field Type]]</th><th>Add to Your [[Delphi_Form|Form]]</th></tr> | <tr><th>For this [[VA_FileMan_field_data_type|Field Type]]</th><th>Add to Your [[Delphi_Form|Form]]</th></tr> | ||
− | <tr><td>[[Free_Text_Data_Type%7E|Free text]], [[Numeric_Data_Type%7E|Numeric]], [[Date/Time_Data_Type%7E|Date]]</td><td>1 TFMEdit</td></tr> | + | <tr><td>[[Free_Text_Data_Type%7E|Free text]], [[Numeric_Data_Type%7E|Numeric]], [[Date/Time_Data_Type%7E|Date]]</td><td>1 [[FileMan_Delphi_Components/TFMEdit|TFMEdit]]</td></tr> |
− | <tr><td>"Boolean" [[Set_of_Codes_Data_Type%7E|Set of Codes]]</td><td>1 TFMCheckBox</td></tr> | + | <tr><td>"Boolean" [[Set_of_Codes_Data_Type%7E|Set of Codes]]</td><td>1 [[FileMan_Delphi_Components/TFMCheckBox|TFMCheckBox]]</td></tr> |
− | <tr><td>[[Set_of_Codes_Data_Type%7E|Set of Codes]]</td><td><table><tr><td>1 TFMRadioGroup, or</td> | + | <tr><td>[[Set_of_Codes_Data_Type%7E|Set of Codes]]</td><td><table><tr><td>1 [[FileMan_Delphi_Components/TFMRadioGroup|TFMRadioGroup]], or</td> |
− | <TR><td>1 TPanel, plus 1 TFMRadioButton per code</td></tr> | + | <TR><td>1 [[FileMan_Delphi_Components/TPanel|TPanel]], plus 1 [[FileMan_Delphi_Components/TFMRadioButton|TFMRadioButton]] per code</td></tr> |
</TABLE></tr> | </TABLE></tr> | ||
− | <tr><td>Word Processing</td><td>1 TFMMemo</td></tr> | + | <tr><td>Word Processing</td><td>1 [[FileMan_Delphi_Components/TFMMemo|TFMMemo]]</td></tr> |
− | <tr><td>[[Pointer_to_a_File_Data_Type%7E|Pointer]]</td><td><TABLE><TR>1 TFMLister and 1 TFMListBox, or</td></tr> | + | <tr><td>[[Pointer_to_a_File_Data_Type%7E|Pointer]]</td><td><TABLE><TR>1 [[FileMan_Delphi_Components/TFMLister|TFMLister]] and 1 [[FileMan_Delphi_Components/TFMListBox|TFMListBox]], or</td></tr> |
− | <tr><td>1 TFMLister and 1 TFMComboBox, or</td></tr> | + | <tr><td>1 [[FileMan_Delphi_Components/TFMLister|TFMLister]] and 1 [[FileMan_Delphi_Components/TFMComboBox|TFMComboBox]], or</td></tr> |
− | <tr><td>1 TFMLister and 1 TFMComboBoxLookUp</td></tr> | + | <tr><td>1 [[FileMan_Delphi_Components/TFMLister|TFMLister]] and 1 [[FileMan_Delphi_Components/TFMComboBoxLookUp|TFMComboBoxLookUp]]</td></tr> |
</table></tr> | </table></tr> | ||
Line 53: | Line 53: | ||
</table> | </table> | ||
− | b. Set the properties of these controls and [[Delphi_component|component]]s according to the [[VA_FileMan_field|field]]-specific guidelines for the [[VA_FileMan_field_data_type|Field Type]]: Free text, numeric, date - "Boolean" set of codes - Set of Codes - Word Processing - Pointer - Computed. | + | b. Set the properties of these controls and [[Delphi_component|component]]s according to the [[VA_FileMan_field|field]]-specific guidelines for the [[VA_FileMan_field_data_type|Field Type]]: [[FileMan_Delphi_Components/Free_text|Free text]], [[FileMan_Delphi_Components/numeric|numeric]], [[FileMan_Delphi_Components/date|date]] - [[FileMan_Delphi_Components/Boolean_set_of_codes|"Boolean" set of codes]] - [[FileMan_Delphi_Components/Set_of_Codes|Set of Codes]] - [[FileMan_Delphi_Components/Word_Processing|Word Processing]] - [[FileMan_Delphi_Components/Pointer|Pointer]] - [[FileMan_Delphi_Components/Computed|Computed]]. |
6. Select and retrieve a record: | 6. Select and retrieve a record: | ||
− | a. To select a record, follow the procedure in Select a record with the TFMLookUp custom dialog. You'll add a TFMLookUp and TFMLister [[Delphi_component|component]] to your [[Delphi_Form|form]], and add a button that calls the | + | a. To select a record, follow the procedure in Select a record with the [[FileMan_Delphi_Components/TFMLookUp|TFMLookUp]] custom dialog. You'll add a [[FileMan_Delphi_Components/TFMLookUp|TFMLookUp]] and [[FileMan_Delphi_Components/TFMLister|TFMLister]] [[Delphi_component|component]] to your [[Delphi_Form|form]], and add a button that calls the [[FileMan_Delphi_Components/TFMLookUp|TFMLookUp]]'s [[FileMan_Delphi_Components/TFMLookUp|TFMLookUp_Execute|Execute]] method to perform the lookup. |
− | b. TFMLookUp.Execute returns a record number. With this record number, you can retrieve the record and populate your data controls with the record's [[VA_FileMan_field|field]] values. To retrieve the record, follow the procedure in the "How to Retrieve a Record" topic. You'll call the [[FileMan_Delphi_Components/TFMGets|TFMGets]] [[FileMan_Delphi_Components/TFMGets|TFMGets_GetAndFill|GetAndFill]] method to retrieve the record and populate data controls. | + | b. [[FileMan_Delphi_Components/TFMLookUp|TFMLookUp]].[[FileMan_Delphi_Components/TFMLookUp|TFMLookUp_Execute|Execute]] returns a record number. With this record number, you can retrieve the record and populate your data controls with the record's [[VA_FileMan_field|field]] values. To retrieve the record, follow the procedure in the "How to Retrieve a Record" topic. You'll call the [[FileMan_Delphi_Components/TFMGets|TFMGets]] [[FileMan_Delphi_Components/TFMGets|TFMGets_GetAndFill|GetAndFill]] method to retrieve the record and populate data controls. |
− | c. The code for the button that executes | + | c. The code for the button that executes [[FileMan_Delphi_Components/TFMLookUp|TFMLookUp]]'s [[FileMan_Delphi_Components/TFMLookUp|TFMLookUp_Execute|Execute]] method (step a) can also perform the retrieval (step b). The code that combines these tasks would look similar to the following: |
<code> | <code> | ||
procedure TForm1.Button1Click(Sender: TObject); | procedure TForm1.Button1Click(Sender: TObject); | ||
Line 92: | Line 92: | ||
· F1 [[VA_FileMan_field|field]] help in pop-up window | · F1 [[VA_FileMan_field|field]] help in pop-up window | ||
− | · F1 [[VA_FileMan_field|field]] help in pop-up window for TFMRadioGroup Controls | + | · F1 [[VA_FileMan_field|field]] help in pop-up window for [[FileMan_Delphi_Components/TFMRadioGroup|TFMRadioGroup]] Controls |
− | · Automatic OnFocus Display of help in a TPanel | + | · Automatic OnFocus Display of help in a [[FileMan_Delphi_Components/TPanel|TPanel]] |
· Calling a TFMHelp component directly | · Calling a TFMHelp component directly |
Revision as of 19:23, 7 February 2011
This quick start guide goes immediately to the heart of the matter, showing you how to edit records in a particular file using the VA FileMan Delphi Components (FMDC).
To edit records in a given VA FileMan file with the VA FileMan Delphi Components:
1. Establish an RPC Broker connection:
a. Add a TRPCBroker component to your form.
b. Set its properties and invoke its methods as necessary to connect to a server system.
2. Add a TFMGets component to retrieve data:
a. Add a TFMGets component to your form. b. Set its RPCBroker property to point to your form's TRPCBroker component.
c. Set its FileNumber property to the file containing records to retrieve.
3. Add a TFMFiler component to file changes:
a. Add a TFMFiler component to your form.
b. Set its RPCBroker property to point to your form's TRPCBroker component.
4. Add a TFMValidator component to provide validation services:
a. Add a TFMValidator component to your form.
b. Set its RPCBroker property to point to your form's TRPCBroker component.
5. Add VA FileMan data controls for each field:
a. For each field to edit, add data control(s) and supporting data access components to your form as follows:
For this Field Type | Add to Your Form | ||
---|---|---|---|
Free text, Numeric, Date | 1 TFMEdit | ||
"Boolean" Set of Codes | 1 TFMCheckBox | ||
Set of Codes |
| ||
Word Processing | 1 TFMMemo | ||
Pointer |