Difference between revisions of "FileMan Delphi Components/FMDC Quick Start Guide"
DavidWhitten (talk | contribs) |
DavidWhitten (talk | contribs) |
||
Line 1: | Line 1: | ||
+ | = Ingroduction = | ||
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). | 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). | ||
+ | = Editing = | ||
To edit records in a given VA FileMan file with the VA FileMan Delphi Components: | To edit records in a given VA FileMan file with the VA FileMan Delphi Components: | ||
− | 1. Establish an [[RPC Broker]] connection: | + | == 1. Establish an [[RPC Broker]] connection: == |
a. Add a [[FileMan_Delphi_Components/TRPCBroker|TRPCBroker]] [[Delphi_component|component]] to your [[Delphi_Form|form]]. | a. Add a [[FileMan_Delphi_Components/TRPCBroker|TRPCBroker]] [[Delphi_component|component]] to your [[Delphi_Form|form]]. | ||
Line 9: | Line 11: | ||
b. Set its properties and invoke its methods as necessary to connect to a server system. | b. Set its properties and invoke its methods as necessary to connect to a server system. | ||
− | 2. Add a [[FileMan_Delphi_Components/TFMGets|TFMGets]] [[Delphi_component|component]] to retrieve data: | + | == 2. Add a [[FileMan_Delphi_Components/TFMGets|TFMGets]] [[Delphi_component|component]] to retrieve data: == |
a. Add a [[FileMan_Delphi_Components/TFMGets|TFMGets]] [[Delphi_component|component]] to your [[Delphi_Form|form]]. | a. Add a [[FileMan_Delphi_Components/TFMGets|TFMGets]] [[Delphi_component|component]] to your [[Delphi_Form|form]]. | ||
Line 16: | Line 18: | ||
c. Set its [[FileMan_Delphi_Components/FileNumber_property|FileNumber property]] to the [[VA FileMan File|file]] containing records to retrieve. | c. Set its [[FileMan_Delphi_Components/FileNumber_property|FileNumber property]] to the [[VA FileMan File|file]] containing records to retrieve. | ||
− | 3. Add a [[FileMan_Delphi_Components/TFMFiler|TFMFiler]] [[Delphi_component|component]] to file changes: | + | == 3. Add a [[FileMan_Delphi_Components/TFMFiler|TFMFiler]] [[Delphi_component|component]] to file changes: == |
a. Add a [[FileMan_Delphi_Components/TFMFiler|TFMFiler]] [[Delphi_component|component]] to your [[Delphi_Form|form]]. | a. Add a [[FileMan_Delphi_Components/TFMFiler|TFMFiler]] [[Delphi_component|component]] to your [[Delphi_Form|form]]. | ||
Line 22: | Line 24: | ||
b. Set its [[FileMan_Delphi_Components/RPCBroker_property|RPCBroker property]] to point to your [[Delphi_Form|form]]'s [[FileMan_Delphi_Components/TRPCBroker|TRPCBroker]] [[Delphi_component|component]]. | b. Set its [[FileMan_Delphi_Components/RPCBroker_property|RPCBroker property]] to point to your [[Delphi_Form|form]]'s [[FileMan_Delphi_Components/TRPCBroker|TRPCBroker]] [[Delphi_component|component]]. | ||
− | 4. Add a [[FileMan_Delphi_Components/TFMValidator|TFMValidator]] [[Delphi_component|component]] to provide validation services: | + | == 4. Add a [[FileMan_Delphi_Components/TFMValidator|TFMValidator]] [[Delphi_component|component]] to provide validation services: == |
a. Add a [[FileMan_Delphi_Components/TFMValidator|TFMValidator]] [[Delphi_component|component]] to your [[Delphi_Form|form]]. | a. Add a [[FileMan_Delphi_Components/TFMValidator|TFMValidator]] [[Delphi_component|component]] to your [[Delphi_Form|form]]. | ||
Line 28: | Line 30: | ||
b. Set its [[FileMan_Delphi_Components/RPCBroker_property|RPCBroker property]] to point to your [[Delphi_Form|form]]'s [[FileMan_Delphi_Components/TRPCBroker|TRPCBroker]] [[Delphi_component|component]]. | b. Set its [[FileMan_Delphi_Components/RPCBroker_property|RPCBroker property]] to point to your [[Delphi_Form|form]]'s [[FileMan_Delphi_Components/TRPCBroker|TRPCBroker]] [[Delphi_component|component]]. | ||
− | 5. Add VA FileMan data controls for each [[VA_FileMan_field|field]]: | + | == 5. Add VA FileMan data controls for each [[VA_FileMan_field|field]]: == |
a. For each [[VA FileMan field|field]] to edit, add data control(s) and supporting data access components to your [[Delphi_Form|form]] as follows: | a. For each [[VA FileMan field|field]] to edit, add data control(s) and supporting data access components to your [[Delphi_Form|form]] as follows: | ||
Line 55: | Line 57: | ||
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]]. | 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 [[[[FileMan_Delphi_Components/TFMLookUp_Select_a_record_custom_dialog|Select a record with the 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. | a. To select a record, follow the procedure in [[[[FileMan_Delphi_Components/TFMLookUp_Select_a_record_custom_dialog|Select a record with the 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. | ||
Line 76: | Line 78: | ||
end; | end; | ||
</code> | </code> | ||
− | 7. Set up Automated OnExit Processing: | + | == 7. Set up Automated OnExit Processing: == |
a. Your data controls should already be linked to a [[FileMan_Delphi_Components/TFMFiler|TFMFiler]] and a [[FileMan_Delphi_Components/TFMValidator|TFMValidator]] [[Delphi_component|component]], from following the [[FileMan_Delphi_Components/Data_Control_Property_Settings_For_All_Field Types|Data Control Property Settings for All Field Type]]s guidelines when you set up each data control on your [[Delphi_Form|form]]. | a. Your data controls should already be linked to a [[FileMan_Delphi_Components/TFMFiler|TFMFiler]] and a [[FileMan_Delphi_Components/TFMValidator|TFMValidator]] [[Delphi_component|component]], from following the [[FileMan_Delphi_Components/Data_Control_Property_Settings_For_All_Field Types|Data Control Property Settings for All Field Type]]s guidelines when you set up each data control on your [[Delphi_Form|form]]. | ||
Line 82: | Line 84: | ||
b. Set every data control's coValOnExit value to True, in each control's [[FileMan_Delphi_Components/FMCtrlOptions_property|FMCtrlOptions property]]. | b. Set every data control's coValOnExit value to True, in each control's [[FileMan_Delphi_Components/FMCtrlOptions_property|FMCtrlOptions property]]. | ||
− | 8. Provide an event to save changes: | + | == 8. Provide an event to save changes: == |
a. To save changes the user makes to the record, follow the procedure in the "[[FileMan_Delphi_Components/How_To_File_Changes|How to File Changes]]" topic. You'll add a button whose caption is something like "Save Changes." You'll add code for this button's OnClick event handler that calls your [[FileMan_Delphi_Components/TFMFiler|TFMFiler]]'s [[FileMan_Delphi_Components/TFMFiler|TFMFiler_Update|Update]] method to file changes. | a. To save changes the user makes to the record, follow the procedure in the "[[FileMan_Delphi_Components/How_To_File_Changes|How to File Changes]]" topic. You'll add a button whose caption is something like "Save Changes." You'll add code for this button's OnClick event handler that calls your [[FileMan_Delphi_Components/TFMFiler|TFMFiler]]'s [[FileMan_Delphi_Components/TFMFiler|TFMFiler_Update|Update]] method to file changes. | ||
− | 9. (Optional) Provide context-sensitive [[VA_FileMan_field|field]] help: | + | == 9. (Optional) Provide context-sensitive [[VA_FileMan_field|field]] help: == |
You can retrieve the [[VA_FileMan_field|field]]-based help from the data dictionary in several ways: | You can retrieve the [[VA_FileMan_field|field]]-based help from the data dictionary in several ways: | ||
Line 98: | Line 100: | ||
* [[FileMan_Delphi_Components/Calling_A_TFMHelp_component|Calling a]][[FileMan_Delphi_Components/TFMHelp|TFMHelp]] [[Delphi_component|component]] directly | * [[FileMan_Delphi_Components/Calling_A_TFMHelp_component|Calling a]][[FileMan_Delphi_Components/TFMHelp|TFMHelp]] [[Delphi_component|component]] directly | ||
− | 10. Register your application: | + | == 10. Register your application: == |
Registering your application is part of [[RPC Broker]] security. For all users that do not possess the XUPROGMODE key, your application must register itself based on a "B"-type option in the Option file on the server. | Registering your application is part of [[RPC Broker]] security. For all users that do not possess the XUPROGMODE key, your application must register itself based on a "B"-type option in the Option file on the server. |
Revision as of 20:14, 7 February 2011
Contents
- 1 Ingroduction
- 2 Editing
- 2.1 1. Establish an RPC Broker connection:
- 2.2 2. Add a TFMGets component to retrieve data:
- 2.3 3. Add a TFMFiler component to file changes:
- 2.4 4. Add a TFMValidator component to provide validation services:
- 2.5 5. Add VA FileMan data controls for each field:
- 2.6 6. Select and retrieve a record:
- 2.7 7. Set up Automated OnExit Processing:
- 2.8 8. Provide an event to save changes:
- 2.9 9. (Optional) Provide context-sensitive field help:
- 2.10 10. Register your application:
Ingroduction
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).
Editing
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 |