Problems with the Cloud Db component event on change

Guys, I made a Chat application using the CloudDB component but due to problems updating the posts in the component's onchange event the solution I found was to put an update button that reopens the home screen, then the updated posts appear. Would you have a better solution that dispensed with such use of the update button?


The project's AIA file goes ahead CHATONLINE.aia (66.3 KB)

Better? Different... perhaps use a Clock timer instead of your UPDATE POSTS button.

Here are some resources to help you learn to use the AI2 tools and use event handlers. To update your posts, you need a different type of event handler. . A very good way to learn App Inventor is to read the free Inventor's Manual here in the AI2 free online eBook http://www.appinventor.org/book2 ... the links are at the bottom of the Web page. The book 'teaches' users how to program with AI2 blocks and discusses event handlers.

There is a free programming course here http://www.appinventor.org/content/CourseInABox/Intro and the aia files for the projects in the book are here: http://www.appinventor.org/bookFiles

How to do a lot of basic things with App Inventor are described here: http://www.appinventor.org/content/howDoYou/eventHandling .

Also look here App inventor español. Offline. Tutorial. Ejemplos. Instalación. Códigos. Juegos. Curso gratis de App inventor. and here Tutorial Index | imagnity for more tutorials.

Regards,
Stevve

1 Like

Hi Steve, I want to thank you very much for the links provided, where you can find extensive documentation on the use of components in building applications with APPINVENTOR. They will be of great value to me. The post made by me is to find out if there are bugs with the mentioned event of the component, because even using a tutorial from here (Chat with CloudDB) I noticed recurring failures regarding the update of the posts. Once again I thank you very much for the material indicated.

The default CloudDB server sometimes has issues during periods of high usage (usually weekends). The performance using your own Redis server would be significantly more stable Juarez.

Keep experimenting. These links to Forum articles regarding the MIT CloudDB might be of value Search results for 'clouddb' - MIT App Inventor Community

..and of course, the CloudDB documentation. If you find a FirebaseDB tutorial, be aware, in most instances, you can swap the FirebaseDB components for CloudDB components. The basic databases are nearly identical in how the controls work (if you like to experiment).

1 Like

Hi Steve, before coming here to answer this question I also rebuilt my Application using FirebaseDb and, amazingly, I came across the same problem with the onchange event. It is frustrating that you wait for the event to fire and it does not fire. The solution I found (initial post), although I agree that it is weird, has not presented problems. I will study the use of the component suggested by you (clock) to replace the update button.

Hi Steve, I implemented a new idea. I created a procedure and put it in the startup block and in the gotvalue event. Deletes the ondatachange event. But keep the update button. It has improved a lot; updates are appearing without using the button. So, I'll post the post solved. Thanks again. See you soon.

CHATONLINE.aia (66.4 KB)

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