delete chunk.

zryip theSlug zryip.theslug at gmail.com
Wed Nov 3 10:23:13 EDT 2010


On Wed, Nov 3, 2010 at 1:23 AM, Alex Tweedly <alex at tweedly.net> wrote:
>
> Hmmm ... what should I get from
>
> put "a,b,c" into temp
> delete item -1 of temp
>
> I think temp should now have "a,b," - i.e. the last item has disappeared,
> but the (now) trailing item delimiter should still be there.
>
> However, I actually get that temp has "a,b" - the last comma has also
> disappeared.
>
> The docs say that "delete chunk of container" is equivalent to "put empty
> into chunk of container" - but if I replace it so I do
>
> put "a,b,c" into temp
> put empty into item -1 of temp
>
> then I do indeed get "a,b,".
> Feels like a bug, and I should put it into QCC - but it's late at night and
> I may be just missing something.
> Am I ?
>
> Thanks
> -- Alex.

Alex,

I have not followed all the thread but a synonym for:

delete item -1 of temp

is

delete last item of temp


See items like kind of containers.
With "a,b,c" you have a group three boxes.

By using:

delete last item of temp

you will removing completly the last box from the group
And you will have as result 2 boxes:

"a,b"

However by using:

put empty into last item of temp

you will empty the last box, but the box will still exist:

"a,b,"


So not a bug but a natural way to use items in LC ;)



Regards,
-- 
-Zryip TheSlug- wish you the best! 8)
http://www.aslugontheroad.co.cc



More information about the use-livecode mailing list