andreiluis Posted April 23, 2014 Posted April 23, 2014 Hi, How can I set a Public Variable, that will receive diferent values according the user logged? Thanks, Andrei Quote
Bresler Posted April 23, 2014 Posted April 23, 2014 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... Quote
Oliver Morsch Posted April 23, 2014 Posted April 23, 2014 Use Properties / Fields in TUniMainModule! Don't use global vars! Quote
rasaliad Posted April 24, 2014 Posted April 24, 2014 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 Quote
ZigZig Posted April 24, 2014 Posted April 24, 2014 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). Quote
asapltda Posted September 25, 2014 Posted September 25, 2014 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 delphifor better understanding Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.