Question
I generate a view as follow view: bd self call: (bd asComponent readonly: true ; addSwitch ; yourself) Now I would like to know how I could get a close button too that would invoke an answer method? Question 2. I have a description.... and I wanted to know how I can specify a default value. descriptionEditor ^ (MASingleOptionDescription selector: #editor label: 'Publisher' priority: 400) options: self editors; beSorted; yourself In fact I would like to select the value of the editor iv so I tried default: #editor But it does not work Stef _______________________________________________ SmallWiki, Magritte, Pier and Related Tools ... https://www.iam.unibe.ch/mailman/listinfo/smallwiki |
> I generate a view as follow
> > view: bd > > self call: (bd asComponent readonly: true ; addSwitch ; > yourself) > > Now I would like to know how I could get a close button too that > would invoke an answer method? Unfortunately the MASwitchDecoration doesn't allow custom buttons. You probably need to subclass it to get the desired functionality. > Question 2. > I have a description.... > and I wanted to know how I can specify a default value. > > descriptionEditor > > ^ (MASingleOptionDescription selector: #editor label: 'Publisher' > priority: 400) > options: self editors; > > beSorted; > yourself > > In fact I would like to select the value of the editor iv > so I tried default: #editor Then the symbol #editor is the default. As default you have to directly specify the object you want to use, e.g. default: self editors first Lukas -- Lukas Renggli http://www.lukas-renggli.ch _______________________________________________ SmallWiki, Magritte, Pier and Related Tools ... https://www.iam.unibe.ch/mailman/listinfo/smallwiki |
In reply to this post by stéphane ducasse-2
Quoting stéphane ducasse <[hidden email]>:
For question 1, I'm not certain, but I think there is a display generating function that is called to actually generate the seaside component; if so, you could probably override that method to call the super method, and then add a callback link that answers. For question 2, I've heard one way to do it, is to define your variable get/set methods using this sort of pattern myVar: aVar myVar = aVar myVar myVar isNil ifTrue: [myVar := 'Default Value']. ^myVar But I haven't tried this myself. Cheers, Warren Wilkinson > Question > > I generate a view as follow > > view: bd > > self call: (bd asComponent readonly: true ; addSwitch ; > yourself) > > Now I would like to know how I could get a close button too that > would invoke an answer method? > > > Question 2. > I have a description.... > and I wanted to know how I can specify a default value. > > descriptionEditor > > ^ (MASingleOptionDescription selector: #editor label: 'Publisher' > priority: 400) > options: self editors; > > beSorted; > yourself > > In fact I would like to select the value of the editor iv > so I tried default: #editor > > But it does not work > > Stef > > > _______________________________________________ > SmallWiki, Magritte, Pier and Related Tools ... > https://www.iam.unibe.ch/mailman/listinfo/smallwiki > _______________________________________________ SmallWiki, Magritte, Pier and Related Tools ... https://www.iam.unibe.ch/mailman/listinfo/smallwiki |
Free forum by Nabble | Edit this page |