or its me

small script to count the number of comma's in a string,

dialog buttons {
title "buttons"
size 880 100 400 150
button "text", 1, 150 10 60 30, ok
edit "", 2, 150 50 200 50, multi rich
edit "result", 3, 150 110 100 30
}

on 1:dialog:buttons:sclick:2:did -ra buttons 3 $count($did(2),$chr(44))

the text entered into dialog ID 2, will be something like " name1, name 2, name 3, name 4, name 5, name 6, name 7", up to name 15, 20, poss more

this will be copied from a web page, and will span multiple lines, so using multi and rich - this is the problem with the on dialog

the problem is (and I have only solved it with a bodge so far of making ID2 edit box very wide), is that $did(2) only appears to operate on the first line of ID2.

when $did(2) acts on $did(name1, name2, name3, name4 string), if ID2 has multiple lines, $did(2) only acts on the first line

am I missing a -switch for " /did -ra buttons $count " ?