LiveCode is the premier environment for creating multi-platform solutions for all major operating systems - Windows, Mac OS X, Linux, the Web, Server environments and Mobile platforms. Brand new to LiveCode? Welcome!
I know I could loop over all lines save all unknown words/items in a Dictionary/Array and skip if it is among the lines of my dictionary array. Just wondering if there is a better way to do this?
Basically what I am trying to do is get all unique tags in an XML File.
on mouseUp
put fld 1 into tF
put empty into tArray
## We create an ARRAY where your entries are the keys
## with the trick of adding something to the CONTENT of the keys,
## we will end with the unique names of your entries
repeat for each line i in tF
add 1 to tArray[i]
end repeat
## We don't need the CONTENT of the array, just the KEYS, which are now what we are looking for :-)
put keys of tArray into fld 2
end mouseUp
"fld 1" contains your doublette strings, "fld 2" will show all entries without the doublettes:
service
product
item
put field "Your List" into myListArray
split myListArray by cr and tab
combine myListArray by cr and tab
Kind regards,
Mark
Last edited by Mark on Thu Dec 20, 2012 1:31 pm, edited 2 times in total.
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode
Lets not confuse the others. It works correctly now, right?
Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode