So just another question as we are talking of
MANumberDescription
and as I'm playing with it :d What I'm triing to do is providing
instead of a text input component a List choice where there is a
collection of number between min and max according to a given
step... (10 20 30 40...). What would be the better ? creating a
MANumberListComponent that display the list... or adding
functionality in MANumberComponent...?
Yeah, create a new view such as MANumberComponent/MARangeComponent.
Also, I see that the default component for
MANumberComponent are
MAInputText and MARangeComponent but I cant really get how the
MARangeComponent is used (called when defining the
MANumberDescription).
is it: (MANumberDescription auto: ... label: ... priority..)
componentClass: MANumberDescription
defaultComponentClasses second; (is it how we acces it ??)
yourself.
I usually code directly the component class:
(MANumberDescription auto: ...)
componentClass: MARangeComponent;
yourself.
However, as I already mentioned in a previous mail, this imposes a
strong coupling between the description and the view (e.g., if you
have a model package with some descriptions and different view
packages that all want to specify their own view-components). I don't
know how we could solve that problem right now, so do it as you
suggested ;-)
I actually don't really understand how
MARangeComponent works, is
it for a javascript check ?
Yeah, that is a control displaying a slider. It is currently only
working in Safari and probably KHTML, because it builds on top of
proposal to extend HTML that is not in the standard yet. It should
however safely degenerate to a normal text-input if your browser
doesn't support it.
Lukas
--
Lukas Renggli
http://www.lukas-renggli.ch