DataGrid EditCellOfIndex auto close editor

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
david.silmanBUSrUeQ
Posts: 44
Joined: Thu Jul 19, 2012 1:49 pm

DataGrid EditCellOfIndex auto close editor

Post by david.silmanBUSrUeQ » Tue May 07, 2013 12:52 pm

Hi all

Whilst working with the DataGrid Control (I can hear you groaning already) I've been trying to get it so that when editing a cell, pressing return/enter moves to the next line down, the problem i'm having with this is that the field editor is created but closes instantly and i have no idea why. I'm using a datagrid table and my own field editor script. I've run out of things to try, the main problem is that when i breakpoint it, the editor isn't deleted, but remove the breakpoint and the editor is deleted. Now, I'm not an expert at livecode, but surely that's something that shouldn't happen right?

Thanks
David

david.silmanBUSrUeQ
Posts: 44
Joined: Thu Jul 19, 2012 1:49 pm

Re: DataGrid EditCellOfIndex auto close editor

Post by david.silmanBUSrUeQ » Tue May 07, 2013 1:12 pm

Nevermind I've found the answer to my problem

If anyone is interested:
What I did was on preOpenFieldEditor I stored the long id of the editor, then when the user presses enter/return in the editor it sets a boolean variable to true.
Then in deleteFieldEditor, if the stored id of the editor exists and the bool is set to true, it allows the editor to be deleted, else it doesn't. Seems simple now i've done it but was a major pain beforehand

Thanks
David

Post Reply