Hey Folks,
So as we know, the human race is a silly bunch of people.
We do stuff like open up more than one tab in a system designed to be just a single window.
Ahem. With that out of the way, here goes. Get some popcorn.
I'm implementing a nice solution for this problem.
BUT.
One of the major pieces of functionality doesn't work.
1. User opens up a record form. A memory file record, let's call the file mem_EntityOpened, is added.
2. For some reason the user has a second tab to my system open. They leave their desk for a while, come back, and start working on the second tab.
3. On the second tab, they go to say the homepage.
4. In Webhandler, when certain pages are loaded, the mem_EntityOpened records for that Session are deleted. Cleared. No more.
5. The user goes back to the first tab, sees the stuff they were working on, and clicks on the SAVE button.
6. But in between this time, other users have come and gone in that page, changing stuff. The page for this user has the very early info, and will save over the top of any other changes made in between times.
7. My solution code checks for the entity record in mem_EntityOpened, AND IF IT DOESN'T EXIST (because they were working away on tab 2), doesn't let them save the page.
Now the problem is .. And I _think_ this is because of threads (but am not 100%, a little confused) .. That the check in the form on Save doesn't recognise that the records of the memory file have been deleted.
That is. They have definitely been deleted when the user was working away in tab 2. I even created a browse of the memory form, with delete functionality, and open it up in a second tab and delete the record there. It's GONE.
But in the form, in tab 1, when the user clicks on the Save button .. It still has the record in the memory file. I do a set / next and it is there. It shouldn't be. I can't really understand why it's still there (because the whole point of using a memory file in this situation is so I don't have to use a global queue). But it is.
Any thoughts?