How to get return value?

This is the main technical forum for discussing problems that were encountered by users while developing PROMOTIC applications, and their possible solutions.

How to get return value?

Postby hongshiong » Thu 16. Jul 2015 8:36:19

How to get return value? for example Pm.logon? is there any example? and what is the return value of Pm.Logoff?
hongshiong
 
Posts: 10
Joined: Wed 08. Jul 2015 14:58:05

Re: How to get return value?

Postby admin » Tue 21. Jul 2015 11:32:13

Hi

Pm.Logon returns values:

nRes = Pm.Logon(sName, sPassword)

Return Values:
0 - Login succesfull.
1 - User not registered, log in failed.
2 - Password incorrect, log in failed.
-1 - Missing parameters, log in failed.

http://www.promotic.eu/en/pmdoc/Objects ... /Logon.htm

Pm.Logoff does not have return values
admin
Administrátor
 
Posts: 67
Joined: Wed 12. Dec 2012 15:43:09

Re: How to get return value?

Postby hongshiong » Tue 21. Jul 2015 14:14:07

Hi, thanks for your reply, however i need to do a function like if i successfully logout ONLY then it will automatically goes to login page, it is not a suitable to used onMousePress as it goes to login page directly even i havent logout. That is why i need logout return value, so that i can set for that features.

Thanks :)
hongshiong
 
Posts: 10
Joined: Wed 08. Jul 2015 14:58:05

Re: How to get return value?

Postby admin » Tue 21. Jul 2015 14:18:15

No problem, you can use the onUserLogoff event:

malajec_logoff.png
malajec_logoff.png (23.34 KiB) Viewed 10943 times
admin
Administrátor
 
Posts: 67
Joined: Wed 12. Dec 2012 15:43:09


Return to I don't know how to...

Who is online

Users browsing this forum: No registered users and 2 guests

cron