NetTalk Central
NetTalk Web Server => Web Server - Ask For Help => Topic started by: ccordes on July 13, 2011, 04:00:34 PM
-
I have a memory form that updates some system wide (unthreaded) global values. This has been working until today when I upgraded to 5.29. Now the when the form opens all the values are cleared. Of course, doing that clears them everywhere. Cancel or save are no help because the values at that point are gone.
What happened?
I can make them stay by loading them into a session variable in the pre-update, but that seems kludgey to me for something that was working before.
I hope I'm just overlooking a new checkbox somewhere.
Chris
-
Hi Chris
Seems strange. I use a memory form in 529 to get information about a restaurant booking and if confirmed write the info into the booking table. When I return to the form all the values are still populated I have to deletesessionvalue and deletevalue for all the memory form variables to get a clean form.
-
Hi Chris,
You don't mention which version you upgraded from, but I'm not aware of any recent changes to this. Can you make a small example to duplicate the effect please.
cheers
Bruce
-
ahh - you do mention it - 5.21 (it's in the subject line) - sorry missed that.
-
Here is a Example 2 with an added Memory Form
Compile and run it. It is using port 89.
Go ahead and enter the global variables.
Watch the window of the webserver. You will see the Name and Number displayed. (Yes I know this isn't thread safe)
This sets up the situation. Close and reopen the browser.
Go back to the site.
Click MemForm.
Global values are cleared.
=========================
PS -
I can get around this by loading session variables with the global values at the pre-update embed, but I don't know why this should be since I didn't need to do this before.
[attachment deleted by admin]
-
Hi Chris,
thanks for the example - yeah I can see what's happening.
the key thing I think is that global, unthreaded, variables are unlike any other variables (file fields, locals, threaded etc) in that the "canonical" value is always in the actual variable, and not in the session queue. Everything else the session queue takes precedence.
there have been some tweaks to the way memory variables are handled in some cases, and I think this has spilled over into globals. For now (and probably for a while) it's probably a good idea to do as you suggest and prime the session queue in the pre-update embed. This will only affect a very small number of forms, and I'd rather not tweak the form more if I can help it at this stage.
cheers
Bruce
-
That's exactly what I thought. Very nearly unavoidable.
I added a template to my NT Add-ons to take care of it because I know I would never remember what was going on there.
Thanks