Finding the index of something in the datagrid
zryip theSlug
zryip.theslug at gmail.com
Thu Feb 17 19:29:11 EST 2011
On Fri, Feb 18, 2011 at 12:38 AM, Bob Sneidar <bobs at twft.com> wrote:
> Thanks I found it by looking at the parent script. For some reason the API I am reading does not have it. The URL is http://revolution.screenstepslive.com/spaces/revolution_tools/manuals/datagrid/lessons/3461-Data-Grid-API
I have this by reading the API of this link:
<snip>
FindIndex / FindLine
- FindIndex pKey, pSearchString
- Search for data in pKey that matches pSearchString. pKey is one of
the custom defined keys you defined for your data. pSearchingString is
the value to look for in that key. You can pass multiple
pKey=pSearchString combinations to match multiple criteria.
-- Find the index where "message" is "hi"
dispatch "FindIndex" to group "DataGrid" with "message", "hi"
put the result into theIndex
<snip>
> Do I have this wrong? I only see 3 functions in the API: ColumnControlOfIndex, GetDataOfIndex, and GetDataOfLine. This might explain why I am having a hard time with DG's (not to mention the fact that my prior DG was messed up somehow).
Anyway, there is only a few function in the datagrid API.
You have also:
- ColumnControlOfLine a recent function added with the datagrid
library version 1.0.2 build 6
- GetKeyValuesOfIndexes used by the dgKeyValuesOfHilitedIndexes
property. I think it is recent and I have not explored it yet.
Some properties, functions or commands are indeed not documented in the API.
In my experience, be extremly carefull before to conclude your
datagrid is broken. It could depend how you explored the parent
script. If you opened the library script by using such command as "go
to stack revdatagridlibrary" and then editing the datagrid button, the
library could stop working properly resulting of odds effects in your
opened datagrids. In this case, close your copy of LC and reopen it.
Then, test your work again.
For a safe parent script exploration, prefer to edit the parent script using:
edit script of btn "data grid" of stack revdatagridlibrary
Best regards,
--
-Zryip TheSlug- wish you the best! 8)
http://www.aslugontheroad.co.cc
More information about the use-livecode
mailing list