Jump to content

Public variable


andreiluis

Recommended Posts

Hi Andrei

 

I'm new in uniGUI too but my opinion is:

 

You can create some kind of data structure (record or class) in UniMainModule where you can store all the information you want. You can capture the user information through

 a TUniLoginForm and store it in the structure I said before or in a Database.

 

I hope I have been helpful

 

Cheers...

 

Link to comment
Share on other sites

Hi  Oliver,

 

Please, could you tell me why not use global vars in TUniMainModule?, I ask because i use vars, why you recommend Properties, please i need your answer, because

then i'm doing in the wrong way.

 

Thanks in advanced,

 

rasaliad

Link to comment
Share on other sites

Hi rasaliad,

 

Each session has its own instance of MainModule, with its own properties: if many users are connected at the same time, each user will get its own Mainmodule in its own session and its own properties (thus its own pointers to server addresses).

If you use global vars, you could have the same pointer used by concurrent users at the same time: global vars belong to UserModule (which is the same for all sessions).

Link to comment
Share on other sites

  • 5 months later...

Hi, I require to know if a record in the database is being shown on the screen, that's why I think I could use for all users who use the application visible variable. Each time a user display the log in screen , the record is added to the global variable visible whenever you release the record the record is released. That form could check if a record is in use. You can do it as encoded and I have to drive ? if possible please add the code delphi
for better understanding

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...