@uidialog / @uiradio
Posted: Wed Nov 23, 2011 10:08 am
im trying to get the values from a table object (10 rows) to be selections in @uiradio. I understand I need a string there with options separated by a space. I tried using text.append, however when I am appending values from the table, i get like breaks in my string and I need only one like for @uiradio.
Below is the code:
!z=2
!a=1
text my_line
my_line.clear
for !a=1 to 10
table(10,1) my_categories
%category=(my_categories(!a,1))
scalar ret=@uiedit(%category, "Enter a name for your category",20)
my_categories(!a,1)=%category
my_line.append {%category}
if ret = -1 then
stop
else
next !a
endif
show my_categories
show my_line
while my_vars(!z,1)<>""
%var=my_vars(!z,1)
!selection = 1
string categoryPrompt="Choose the category"
!result = @uidialog("Caption", "Options", "Text",%var ,"Radio", !selection, categoryPrompt, my_line)
my_vars(!z,3)=!selection
if !result = -1 then
stop
else
!z=!z+1
endif
wend
Below is the code:
!z=2
!a=1
text my_line
my_line.clear
for !a=1 to 10
table(10,1) my_categories
%category=(my_categories(!a,1))
scalar ret=@uiedit(%category, "Enter a name for your category",20)
my_categories(!a,1)=%category
my_line.append {%category}
if ret = -1 then
stop
else
next !a
endif
show my_categories
show my_line
while my_vars(!z,1)<>""
%var=my_vars(!z,1)
!selection = 1
string categoryPrompt="Choose the category"
!result = @uidialog("Caption", "Options", "Text",%var ,"Radio", !selection, categoryPrompt, my_line)
my_vars(!z,3)=!selection
if !result = -1 then
stop
else
!z=!z+1
endif
wend