COMMUNICATION BETWEEN INTRAWEB FORMS

<< Click to Display Table of Contents >>

Navigation:  Forum >

COMMUNICATION BETWEEN INTRAWEB FORMS

Forum link

 


 

10-24-2021, 02:18 AM:

 

Dear Companions

 

I would like to request a help from you.

 

I am new to using Intraweb.

 

I'm studying the Intraweb that was originally installed in Delhi Tokyo (Version 14).

 

I have a question that I need your help with.

 

Let's imagine a Delphi project for Windows.

 

And in this project I have 2 forms:

 

a)-the first is for research

 

b)-the second for Registration

 

In the Search form I have a Button: EDIT, in which I create the Register form and pass to it the Table ID.

 

In the form of Registration I have a property with ID of the Table.

 

From then on, the Register form is autonomous and manages your actions using the ID Property.

 

But as I understand it, what works in a Windows application would no longer work in an Intraweb Web Application.

 

The problem is that I understand that in Intraweb I cannot use the Public Section

 

of any Form or datamodule, because the value will be public for all users connected.

 

So, how do you pass values between one form and another?

 

Grateful

 

Carlos

 

Brazil

 


 

10-25-2021, 06:56 PM:

 

IntraWeb acts very much like a normal Windows VCL/FMX application. You can use the public section of each form class (but not the non class area) safely. In fact, just look at the IntraWeb demos and how they pass data around.

 


 

10-25-2021, 08:18 PM:

 

Thanks for your attention!

 

Please, how can I access the Intraweb Demos?

 


 

10-25-2021, 08:29 PM:

 

https://github.com/Atozed/IntraWeb

 


 

10-26-2021, 01:29 AM:

 

Dear sir

 

Let me see if I understood.

 

Can I have the following situation Below?

 

FORM 1:

 

=====

 

procedure TIWForm2.IWButton1Click(Sender: TObject);

 

var

 

frm: TIWForm3;

 

begin

 

frm := TIWForm3.Create(WebApplication);

 

frm.UserMessage := edtUserMassage.Text;

 

frm.Show;

 

end;

 

FORM 2:

 

=====

 

type

 

TIWForm3 = class(TIWAppForm)

 

IWButton1: TIWButton;

 

procedure IWAppFormShow(Sender: TObject);

 

procedure IWButton1Click(Sender: TObject);

 

private

 

FUserMessage: string;

 

public

 

property UserMessage: string read FUserMessage write FUserMessage;

 

end;

 

implementation

 

{$R *.dfm}

 

procedure TIWForm3.IWAppFormShow(Sender: TObject);

 

begin

 

WebApplication.ShowNotification(FUserMessage);

 

end;

 

QUESTION : The USERMESSAGE property value will only be visible for the current user?

 

Thanks for your help.

 


 

10-26-2021, 08:39 PM:

 

Yes, but as you have it private you wont be able to set it here:

 

frm.UserMessage := edtUserMassage.Text;

 

You need to make it public in TIWForm3

 


 

10-26-2021, 10:03 PM:

 

Yes, each connected user has its own instance of a TIWForm3, so when you set FUserMessage for one user, the other user will still have a different FUserMessage value.

 

If you have 2 connected users, you will have 2 instances of TIWForm3.

 


 

10-27-2021, 02:38 AM:

 

Your information was very clear to me!

 

Now I understand that I can use the Public section of any form.

 

for the purpose of creating properties and allowing forms to

 

communicate.

 

I'm still starting to study Intraweb.

 

Thank you very much for your kindness and attention!