Jump to content

Public variable


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




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,



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

Join the conversation

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

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...