Jump to content

Create variable in session in unigui


lidernetwork

Recommended Posts

I would like to know how we can work with variables that do not mix in sessions in the unigui. I created some global variables in MainModule to save, login, user name, etc ...

 

The problem is that the sessions are merging so if the user 1 logs on to the system and the user 2, only the user 2 gets the data in the variables. I would like to separate this data for each session.

I've tried to check the sample project but it does not work as I wanted.

How can I do it?

Link to comment
Share on other sites

thanks for answering

 

I have 3 string variables in the mainmodule and would like to record the user name and password at the time the user logs in. With this example I could not do it because the FMyStringVar variable in the example does not receive any value. So I would like to know where to fill this value in the variable and then use it later?

Link to comment
Share on other sites

  TUniMainModule = class(TUniGUIMainModule)
  private                                                 
    FUserName: String;
  public                                                  
    property UserName: String read FUserName write FUserName;
  end;


and on logon form you write:
 
  uses
    MainModule;

  UniMainModule.UserName := edtUserName.Text;



  end;

Thank you very much for your help, problem solved!

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...