MVP: How to handle mutually exclusive RadioButtons?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

MVP: How to handle mutually exclusive RadioButtons?

Christopher J. Demers
I have a model that contains an attribute that can be one of a few strings.
In our old program this was represented by a few mutually exclusive
RadioButtons.  Is there a proper way to do something similar in MVP?  I
would almost want to use some kind of ChoicePresenter, but I don't think
that would work with RadioButtons.  The only ways I can think of to work
with Radio buttons seem rather kludgey.

Any ideas?

BTW: RadioButtons still cause a lockup if used on a Dialog (unless they are
wrapped in a composite).  I mentioned this before, I am not sure if it
slipped through the cracks, or it just did not get dealt with yet.

Chris


Reply | Threaded
Open this post in threaded view
|

Re: How to handle mutually exclusive RadioButtons?

Ian Bartholomew
Chris,

> I have a model that contains an attribute that can be one of a few
strings.
> In our old program this was represented by a few mutually exclusive
> RadioButtons.  Is there a proper way to do something similar in MVP?  I
> would almost want to use some kind of ChoicePresenter, but I don't think
> that would work with RadioButtons.  The only ways I can think of to work
> with Radio buttons seem rather kludgey.

There's a goodie on my web site that provides a RadioButtonGroup. I've only
used it a couple of times but it seems to work as intended, removing a lot
of the overhead of maintaining a collection of individual buttons. It might
still come under the heading of "kludgy" though <g>

If nothing else it might give you some ideas.

Ian


Reply | Threaded
Open this post in threaded view
|

Re: How to handle mutually exclusive RadioButtons?

Blair McGlashan
In reply to this post by Christopher J. Demers
"Christopher J. Demers" <[hidden email]> wrote in
message news:9cnhoq$esr7f$[hidden email]...
> ....
> BTW: RadioButtons still cause a lockup if used on a Dialog (unless they
are
> wrapped in a composite).  I mentioned this before, I am not sure if it
> slipped through the cracks, or it just did not get dealt with yet.

It's in the Dolphin bugs DB as defect no. 102 as per your original report.
It is scheduled for fixing in the next minor/major release.

Regards

Blair


Reply | Threaded
Open this post in threaded view
|

Re: How to handle mutually exclusive RadioButtons?

Christopher J. Demers
In reply to this post by Ian Bartholomew
Ian Bartholomew <[hidden email]> wrote in message
news:ImPH6.22892$[hidden email]...
> Chris,
>
> There's a goodie on my web site that provides a RadioButtonGroup. I've
only
> used it a couple of times but it seems to work as intended, removing a lot
> of the overhead of maintaining a collection of individual buttons. It
might
> still come under the heading of "kludgy" though <g>

Thank you, it looks good.  A kludge someone else wrote is better than a
kludge that I have to write. ;)

One day I would like to see an improved "official" way built in Dolphin to
handle certain MVP situations.  There are a few UI situations that seem to
require a little more creativity in MVP than may be desired.

Chris