Delete columns... How?
Alex Tweedly
alex at tweedly.net
Fri Aug 29 12:56:31 EDT 2014
Because (I imagine) "combine ... column" requires that the keys be
consecutive numbers.
This does work (deleting column 2, just for testing, and omitting the
safety check that there are at least 3 columns :-)
on mouseUp
set the columndelimiter to comma
get fld 1
put it into tVar
split tVar by column
put the number of lines in the keys of tVar into N
repeat with i = 3 to N
put tVar[i] into tVar[i-1]
end repeat
delete local tVar[N]
-- delete local tVar[2]
combine tvar by column
put tvar after msg
end mouseUp
-- Alex.
On 29/08/2014 10:33, FlexibleLearning.com wrote:
> Related problem to 'join columns': How to delete a column of data?
>
> This fails...
>
> on mouseUp
> get fld 1
> split it by column
> delete local it[2]
> combine it by column
> put it into fld 2
> end mouseUp
>
> It seems that 'combine by column' requires the same number of array keys as
> the original data set.
>
> Hugh Senior
> FLCo
>
>
>
> _______________________________________________
> 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
More information about the use-livecode
mailing list