Missing split option?
Richard Gaskin
ambassador at fourthworld.com
Wed May 18 11:37:22 EDT 2016
Bob Sneidar wrote:
> It also seems you CAN create an array where you get named keys, but
> the text has to be something like:
>
> put "A apple;;B bottle;;C cradle" into myVariable split myVariable by
> ";;" and space
Yes, that's the row-based method split presumes, functionally equivalent to:
A<tab>Apple<cr>
B<tab>Bottle<cr>
C<tab>Cradle<cr>
split tData with cr and tab
> In no case can I figure a way to use split in the manner you want.
I was hoping there was some magic I'd missed.
> But it occurs to me that datagrids do this by nature. If you were to
> set the dgText of a data grid, then get the dgData of the same, you
> would get the exact effect you seek.
Good for the Master part of my Master-Detail layout, but this is for the
Detail part. I'm writing a generic handler to populate Detail views from
an array containing the data for a record selected in the Master view
(never gonna type that generic code again! <g>).
DGs will give the array directly so I don't need to deal with that when
using those as the Master, but more often I use list fields for the
Master, where it would be convenient to have the array made in one line.
Minor issue though, certainly fast enough to just write a loop function
for that and move on....
--
Richard Gaskin
Fourth World Systems
Software Design and Development for the Desktop, Mobile, and the Web
____________________________________________________________________
Ambassador at FourthWorld.com http://www.FourthWorld.com
More information about the use-livecode
mailing list