Radio Buttons and Tabs

Use this board to ask questions or have discussions with other Rich Displays users.
Post Reply
rmullis
Experienced User
Posts: 100
Joined: Tue Feb 21, 2012 1:24 pm
First Name: Robert
Last Name: Mullis
Company Name: WRC
State / Province: Georgia
Country: United States
Contact:

Radio Buttons and Tabs

Post by rmullis »

I have a screen with three tabs on it. On the third tab I have three groups of radio buttons. Each group represents a 1 character field and each button in the group represents a character value for the field. When I click on one of the radio buttons, I run the pui.click("btnOpen") that does some additional processing. When I click on a radio button, I can see it "highlight" and control is returned to my program by pui.click on the onclick event. When the screen returns, the radio button I just clicked on is no longer hightlighted. When I put my program in debug, I can see the value of the field that represents the radio group I just clicked on change to the appropriate value, but the screen does not show that when the program returns control.

Is this a bug in 4.1.4?
Scott Klement
Experienced User
Posts: 2711
Joined: Wed Aug 01, 2012 8:58 am
First Name: Scott
Last Name: Klement
Company Name: Profound Logic
City: Milwaukee
State / Province: Wisconsin

Re: Radio Buttons and Tabs

Post by Scott Klement »

I'm a bit confused. You say that you can see the proper value being returned to your program via debug. Then, you say the screen shows a different value when the program returns control.

Doesn't that mean that your program is changing it between the time the field is returned, and the time the program returns control to the handler?

Did this work on a previous release?
rmullis
Experienced User
Posts: 100
Joined: Tue Feb 21, 2012 1:24 pm
First Name: Robert
Last Name: Mullis
Company Name: WRC
State / Province: Georgia
Country: United States
Contact:

Re: Radio Buttons and Tabs

Post by rmullis »

I have a radio button group with 5 radio buttons with values of A, B, C, D, E. The buttons are grouped by a 1 character field called LABORTYPE. My program intializes field LABORTYPE to 'A' and then displays the screen. The radio button group appears to display correctly with the first button 'A' highlighted/selected. For example, I click on the button representing 'E'. Control is then returned to my program, because of a pui.click() on the onclick event on my radio button. When the program returns and redisplays the screen, the radio button I just clicked is not highlighted/selected. In fact, no radio button in the group is highlighted/selected. I have determined, through debug, that the field LABORTYPE has the correct value of 'E' and retains that value, until I click on a different radio button in the group. As a side note, I changed my program to initialize the LABORTYPE to a different value, D, but it still highlights/selects the 'A' radio button.

I have tried radio buttons in a limited test two or three releases back and they seemed to work. This is the first time I have tried to use them in production.

FYI, the example I just detailed above is on the third tab of a three tab panel.
rmullis
Experienced User
Posts: 100
Joined: Tue Feb 21, 2012 1:24 pm
First Name: Robert
Last Name: Mullis
Company Name: WRC
State / Province: Georgia
Country: United States
Contact:

Re: Radio Buttons and Tabs

Post by rmullis »

Additional Information:

Originally, the radio button in the group with a value of 'A', had a value of ' ' (blank). So when I initalized the LABORTYPE field to ' ' (blank), the radio button was highlighted/selected. In trying to solve this problem, I changed the ' ' (blank) for the radio button to a 'A'. So now when I initialize the LABORTYPE to 'A', NONE of the radio buttons is highlighted/selected, even though according to me program, the first radio button should be.
Scott Klement
Experienced User
Posts: 2711
Joined: Wed Aug 01, 2012 8:58 am
First Name: Scott
Last Name: Klement
Company Name: Profound Logic
City: Milwaukee
State / Province: Wisconsin

Re: Radio Buttons and Tabs

Post by Scott Klement »

I've been unable to reproduce this problem.

One thing I wasn't sure about -- when you say you run pui.click("btnOpen"), what is btnOpen? Is that the name of a button on your form?
rmullis
Experienced User
Posts: 100
Joined: Tue Feb 21, 2012 1:24 pm
First Name: Robert
Last Name: Mullis
Company Name: WRC
State / Province: Georgia
Country: United States
Contact:

Re: Radio Buttons and Tabs

Post by rmullis »

Yes, 'btnOpen" is a button on my form. It sets on an indicator when clicked and my program executes a section of code based upon that indicator being on.
rmullis
Experienced User
Posts: 100
Joined: Tue Feb 21, 2012 1:24 pm
First Name: Robert
Last Name: Mullis
Company Name: WRC
State / Province: Georgia
Country: United States
Contact:

Re: Radio Buttons and Tabs

Post by rmullis »

I have isolated the problem. LABORTYP field is defined as 1 character in length. I have 5 radio buttons in the group with the 1 character values of A, B, C, D, and E. At least that is what I entered into the value property of each radio button. It appears that the visual designer appended a blank on the end of each value. For example, I set the value of the first radio button to 'A', but the visual designer seems to have saved it as 'A '. When I went into the value of each button and removed the trailing blank and made the value truly 1 character, it worked correctly.

I say that the visual designer did this, because I do not remember entering that trailing blank. Although, I may have, because my memory is getting shorter in my old age.
Scott Klement
Experienced User
Posts: 2711
Joined: Wed Aug 01, 2012 8:58 am
First Name: Scott
Last Name: Klement
Company Name: Profound Logic
City: Milwaukee
State / Province: Wisconsin

Re: Radio Buttons and Tabs

Post by Scott Klement »

rmullis wrote:It appears that the visual designer appended a blank on the end of each value. For example, I set the value of the first radio button to 'A', but the visual designer seems to have saved it as 'A '. When I went into the value of each button and removed the trailing blank and made the value truly 1 character, it worked correctly.
Hmmm.. I coded up a sample app to try to reproduce the problem, and I didn't get an extra blank... if you can figure out how to reproduce the situation where the designer adds a blank, let me know, and I'll see if we can fix it.
rmullis wrote:I say that the visual designer did this, because I do not remember entering that trailing blank. Although, I may have, because my memory is getting shorter in my old age.
Believe me, I know the feeling very well!
Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests