That thread is not locked. Should I merge this duplicate with the original, so folks interested in this subject can find the discussion in one place?
Multiple itemDelimiters
Moderators: Klaus, FourthWorld, heatherlaine, robinmiller, kevinmiller
-
- VIP Livecode Opensource Backer
- Posts: 6381
- Joined: Sat Apr 08, 2006 7:05 am
- Location: Los Angeles
- Contact:
Re: super itemDel redux
Richard Gaskin
Community volunteer LiveCode Community Liaison
LiveCode development, training, and consulting services: Fourth World Systems: http://FourthWorld.com
LiveCode User Group on Facebook : http://FaceBook.com/groups/LiveCodeUsers/
Community volunteer LiveCode Community Liaison
LiveCode development, training, and consulting services: Fourth World Systems: http://FourthWorld.com
LiveCode User Group on Facebook : http://FaceBook.com/groups/LiveCodeUsers/
-
- VIP Livecode Opensource Backer
- Posts: 5740
- Joined: Wed May 06, 2009 2:28 pm
- Location: New York, NY
Re: super itemDel redux
Richard.
I wanted to open the subject anew. If you merge it, it will be lost in the cloud.
What do you think about it?
Craig
I wanted to open the subject anew. If you merge it, it will be lost in the cloud.
What do you think about it?
Craig
-
- VIP Livecode Opensource Backer
- Posts: 6381
- Joined: Sat Apr 08, 2006 7:05 am
- Location: Los Angeles
- Contact:
Re: super itemDel redux
I don't understand. How is any thread more or less "lost" than any other?
When new posts are added to a thread, the thread is bumped back into the Recent list, as fresh as anything else.
When duplicate threads are created, that's when the original discussion becomes lost.
And in the future, there's no telling which thread a passer-by may find first, so there's no guarantee the older thread may not become newer than this some day, but anything here would be lost, just as this thread causes those ideas to be lost.
When new posts are added to a thread, the thread is bumped back into the Recent list, as fresh as anything else.
When duplicate threads are created, that's when the original discussion becomes lost.
And in the future, there's no telling which thread a passer-by may find first, so there's no guarantee the older thread may not become newer than this some day, but anything here would be lost, just as this thread causes those ideas to be lost.
Richard Gaskin
Community volunteer LiveCode Community Liaison
LiveCode development, training, and consulting services: Fourth World Systems: http://FourthWorld.com
LiveCode User Group on Facebook : http://FaceBook.com/groups/LiveCodeUsers/
Community volunteer LiveCode Community Liaison
LiveCode development, training, and consulting services: Fourth World Systems: http://FourthWorld.com
LiveCode User Group on Facebook : http://FaceBook.com/groups/LiveCodeUsers/
-
- VIP Livecode Opensource Backer
- Posts: 5740
- Joined: Wed May 06, 2009 2:28 pm
- Location: New York, NY
Re: super itemDel redux
Ah, I see what you mean.
Merge.
Craig
Merge.
Craig
-
- VIP Livecode Opensource Backer
- Posts: 6381
- Joined: Sat Apr 08, 2006 7:05 am
- Location: Los Angeles
- Contact:
Re: Multiple itemDelimiters
Thanks - done.
Richard Gaskin
Community volunteer LiveCode Community Liaison
LiveCode development, training, and consulting services: Fourth World Systems: http://FourthWorld.com
LiveCode User Group on Facebook : http://FaceBook.com/groups/LiveCodeUsers/
Community volunteer LiveCode Community Liaison
LiveCode development, training, and consulting services: Fourth World Systems: http://FourthWorld.com
LiveCode User Group on Facebook : http://FaceBook.com/groups/LiveCodeUsers/
Re: Multiple itemDelimiters
Just remember that itemdel is resetted in any new handler:dunbarx wrote: ↑Wed Sep 24, 2014 11:36 pmI have wanted this since forever. In the beginning, there was the comma. Then came any character. A wonderful improvement. But I wish there were, like custom properties, the ability to define as many "item" delimiters as one wanted. In many scripts I write, and especially in loops, I set and reset the itemDelimiter, back and forth, parsing data in different portions of the processed text. Consider data sets like:
aaa,bbb,ccc#ddd,eee,fff -- note the "," and "#" separating different portions of each string
ggg,hhh,jjj#kkk,xxx,yyy
Not sure what to call them, ( "item1.item2...")? So you could (pseudo):
That sort of thing...Code: Select all
get theAboveText set the itemDel to comma set the item2Del to "#" repeat with x = 1 to the number of lines of it repeat with y = 1 to the number of items of line x of it repeat with z = 1 to the number of item2 of item y of line x of it put item2 z of item y of line x of it & return after temp end repeat end repeat end repeat
...
########CODE to copy and paste with your mouse#######
local temp
on mouseUp
repeat for each line tLine in theAboveText
repeat for each item tItem in tLine
check2 tLine
end repeat
end repeat
end mouseUp
on check2 tLine
set itemdel to "#"
repeat for each item tItem in tLine
put tItem & return after temp
end repeat
end check2
########END OF CODE generated by this livecode app: http://tinyurl.com/j8xf3xq ########
########Code tested with livecode 9.0.0########
Livecode Wiki: http://livecode.wikia.com
My blog: http://livecodeitalia.blogspot.it
To post code use this: http://tinyurl.com/ogp6d5w
My blog: http://livecodeitalia.blogspot.it
To post code use this: http://tinyurl.com/ogp6d5w
-
- VIP Livecode Opensource Backer
- Posts: 5740
- Joined: Wed May 06, 2009 2:28 pm
- Location: New York, NY
Re: Multiple itemDelimiters
Max.
Sure. Lots of creative ways to weave "additional" itemDelimters.
I want to know if you and others think either my request or Phaworth's variant is the best thing since unsliced bread.
Craig
Sure. Lots of creative ways to weave "additional" itemDelimters.
I want to know if you and others think either my request or Phaworth's variant is the best thing since unsliced bread.
Craig
Re: Multiple itemDelimiters
Craig,
I prefer to keep separate handlers, because otherwise code become too complex to read and debug.
Livecode Wiki: http://livecode.wikia.com
My blog: http://livecodeitalia.blogspot.it
To post code use this: http://tinyurl.com/ogp6d5w
My blog: http://livecodeitalia.blogspot.it
To post code use this: http://tinyurl.com/ogp6d5w