Field Editor Updating dgData

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: heatherlaine, Klaus, FourthWorld, kevinmiller

Post Reply
ittarter
Posts: 151
Joined: Sat Jun 13, 2015 2:13 pm

Field Editor Updating dgData

Post by ittarter » Tue Jan 02, 2018 2:56 pm

Hello,

I have a datagrid form with an editable field. I've edited the handler "CloseFieldEditor" in order to save the edited data. However I also want to immediately/automatically save changes to the datagrid's dgData to my online database upon closing the field editor.

The problem is, dgData is not updated to reflect changes until AFTER the handler closefieldeditor finishes(according to my experience and according to the LC dictionary under the datagrid entry "EditFieldText"). So if I call my handler at the end of closefieldeditor, dgData does not yet reflect the changes made in the field editor.

I can bypass the problem in a messy way by using something like

Code: Select all

send "updateDB" to this card after 250 milliseconds
but I'm sure there's a better way to do this. Any ideas? For example, is there another "hidden" handler that actually updates dgData, where I could stick my "send" command, so that it happens after dgData is updated?

I'm using LC 8.1.6. Thanks in advance!

ittarter
Posts: 151
Joined: Sat Jun 13, 2015 2:13 pm

Re: Field Editor Updating dgData

Post by ittarter » Wed Jan 10, 2018 12:23 pm

Did I finally stump the forum? (bump)

Post Reply

Return to “Getting Started with LiveCode - Complete Beginners”