Defining single-select field items

Hi Clifton,
I'm back. I've spent hours trying to do this. I must be missing something pretty basic. It should be simple ... I have reduced the problem to a small test app. Here's the action detail
In my program I'm getting a folder list via XMLHttpRequest. That part works fine. I just want to put the list into a listbox (TB single-select field). In the TB Help it says itemText is an array. So why can't I put my array into the itemText property?
I have tried looping to set each item in the itemText property but I can't because there is no access to the individual items of itemText.
I'm back. I've spent hours trying to do this. I must be missing something pretty basic. It should be simple ... I have reduced the problem to a small test app. Here's the action detail
- Code: Select all
-- On click... -----------------------------------------------------------------
Define local variable "txt" (Initial value: "")
Define local variable "txtArray" (Array)
Define local variable "ctr" (Initial value: "")
Comment: text of field "txt" is "am, stram, gram"
Set txt to text of field "txt"
Comment: txtArray is an array
Execute Script pgSplitToArray (HTML)
Comment: This testing loop proves that the array contains the required content.
Step ctr from 1 to txtArray [ 0 ] by 1
Display alert: txtArray [ ctr ]
End step loop
Set itemText of Field "test" to txtArray
Comment: pg equivalent below:
Execute Script pgTBObjSet (HTML)
Comment: but nothing happens!
In my program I'm getting a folder list via XMLHttpRequest. That part works fine. I just want to put the list into a listbox (TB single-select field). In the TB Help it says itemText is an array. So why can't I put my array into the itemText property?
