Retention of values in global fields

In FMP I’m used to setting UserID and similar values in a global right after the user logs in. I’m attempting to do the same in Servoy.

However, I’m discovering when I switch into Developer mode the values in the globals are dumped. Is this normal, expected behaviour? Can I reset Servoy to retain the current values despite switching in and out of developer mode?

If these values are routinely dumped, it’s going to make future debugging very difficult if these fields unexpectedly have no values.

Yes, the state of Servoy when leaving the designer is the same as when done loading the solution, this is intentionally so… it should however not make a difference for debugging becouse the debugger window can be open while working like a Servoy client in edit mode.

Jan Blok:
Yes, the state of Servoy when leaving the designer is the same as when done loading the solution, this is intentionally so… it should however not make a difference for debugging becouse the debugger window can be open while working like a Servoy client in edit mode.

Is it possible to attach a method to the process of coming out of Designer mode? I have some values in global fields I’d like restored so that when running tests these fields won’t trigger errors.

Perhaps I’m still thinking too much like an FMPer. I have global fields containing setting values for that individual. Certain routines make reference to those fields when they run, quite a few of them actually, or at least that is my current intention.

Works well within FMP. If that’s not the best way to manage this type of thing in Servoy, I’m open to suggested alternatives.

Kind regards.

Morley:
Is it possible to attach a method to the process of coming out of Designer mode? I have some values in global fields I’d like restored so that when running tests these fields won’t trigger errors.

Create a global method sets your application to an initial state (like starting up as user x) and list in menu. Run it everytime you exit designer mode.

  • David