How to remove item from list

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller

Post Reply
hudsonj
Posts: 3
Joined: Fri Apr 29, 2011 9:44 pm

How to remove item from list

Post by hudsonj » Mon May 23, 2011 3:28 pm

In a list of items how can I remove one of the items.

put "a,b,c,d,e,f" into titems

I would like to remove the c from titems and leave the rest alone.

Even nicer is a way to remove item 3 from the list.

Thank you

Klaus
Posts: 14194
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: How to remove item from list

Post by Klaus » Mon May 23, 2011 3:41 pm

Hi hudsonj,

...
delete item 3 of tItems
## -> a,b,d,e,f
...
:D

Check "itemdelimiter" (default = COMMA) in the dictionary for further info about "items" etc...


Best

Klaus

jmburnod
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 2729
Joined: Sat Dec 22, 2007 5:35 pm
Contact:

Re: How to remove item from list

Post by jmburnod » Mon May 23, 2011 5:06 pm

Hi hudsonj,

If you have only the value of the item you can use itemoffset

put itemoffset(c,titems) into LeNum
delete item Lenum of titems

All the best

Jean-Marc
https://alternatic.ch

Post Reply