Radio buttons checked status not working

Got a problem you cannot solve? Try here.
Post Reply
Obliterator
Posts: 53
Joined: Fri May 01, 2009 11:54 am

Radio buttons checked status not working

Post by Obliterator »

I've made a custom dialog with 3 radio controls on it. These correctly bind to underlying script variables and I can detect them correctly in my code.

However, whilst the dialog is visible I want to enable/disable certain other controls on the dialog according to which radio button is selected. Specifically I want to enable an edit box and browse button when the third radio button is chosen.

I'm fairly sure I should be able to accomplish this using the object rules settings for the dialog. I added rules for each RadioButton.Checked proptery to set the various other control.Enabled to True/False but it doesn't work.

The problem is the radio buttons don't ever seem to be marked as 'Checked'. I've tried Checked = TRUE, Checked = True and Checked = 1. Am I missing something obvious?

Attached is a screenshot of my dialog and rule behaviours.
I can supply the form code or sample project if you wish.
I'm using IA9R2SP3 btw.

Thanks kindly.
Attachments
Screenshot of my dialog and rule behaviours
Screenshot of my dialog and rule behaviours
IA-RadioEnabled.png (103.82 KiB) Viewed 7817 times
giaviv
Posts: 2039
Joined: Fri Dec 17, 2010 1:39 pm

Re: Radio buttons checked status not working

Post by giaviv »

Hi,

The problem is that the Checked value of a radiobutton / checkbox only gets set when the dialog returns - it doesn't change during the time the dialog is displayed. What you are trying to do is not possible unfortunately.
Aviv Giladi
InstallAware Software

White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Product Guides - http://www.installaware.com/publication ... guides.htm
InstallAware Help -F1 anywhere in the InstallAware IDE
Obliterator
Posts: 53
Joined: Fri May 01, 2009 11:54 am

Re: Radio buttons checked status not working

Post by Obliterator »

Thanks for the quick response, but can we not consider that a bug specific to radio buttons?

Exactly the same logic is used with the checkbox control to enable/disable the next button on the license dialog.
Why should the same approach not apply to radio buttons? It seems to me the Checked property should be tied to the radio button in exactly the same way.

I use other control properties in the dialogs and they change correctly at runtime (for example the text property of an edit box).
What makes the radio button so special that it only signals/binds when the form is closed? :)
giaviv
Posts: 2039
Joined: Fri Dec 17, 2010 1:39 pm

Re: Radio buttons checked status not working

Post by giaviv »

The thing is that checkboxed stand for themselves, so when you check a checkbox you change the state of the "entire" control, whereas radiobuttons are interconnected so switching between them doesn't cause any event to trigger, but rather only when you return from the dialog does the variable gets set..
Aviv Giladi
InstallAware Software

White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Product Guides - http://www.installaware.com/publication ... guides.htm
InstallAware Help -F1 anywhere in the InstallAware IDE
Obliterator
Posts: 53
Joined: Fri May 01, 2009 11:54 am

Re: Radio buttons checked status not working

Post by Obliterator »

I'd replace my design with checkboxes, but I don't think its possible to add interaction logic to only permit one checkbox to be ticked at a time.
Radio buttons really do fit my design better, its just a shame I can't further enhance the UI as I wish. I hope you reconsider this in the future.

Personally I'd love to see this whole dialog area improved in a future version IA. The current rule based model is quite restrictive.
For example, it would be good to see a more event driven model available so I can respond to dialog events like onChanged, onClicked, etc.
I know buttons have a click event, but its restricted to pre-canned functionality. I'd like to be able to execute my own mini IA script upon the event.
This would allow me to provide really bespoke functionality upon a button click for example. Of course I appreciate this is far from trivial to implement!
Post Reply