Lesson 3 — beware non-refreshing Simulator

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Locked
cavenewt
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 66
Joined: Fri Mar 15, 2013 3:54 pm
Location: Jackson Hole, Wyoming, USA

Lesson 3 — beware non-refreshing Simulator

Post by cavenewt » Tue Aug 27, 2013 3:55 pm

Going back through the Lesson 3 video, I had earlier missed the bit about the SQLite and MySQL checkboxes in Standalone Application Settings. But my Simulator seemed to be working. Turns out, the Web MySQL connection was working (because it uses a server-side script), and when I clicked on one of the other connection buttons in the Simulator, the contents of the Contacts field retained the content from the web connection. This was apparent because clicking on the SQLite button still showed 2 Veronicas, where the SQLite database should only have 1 Veronica.

Problem solved by putting empty into the field Contacts on each new database connection type, in the script for group "databaseType".

Code: Select all

on touchEnd pId
   mobGUIUntouch the long id of me
   
   put empty into field "contacts" of card "contacts"
   
   databaseConnect the uOptionText of me
   databaseSelectAllNames   
end touchEnd
The lesson did have us putting that line to empty the Contacts field in the databaseSelectAllNames handler, but that handler apparently wasn't getting called if the SQL checkboxes in Standalone Application Settings are not checked.

Locked

Return to “Summer School 2013”