[Clam-devel] doubts about genderchange prototype

Hernán Ordiales h at ordia.com.ar
Thu Jun 21 14:26:40 PDT 2007


Now solved, I was doing it correctly but the problem was another:
default value. Before was '0' ('female') and now because the bounds is
'0.5' that means 'true' or 'male' (limits now are '0' and '1' and
because that '0.5' is default now, btw this point is related with one
of my questions) and because that remains backwards in the default
designer config and bad behavior at first (common tests, ;-)) when you
run it with prototyper.

So, i changed the female button to
"InControlBool__SMSGenderChange_0__Control" as before and updated the
default checked value (to male) in qtdesigner, now works.

thanks,

On 6/21/07, Hernán Ordiales <h at ordia.com.ar> wrote:
> On 6/21/07, Pau Arumi <parumi at iua.upf.edu> wrote:
> > En/na Hernán Ordiales ha escrit:
> [snip]
> > We must leave this as is now.
> > The InControl__ prefix means automatically map slider with control
> > bounds.
> > On the other hand InControlInteger__ means sending the slider
> > values (configurable though designer properties), InControlFloat__
> > does some odd mapping (slider value/100), and InControlBool__
> > receives 0 or 1 depending on widget.troggled()
> >
> > You can see how it works here:
> >
> > NetworkEditor/src/prototyper/PrototypeLoader.cxx
> > NetworkEditor/src/prototyper/QtSlot2Control.cxx
>
> yes, i already tried as you says, but seems no works, anyway i'll
> check those examples
>
>
> > > another doubt:
> > >
> > > i supposed that with something like this:
> > >
> > >         bool ConcreteConfigure( const ProcessingConfig& config )
> > >         {
> > >             mControl.SetBounds(0,1);
> > >             mControl.DoControl(0);
> > >             return true;
> > >         }
> > >
> > > I set the limits and also set-up the default value to the control, but
> > > isn't, default value is always the mean value between min and max.
> > >
> > > how can i solve it?
> >
> > If I understand well, there is no real problem --i mean, it works--
> > because we are not using mControl.GetDefault(). Or do we?
>
> yes, works :-)
>
> > But you are right, the default of such a control is not the mean.
> > My idea was adding some control.SetDefault(val) interface when some
> > functionality really needs it --which, if I'm not wrong, is not the
> > case.
>
> ah, ok, but i was asking because for example networks with
> robotization processing used to have zero as default value. And now is
> different and all examples starts with some amount of it.
>
> --
> Hernán
> http://h.ordia.com.ar
> GnuPG: 0xEE8A3FE9
>


-- 
Hernán
http://h.ordia.com.ar
GnuPG: 0xEE8A3FE9
-------------- next part --------------
A non-text attachment was scrubbed...
Name: genderchangeprototype.patch
Type: text/x-diff
Size: 2125 bytes
Desc: not available
URL: <http://lists.clam-project.org/pipermail/clam-devel-clam-project.org/attachments/20070621/50a85d5d/attachment-0003.patch>


More information about the clam-devel mailing list