Multiple itemDelimiters

Something you want to see in a LiveCode product? Want a new forum set up for a specific topic? Talk about it here.

Moderators: heatherlaine, Klaus, FourthWorld, robinmiller, kevinmiller

FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 6110
Joined: Sat Apr 08, 2006 7:05 am
Location: Los Angeles
Contact:

Re: super itemDel redux

Post by FourthWorld » Tue May 15, 2018 6:50 pm

dunbarx wrote:
Tue May 15, 2018 6:16 pm
I am re-opening this issue (See "Multiple itemDelimiters" in the forum).
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?
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/

dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 5489
Joined: Wed May 06, 2009 2:28 pm
Location: New York, NY

Re: super itemDel redux

Post by dunbarx » Tue May 15, 2018 6:57 pm

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

FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 6110
Joined: Sat Apr 08, 2006 7:05 am
Location: Los Angeles
Contact:

Re: super itemDel redux

Post by FourthWorld » Tue May 15, 2018 7:52 pm

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.
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/

dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 5489
Joined: Wed May 06, 2009 2:28 pm
Location: New York, NY

Re: super itemDel redux

Post by dunbarx » Tue May 15, 2018 7:54 pm

Ah, I see what you mean.

Merge.

Craig

FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 6110
Joined: Sat Apr 08, 2006 7:05 am
Location: Los Angeles
Contact:

Re: Multiple itemDelimiters

Post by FourthWorld » Tue May 15, 2018 8:08 pm

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/

MaxV
Posts: 1535
Joined: Tue May 28, 2013 2:20 pm
Location: Italy
Contact:

Re: Multiple itemDelimiters

Post by MaxV » Wed May 16, 2018 4:41 pm

dunbarx wrote:
Wed Sep 24, 2014 11:36 pm
I 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):

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
That sort of thing...
...
Just remember that itemdel is resetted in any new handler:

########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

dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 5489
Joined: Wed May 06, 2009 2:28 pm
Location: New York, NY

Re: Multiple itemDelimiters

Post by dunbarx » Wed May 16, 2018 4:47 pm

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

MaxV
Posts: 1535
Joined: Tue May 28, 2013 2:20 pm
Location: Italy
Contact:

Re: Multiple itemDelimiters

Post by MaxV » Thu May 17, 2018 2:09 pm

dunbarx wrote:
Wed May 16, 2018 4:47 pm
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
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

Post Reply

Return to “Feature Requests”