Datagrid help

LiveCode is the premier environment for creating multi-platform solutions for all major operating systems - Windows, Mac OS X, Linux, the Web, Server environments and Mobile platforms. Brand new to LiveCode? Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
sturgis
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 1685
Joined: Sat Feb 28, 2009 11:49 pm

Datagrid help

Post by sturgis » Mon Jan 25, 2010 4:59 am

I hope someone can help me with this. I have a datagrid setup as a program launcher list (a dg form). Everything works ok, except for removing entries.

The entry removal code works for all rows except the last. I know I've seen the answer to this problem somewhere but I can't find it.

I've uploaded the stack. Currently it will only work on OS X. IT will create a database file in the Documents folder called sqLauncher.sqldb

To use the stack, simply drag the document or app you wish to add to the launcher list and it will add it and update the database.

To delete from the list, click the X button and it will delete the line and remove the entry from the database.

Deleting a last lone entry doesn't work. Help?
myStack.zip
(5.04 KiB) Downloaded 226 times

trevordevore
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 1005
Joined: Sat Apr 08, 2006 3:06 pm
Contact:

Re: Datagrid help

Post by trevordevore » Mon Jan 25, 2010 4:35 pm

What Sorts of Things Should I Not Do In Order To Avoid Needless Suffering?

I couldn't locate the deleteLine or checkForEmpty handlers but I'm guessing you are deleting a line/index from within the row behavior script. You either need to use "send in time" or move the mouseUp script to the Data Grid group script.
Trevor DeVore
ScreenSteps - https://www.screensteps.com

LiveCode Repos - https://github.com/search?q=user%3Atrevordevore+topic:livecode
LiveCode Builder Repos - https://github.com/search?q=user%3Atrevordevore+topic:livecode-builder

sturgis
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 1685
Joined: Sat Feb 28, 2009 11:49 pm

Re: Datagrid help

Post by sturgis » Mon Jan 25, 2010 4:56 pm

Ty ty for helping me stop needlessly suffering! Much appreciated.

sturgis
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 1685
Joined: Sat Feb 28, 2009 11:49 pm

Re: Datagrid help

Post by sturgis » Mon Jan 25, 2010 6:20 pm

Thanks very much, got it working. I knew I had read about this before, but couldn't find it.

Its working dandy now.

Post Reply