Lazarus

Programming => General => Topic started by: slivitin on February 28, 2021, 05:36:43 pm

Title: How to pass information from one form to another by ActionList
Post by: slivitin on February 28, 2021, 05:36:43 pm
Hi.
I have:
1. main program unit
2. data module unit
3. custom form unit

In the custom form I have a list with "vendors"(I get vendors from the database). I want to create one procedure for whole program for add/delete/change vendor (because maybe I will call this procedure from different places of my program) and I want to pass VendorName from custom form to this procedure. How it is possible? With global variables or I can redefine some code in the Action?
Title: Re: How to pass information from one form to another by ActionList
Post by: jamie on February 28, 2021, 10:02:04 pm
use a unit with the code in it and include that unit in the USES list of all other units that needs access to it.

all public identifiers go in the INTERFACE section
Title: Re: How to pass information from one form to another by ActionList
Post by: egsuh on March 01, 2021, 04:59:44 am
I haven't seen your whole application, but the first thought is that you define the procedures in the data module, and add the datamodule in the uses clause of other units.
TinyPortal © 2005-2018