NetTalk Central

Author Topic: memory forms 5.21 v 5.29?  (Read 4345 times)

ccordes

  • Sr. Member
  • ****
  • Posts: 384
    • View Profile
    • Email
memory forms 5.21 v 5.29?
« 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
Real programmers use copy con newapp.exe

terryd

  • Hero Member
  • *****
  • Posts: 759
    • View Profile
    • Davcomm
    • Email
Re: memory forms 5.21 v 5.29?
« Reply #1 on: July 13, 2011, 08:48:15 PM »
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.
Terry Davidson
Windows 10 64 bit/Windows7 64bit
Clarion 9.1.11529/Clarion10 12567
Nettalk 913
Nettalk 1015
StringTheory267/Winevent515/XFiles298/MessageBox239/Cryptonite186

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: memory forms 5.21 v 5.29?
« Reply #2 on: July 13, 2011, 09:05:55 PM »
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

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: memory forms 5.21 v 5.29?
« Reply #3 on: July 14, 2011, 05:01:23 AM »
ahh - you do mention it - 5.21 (it's in the subject line) - sorry missed that.

ccordes

  • Sr. Member
  • ****
  • Posts: 384
    • View Profile
    • Email
Re: memory forms 5.21 v 5.29?
« Reply #4 on: July 14, 2011, 08:19:08 AM »
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]
« Last Edit: July 14, 2011, 09:40:41 AM by ccordes »
Real programmers use copy con newapp.exe

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: memory forms 5.21 v 5.29?
« Reply #5 on: July 15, 2011, 04:35:43 AM »
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

ccordes

  • Sr. Member
  • ****
  • Posts: 384
    • View Profile
    • Email
Re: memory forms 5.21 v 5.29?
« Reply #6 on: July 15, 2011, 05:15:29 AM »
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
Real programmers use copy con newapp.exe