deleting lines from a list-field
Jan Schenkel
janschenkel at yahoo.com
Tue Jun 24 13:22:52 EDT 2008
--- Jim Lambert <jiml at netrin.com> wrote:
> >>
> >> Why not sort the hilitedLines first?
> >
> > Thanks Jan but, the line order has to
> > remain as is, or else my users
> > would get distracted/confused by
> > the visual effect.
>
> Nicolas,
>
> Jan's handler doesn't sort the actual contents of
> your list, just a
> copy of the hilitedLines.
> So, the list's line order and its display remain
> unaffected. The user
> will simply see their selected lines disappear,
> which is the desired
> behavior.
>
> I remember being totally stumped in the early
> HyperCard days by the
> same problem - how to delete a container's lines in
> a repeat loop? It
> didn't seem possible, because as soon as you deleted
> a line the line
> numbers would change and you'd end up deleting lines
> you should have
> kept. I tried all sorts of complex gyrations,
> including actually
> inserting numbers before the lines! Then a kind
> soul, Steve Nelson I
> think, advised, "Just work backwards." So simple! It
> taught me a
> bigger lesson. Sometimes a solution appears when you
> just flip the
> problem upsidedown.
>
> Jim Lambert
>
Is that because when you turn it upside down, all the
problems fall out? :-)
Jan Schenkel.
Quartam Reports & PDF Library for Revolution
<http://www.quartam.com>
=====
"As we grow older, we grow both wiser and more foolish at the same time." (La Rochefoucauld)
More information about the use-livecode
mailing list