Radio Group problems in Dialogs

Technical support and scripting issues

Moderators: Dorian (MJT support), JRL

Post Reply
adroege
Automation Wizard
Posts: 438
Joined: Tue Dec 07, 2004 7:39 pm

Radio Group problems in Dialogs

Post by adroege » Tue Feb 22, 2005 3:28 pm

Version 7.3.10.3e

I am having problems with the new radio group in dialogs. I followed the instructions on how to use them as best as I could, but something strange seems to be going on. When you run this sample code, initially the radio group displays properly. But when you click the "check all" or "uncheck all" buttons the radio group does not display properly anymore. Can you find any problems with how I am doing this? Or is this a bug?

Thanks.

Dialog>FinTests
Caption=Financial Tests Manager
Top=158
Width=1009
Left=0
Height=538
Label=Select Tests To Run,62,12
CheckBox=Test1,Test1,72,40,97,%Chk1%
CheckBox=Test1E,,144,40,17,%Test1ChkE%
CheckBox=Test2,Test2,72,72,97,%Chk2%
CheckBox=Test2E,,144,72,17,%Test2ChkE%
CheckBox=Test3,Test3,72,104,97,%Chk3%
CheckBox=Test3E,,144,104,17,%Test3ChkE%
CheckBox=Test4,Test4,72,136,97,%Chk4%
CheckBox=Test4E,,144,136,17,%Test4ChkE%
CheckBox=Test5,Test5,72,168,97,%Chk5%
CheckBox=Test5E,,144,168,17,%Test5ChkE%
CheckBox=Test6,Test6,72,200,97,%Chk6%
CheckBox=Test6E,,144,200,17,%Test6ChkE%
CheckBox=Test7,Test7,72,232,97,%Chk7%
CheckBox=Test7E,,144,232,17,%Test7ChkE%
CheckBox=Test8,Test8,72,264,97,%Chk8%
CheckBox=Test8E,,144,264,17,%Test8ChkE%
CheckBox=Test9,Test9,72,296,97,%Chk9%
CheckBox=Test9E,,144,296,17,%Test9ChkE%
CheckBox=Test10,Test10,72,328,97,%Chk10%
CheckBox=Test10E,,144,328,17,%Test10ChkE%
Button=Go,56,392,75,25,3
Button=Check All,384,392,75,25,5
Button=Un Check All,480,392,75,25,6
Button=Exit,152,392,75,25,2
CheckBox=LoopControl,Loop Selected Tests,816,368,145,False
Edit=LoopTimes,816,400,49,2
RadioGroup=LoopStop,Stop When,888,384,73,49,Error%CRLF%NoError,0
EndDialog>FinTests


Gosub>CheckAll

Label>ActionLoop
Let>GlobalError=0
Show>FinTests,button_click_result
If>button_click_result=5
Gosub>CheckAll
Endif

If>button_click_result=6
Gosub>UnCheckAll
Endif

If>button_click_result=2,myend
If>button_click_result=3,StartTests
Goto>ActionLoop

Label>StartTests
Label>myend

SRT>CheckAll
Let>j=0
Repeat>j
Let>j=j+1
Let>Chk%j%=True
Until>j,10
End>CheckAll

SRT>UnCheckAll
Let>k=0
Repeat>k
Let>k=k+1
Let>Chk%k%=False
Until>k,10
End>UnCheckAll

User avatar
support
Automation Wizard
Posts: 1450
Joined: Sat Oct 19, 2002 4:38 pm
Location: London
Contact:

Post by support » Tue Feb 22, 2005 4:30 pm

You need to reset the radio group. This may be a bug - you probably shouldn't have to - but for now, just add this line before the Show>FinTests,button_click_result line:

Let>FinTests.LoopStop=Error%CRLF%NoError

So you now have:

bla bla
Label>ActionLoop
Let>GlobalError=0
Let>FinTests.LoopStop=Error%CRLF%NoError
Show>FinTests,button_click_result
etc etc
MJT Net Support
[email protected]

adroege
Automation Wizard
Posts: 438
Joined: Tue Dec 07, 2004 7:39 pm

Fixed radiogroups not resetting properly on subsequent shows

Post by adroege » Tue Mar 01, 2005 10:14 pm

Thanks!

I see that you have now fixed this problem and included it in the latest
and greatest release.


Version 7.3.10.4 22/02/2005

Fixed View System Windows sometimes omitting last char
Fixed radiogroups not resetting properly on subsequent shows
When debugging SetFocus no longer finds the editor window

Mundekis
Newbie
Posts: 16
Joined: Fri Apr 18, 2003 10:15 pm

Radio Group Question

Post by Mundekis » Wed Apr 20, 2005 11:46 pm

RadioGroup=LoopStop,Stop When,888,384,73,49,Error%CRLF%NoError,0


What does the 0 at the end do? The help file suggest SelectedItem.

Name,Caption,Left,Top,Width,Height,Items,SelectedItem

I was thinking that I could change the default Selected item by changing that value. In Ver. 7.3.11.3

How do you change the selected Value on the fly?

Sample Script.

Dialog>Tests
Caption=Radio Test
Top=156
Width=303
Left=369
Height=109
RadioGroup=TestRadio,Tester,8,16,185,49,Radio Button 1%CRLF%Radio Button 2,1
Button=Go,216,8,75,25,3
EndDialog>Tests


Show>Tests

Label>ActionLoop
GetDialogAction>Tests,result
IF>result=3,Test1
Goto>ActionLoop

Label>Test1
Let>Message1=%Tests.TestRadio%
MessageModal>%Message1%
Label>End

Mundekis
Newbie
Posts: 16
Joined: Fri Apr 18, 2003 10:15 pm

Radio Group Problem

Post by Mundekis » Thu Apr 21, 2005 12:35 am

Ok! I'll post my own reply to this one. I figured out the Index item I just had to reread things, still a bit confussing. The "0" at the end of the RadioGroup still seems to have no effect if I change it to a "1". I can now get it to do what I want however.

Dialog>Tests
Caption=Radio Test
Top=156
Width=303
Left=369
Height=109
RadioGroup=TestRadio,Tester,8,16,185,49,Radio Button 1%CRLF%Radio Button 2,0
Button=Go,216,8,75,25,3
EndDialog>Tests


Show>Tests

Label>ActionLoop
GetDialogAction>Tests,result
IF>result=3,Test1
Goto>ActionLoop

Label>Test1
Let>Message1=%Tests.TestRadio%
MessageModal>%Message1%
Let>Tests.TestRadio.ItemIndex=1
ResetDialogAction>Tests
Goto>ActionLoop
Label>End

Post Reply
cron
Sign up to our newsletter for free automation tips, tricks & discounts