Glamour and Magritte validation

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

Glamour and Magritte validation

François Tanguy
Hi,

I have built a Glamour browser that uses magritte descriptions.
The underlying data model is very simple. There are only integers to be displayed.

When I click the save button, I get some validation errors stating that the input entered in the text field is invalid.

If I deal with strings that is ok.

So I think that the input is not converted into integer and therefore magritte does not like it because an integer is expected but a string is provided.

Anybody already tried this use case ?

Francois
_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: Glamour and Magritte validation

Tudor Girba
Hi,

Could you provide the code?

Cheers,
Doru


On 18 Sep 2010, at 22:42, François Tanguy wrote:

> Hi,
>
> I have built a Glamour browser that uses magritte descriptions.
> The underlying data model is very simple. There are only integers to be displayed.
>
> When I click the save button, I get some validation errors stating that the input entered in the text field is invalid.
>
> If I deal with strings that is ok.
>
> So I think that the input is not converted into integer and therefore magritte does not like it because an integer is expected but a string is provided.
>
> Anybody already tried this use case ?
>
> Francois
> _______________________________________________
> Moose-dev mailing list
> [hidden email]
> https://www.iam.unibe.ch/mailman/listinfo/moose-dev

--
www.tudorgirba.com

"Problem solving should be focused on describing
the problem in a way that makes the solution obvious."





_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: Glamour and Magritte validation

François Tanguy
In reply to this post by François Tanguy
Hi,

I have a class Exercice holding 3 instance variables where I store integers.
Magritte descriptions are like follows:

descriptionNumberOfRepetitions
        ^ MANumberDescription new
        accessor: #numberOfRepetitions;
       label: 'Number of repetitions';
        priority: 100;
       yourself

And the Glamour piece of code using Magritte description.
        (browser transmit)
                from: #activities;
                to: #details;
                andShow: [ :a |
  a magritte
            title: 'Details';
                        description: #description].


The values are correctly displayed but when changing them, the validation fails. See the screenshot.




Regards,

Francois


_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev

=?windows-1252?Q?Capture_d=92=E9cran_2010-09-19_=E0_18.43.03.png?= (75K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Glamour and Magritte validation

Tudor Girba
Thanks for the report. I will take a look at that next week.

Doru


On 19 Sep 2010, at 18:46, François Tanguy wrote:

> Hi,
>
> I have a class Exercice holding 3 instance variables where I store integers.
> Magritte descriptions are like follows:
>
> descriptionNumberOfRepetitions
> ^ MANumberDescription new
>       accessor: #numberOfRepetitions;
>        label: 'Number of repetitions';
>       priority: 100;
>        yourself
>
> And the Glamour piece of code using Magritte description.
> (browser transmit)
> from: #activities;
> to: #details;
> andShow: [ :a |
>   a magritte
>     title: 'Details';
> description: #description].
>
>
> The values are correctly displayed but when changing them, the validation fails. See the screenshot.
>
> <Capture d’écran 2010-09-19 à 18.43.03.png>
>
> Regards,
>
> Francois
>
> _______________________________________________
> Moose-dev mailing list
> [hidden email]
> https://www.iam.unibe.ch/mailman/listinfo/moose-dev

--
www.tudorgirba.com

"What is more important: To be happy, or to make happy?"


_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev