Topic: send in new produres

new procedures created by action in MVD have this in the procedure lince

Sender: string;    what does this reference?   could this be used to return the data in a sub form back to the form that called it?

for example,  I have a customer lookup form that uses the incremental search feature and then return the clicked customer to the form where the customer was being choosen,  I have this form repeated twice along with the code that put the clicked item back into the calling form,   Could this "sender"  be used to put the clicked item back into the form that called the customer finer and I could get rid of duplicated from and code?

I just tested and it seems to have the form that was called not the form that called

Re: send in new produres

You can return data using functions, example:


function GetSum (a, b: integer): integer;
begin
   result := a+b;
end;

procedure Form1_Button1_OnClick (Sender: string; var Cancel: boolean);
var
   c: integer;
begin
   c := GetSum(2, 3);
   ShowMessage(c);
end;

Sender - is the name of the component that generated the event.
This is necessary when using a single event multiple components.

Dmitry.