I agree.. it IS a logic issue. I am looking, and have looked. Its probably right there in front of me but I dont recognize it.
This isnt the first time this has happened to me.. but if I stare at it long enough I do eventually see it. I was just hoping that someone can rattle my brain enough to make me think at it a different way than I am now.
But to confirm.. this is not a CloudDB limitation, and what I am trying to do IS possible, yes?
New developments.. I did a little troubleshooting and I discovered that it app is not changing rooms for everyone .. they are still where they were. Its the ListView data that is changing for everyone. Its basically the same thing but the room changing routine works as designed.
What I need to do is make sure that the room name (the tag) is still the same in ListView somehow.. at least that's what I am going to try next.. I should not need to have a separate ListView for each room, should I? Isnt that what Tags are for?
The event blocks ClouDB.GotValue and CloudDB.DataChanged .. does the DataChanged event fire when ever data changes for ANY tag or only the current one that I am using?
And I am not sure how the GotValue event blocks works at all .. when I hover over it, all it tells me is "indicates that a" .. those three words are not very helpful at all.
I am thinking that these blocks have something to do with my issue.
I appreciate the ideas, I really do. I want to figure this out. I guess I am just on the wrong track.
As I see it, and please correct me if I am wrong, CloudDB is a list of lists. Each list is defined by the Tag (the name of the room the user is in) and each of those lists is made up of the ListView elements.. those are the individual messages. The user chooses the tag and should only see the messages available for that particular room. I dont understand how the data is global instead of individual, to me it already is?
The dataChanged event will fire whenever any tag value is changed.
GotValue does just that, when you request a tag with GetValue, GotValue will return the value for that tag.
CloudDB is a key:value (tag:value) database. You can store a single value to the key, or you can store a list to the key, which is returned (with GotValue) as an AI2 list.
DataChanged fires when any tag is changed. So I added the first If/Then to check if the tag that was changed is equal to the name of the room the user is in. If it is then update the current Liveview. However it doesnt work. Any changes elsewhere still affect the current view. I still do not understand this..
I am sorry but I still need an explanation please. I do not see how. I am only removing one message from the current chat room. What am I not understanding?
Actually, I just figured it out and have solved my issue. I was close in my previous try but added an If/Then to both the GotValue and to the DataChanged events and now it is working as desired.
What goes on in one chat room no longer effects what goes on in another.