DeleteLine from a DG Form

Anything beyond the basics in using the LiveCode language. Share your handlers, functions and magic here.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
quailcreek
Posts: 746
Joined: Sun Feb 04, 2007 11:01 pm

DeleteLine from a DG Form

Post by quailcreek » Tue Aug 11, 2015 3:29 am

I know this has been discussed on a few threads but I didn't find a solution. My code is in the behavior script of a datagrid form. The user can swipe left to reveal a delete image/button. When they tap the delete image they are presented with the option of deleting or not. There is additional code which deletes the row data from the SQLite Db.

All this code is supposed to do is remove the row from the DG. What am I doing wrong.

Code: Select all

put the dgHilitedLines of me into tLineNum
         lock screen
         dispatch "deleteLine" to me with tLineNum
         dispatch "refreshList" to me
         unlock screen
Thanks a lot.
Tom
MacBook Pro OS Mojave 10.14

quailcreek
Posts: 746
Joined: Sun Feb 04, 2007 11:01 pm

Re: DeleteLine from a DG Form

Post by quailcreek » Tue Aug 11, 2015 4:06 am

Ok, I found my error.

put the dgLine of me into tLineNum
not
put the dgHilitedLines of me into tLineNum
Tom
MacBook Pro OS Mojave 10.14

Post Reply