So my next step in learning Xojo is to how to connect text fields with the database in my project.
In Filemaker it was a matter of double clicking a field and choosing the table you want it to connect to. What would be the way to do this in Xojo?
From what I read about it, I think I need to do something like an Update method when leaving the text field (using the LostFocus event handler on the field?), so the field.text property will be added to the row in the table that is already open at that moment, but I am not sure how to put all these puzzle pieces together yet. Any suggestions where to start?
Ok. My app is for writing stories, so I start by clicking the Add Story button which starts a new record in the STORIES table. This lets me fill in the two Listboxes for the story title (STORIES table) and their characters (CHARACTERS table). That part is working.
Next I start to fill in the fields that have to be added to this record:
AuthorField (TextField)
GenrePopup (popupMenu)
Source (TextArea)
Notes (TextArea)
All the above fields have their fields in the STORIES table.
I assume the way to get this working is by adding the code to the Lostfocus, so when I click out of the field, the fields.text property will be added into the table fields?
wouldn’t WHAT be happening? or are you infering that any “cancel” or “undo” would involve the user entering the “old” data manually? that defeats the purpose of “undo” and “cancel”
I was thinking that if a user wants to edit the text, he could simply change it and the LostFocus open would update the field in the database table. That is how it works in Filemaker at least.