Datagrid deleteline vs deletelines issue

zryip theSlug zryip.theslug at gmail.com
Sun Sep 9 14:13:13 EDT 2018


Henry,

I can confirm, the deleteLine behavior changed in dg2. Inside the dg2
library, deleteLine and deleteLines are different handlers now (deleteLine
is managing some animation now according to the comment I've seen in the
code). Inside dg1, deleteLine was just calling deleteLines.
Same remark with the deleteIndex and deleteIndexes command.

Inside DGH I've changed deleteLine for deleteLines for fixing a bug but I
did not read the documentation. This is probably something to update inside
the documentation with a warn about ascendant compatibility.


On Sun, Sep 9, 2018 at 6:51 PM hlowe via use-livecode <
use-livecode at lists.runrev.com> wrote:

> The Dictionary states that the command 'deleteline': "Deletes the specified
> lines from the data grid.
>
> The syntax is:
>
> dispatch "DeleteLine" to group "DataGrid" with pLine
>
> where pLine is a comma-delimited list of one or more integers, indicating
> the lines to be deleted.
>
> So to delete lines 1,2 and 3 of the datagrid "myDG" we would use:
>
> put "1,2,3" into pLine
> dispatch "DeleteLine" to group "myDG" with pLine
>
> The Dictionary also states that the command 'deletelines' (note the plural
> form) is a synonym for deleteline, implying that either form will do the
> same thing.
>
> However 'deleteline' using LC 9.0.1 (RC3) on a Mac (running an iOS App in
> both the emulator and on the device) will only accept a single line number
> in its 'pLine' parameter. Passing more that one integer in 'pLine' causes
> 'deleteline' to fail silently. To delete more that one line, I must use the
> pleural form of the command 'deletelines'.
>
> put "1,2,3" into pLine
> dispatch "DeleteLine" to group "myDG" with pLine
>
> fails silently
>
> while
>
> put "1,2,3" into pLine
> dispatch "DeleteLines" to group "myDG" with pLine
>
> succeeds
>
> A bug, a Dictionary issue or something more complex?
>
> Can anyone else confirm this?
>
> Henry
>
> Ascriva Health Informatics
> https://www.ascriva.com
>
>
>
> --
> Sent from:
> http://runtime-revolution.278305.n4.nabble.com/Revolution-User-f278306.html
>
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>


-- 
Zryip TheSlug
http://www.aslugontheroad.com



More information about the use-livecode mailing list