So I've been playing with livecode, and am very impressed, I have found a mystery, or made a mistake though that I can't seem to solve.
I have a group of fields (text input and one scrolling text box). The fields get populated when selecting a listing from a Datagrid and all is well. The weirdness is that upon selecting a listing in the Datagrid and having it populate the form fields, I can select any *blank* fields just fine (nothing happens to the other fields which is correct), however if I select a field that has some text in it, every field in the group gets cleared... and I'm not specifying anywhere or clearing it. I've tried using the message watcher, as well as tried trapping mouseUps (which appears to be when the fields all get reset) both at the field and group levels, but I don't know why this would be happening. Could anyone lend some insight or troublshooting tips (the message watcher really just got me confused so it didn't help much)
Thanks in advance, any direction would be helpful.
Jim
Troubleshooting self-clearing form fields
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
Re: Troubleshooting self-clearing form fields
ok I understand what is happening now, but not why.
When I select a line in the DataGrid, the action handler for selectionChanged fires and runs my code to move data to the form fields, BUT when I then click on any of the form input text fields that have text in them selectionChanged is fired again... however if I click into an empty field and tab to the same field with text, everything will work and selectionChanged isn't fired... what gives? Can I somehow prevent selectionChanged from occuring once I'm outside the DataGrid? I thought this would be default behavior.
When I select a line in the DataGrid, the action handler for selectionChanged fires and runs my code to move data to the form fields, BUT when I then click on any of the form input text fields that have text in them selectionChanged is fired again... however if I click into an empty field and tab to the same field with text, everything will work and selectionChanged isn't fired... what gives? Can I somehow prevent selectionChanged from occuring once I'm outside the DataGrid? I thought this would be default behavior.
Re: Troubleshooting self-clearing form fields
figured it out, selectionChanged is sent anytime you click into a field and set the insertion point to anything other than the origin, it doesn't get sent with arrow key entry.