Hello,
I have folllowing the exercises of Magritte (http://www.lukas-renggli.ch/smalltalk/magritte) but I can't set the default value of nationality field. Here my code:
descriptionNationality ^ (MASingleOptionDescription auto: 'nationality' label: 'Nationality' priority: 55) options: #( 'France' 'England' 'Switzerland' 'Span' ); default: 'Switzerland'; beSorted; yourself
Somthing strange is that I have 2 selected option blanck. I have try to do this with Title option and it work.:
descriptionTitle ^ (MASingleOptionDescription auto: 'title' label: 'Title' priority: 10) options: #( 'Mr.' 'Mrs.' 'Ms.' 'Miss.' ); default: 'Mrs'; yourself.
If somone know what is going wrong :-\ ...
Thanks.
Mathieu
you should register to the maggrite smallwiki pier mailing-list this way lukas will reply to you. looks for Smallwiki@iam.unibe.ch
Stef
On 28 mai 06, at 02:51, math wrote:
Hello,
I have folllowing the exercises of Magritte (http://www.lukas-renggli.ch/smalltalk/magritte) but I can't set the default value of nationality field. Here my code:
descriptionNationality ^ (MASingleOptionDescription auto: 'nationality' label: 'Nationality' priority: 55) options: #( 'France' 'England' 'Switzerland' 'Span' ); default: 'Switzerland'; beSorted; yourself
Somthing strange is that I have 2 selected option blanck. I have try to do this with Title option and it work.:
descriptionTitle ^ (MASingleOptionDescription auto: 'title' label: 'Title' priority: 10) options: #( 'Mr.' 'Mrs.' 'Ms.' 'Miss.' ); default: 'Mrs'; yourself.
If somone know what is going wrong :-\ ...
Thanks. _______________________________________________ Beginners mailing list Beginners@lists.squeakfoundation.org http://lists.squeakfoundation.org/mailman/listinfo/beginners
you should register to the maggrite smallwiki pier mailing-list this way lukas will reply to you. looks for Smallwiki@iam.unibe.ch
Yes, this would be easier ;-)
I have folllowing the exercises of Magritte (http://www.lukas-renggli.ch/smalltalk/magritte) but I can't set the default value of nationality field. Here my code:
descriptionNationality ^ (MASingleOptionDescription auto: 'nationality' label: 'Nationality' priority: 55) options: #( 'France' 'England' 'Switzerland' 'Span' ); default: 'Switzerland'; beSorted; yourself
Somthing strange is that I have 2 selected option blanck. I have try to do this with Title option and it work.:
descriptionTitle ^ (MASingleOptionDescription auto: 'title' label: 'Title' priority: 10) options: #( 'Mr.' 'Mrs.' 'Ms.' 'Miss.' ); default: 'Mrs'; yourself.
This works for me. I create a new class Tester with those two descriptions on the class side and tried in Seaside:
TesterTask>>go | t | t := Tester new. [ self call: (t asComponent addValidatedForm; yourself) ] repeat
1. For the 'title' nothing is selected, because the default value is not in the list of options.
2. For the 'nationality' Switzerland is selected.
How does your model code looks like? Is it already initialized with something other than nil? Maybe you should give a little more context (a file-out) so that your problem can be tackled ;-)
Cheers, Lukas
beginners@lists.squeakfoundation.org