CloudDB question

GotValue will also fire from an AppendValueToList and not just from a GetValue, right?

This is my current attempt to fix this..

image

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..

Not as far as I know. You need to run a GetValue to fire a GotValue event....

This will change the chatroom list for all users

image

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?

Is this what I need instead?

image

When the event fires, its taking away a post from everyones current chat room because of the CurrentChatRoom.Text block?

Perhaps this discussion will help How do you create separate chat rooms?

I think you are playing with fire when you use a ListView1.CreateElement to feed a CloudDB AppendValueToList block.

Who knows what internals structure is in that value, or what kind of pointers are in it?

I would Append a plain text value, JOINING with /

  • ChatName,
  • SystemTime (if you need it for cleanup)
  • ChatText

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.

image

What goes on in one chat room no longer effects what goes on in another. :grin:

2 Likes

Thanks @TIMAI2 .. you made me think it through and I solved my issue.

Well done for working it through :slight_smile:

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.