LiveCode Datagrid Questions

Trevor DeVore lists at mangomultimedia.com
Mon Oct 4 09:33:04 EDT 2010


On Sat, Oct 2, 2010 at 2:29 AM, Peter Haworth <pete at mollysrevenge.com>wrote:

> I'm having a number of issues with datagrids created in LiveCode 4.5.
>  Datagrids created by Revolution 4.0 still work fine.



> I am unable to create custom column behaviors for any columns using the
> recommended method.  I click the plus sign for the column, the card with the
> row template is displayed, I select the row template group but the Edit
> Group button in the toolbar or on the Object menu is greyed out and doesn't
> function.  If I select the card containing the template for the datagrid,
> then select the Row Template group,  the Edit Group command is available to
> me.


Hi Peter,

Are you sure you are selecting the row template group? By chance do you have
"Select Grouped" active in the toolbar? If it is then you are selecting one
of the controls in the group and not the group itself.


> I have a default column behavior script which I use for all my datagrids.
>  Those created under 4.0 correctly execute the various handlers in that
> script but any created under 4.5 never execute any of the handlers in that
> script (the default column behavior is set to the correct button).
>

Hard to say without knowing more details. What troubleshooting steps have
you taken thus far?


> I see two new handlers in the default column behavior supplied with
> LiveCode - PreFillinData and ResetData.  What are some uses for these
> handlers?


These two messages are for advanced use cases where you need to know that
data is being unloaded from a row/column.

For example, let's say you dynamically create player objects in rows of a
data grid when the user clicks a play button to sample a song. If the user
then scrolls that row out of view you might want to do something with the
player object you created dynamically. PreFillinData would allow you to do
that.


> I also saw a recent post to this list regarding some new built in drag and
> drop reordering handlers in the default script - they don't appear in my
> default script.
>

There is no code that goes in the default script. I haven't documented the
drag/drop routines officially but I have posted examples of using it to the
list. I have yet to go through the routines and ensure that I'm completely
happy with the API so they remain undocumented until I do so.

-- 
Trevor DeVore
Blue Mango Learning Systems
ScreenSteps: http://www.screensteps.com
Releasable Revolution Resources for Developers:
http://revolution.bluemangolearning.com



More information about the use-livecode mailing list