I have a problem with a new project (this same type of thing I’ve done on other projects without problem): I have two buttons one for login and one for logout. They control a boolean property called LoggedIn. There seems to be an issue changing this property (or any other for that matter) when using security. This works:
window = system.gui.getWindow("PackoutType1")
#ret = app.security.Login()
ret = system.gui.inputBox("Enter something.","Test")
#if len(ret) > 0 :
event.source.parent.LoggedIn = 1
This does not:
window = system.gui.getWindow("PackoutType1")
ret = app.security.Login()
#ret = system.gui.inputBox("Enter something.","Test")
#if len(ret) > 0 :
event.source.parent.LoggedIn = 1
In the not working version, the LoggedIn property immediately go back to it’s last state. It has no bindings. This seems to be the case when I try to change any window properties in this manner. Any ideas?
Are you even getting to the line where it sets the LoggedIn property to a 1? Are you getting any errors when calling app.security.Login()?
If you don’t have any bindings it is either not getting there or something else on the window is changing the value or maybe the function app.security.Login() is changing the value.
I suppose I’m getting there. While trying out different things I would have a message box pop up with a reporting it’s value as true after setting it to 1 but as soon as it closes, it goes back to 0. Nothing else is bound to it. The same happens if I try to set any properties on the window, say the text of a fresh label I just dropped on the page.
That is pretty weird. Does restarting the designer do the same thing? If so something must be changing the value of the property and it is hard to track down. Can you call our tech support so we can look at the window?
I’ll give you a jingle as soon as I can. Thanks