Hi Tommaso,

thanks for the explanation! I did not mean to point fingers at you for 
complaining, I was just trying to figure out what the problem was. So thanks 
again for sharing.

This is indeed not yet possible, and it would be cool to have it working. 
However there is a workaround since you can take any Morph and embed it in a 
Spec UI. For example:

initializeWidgets
        | … textMorph … |
        [… do a lot of other stuff …]

        textMorph := LabelMorph newLabel:’asdf’.
        textMorph color: Color red.
        text :=  textMorph asSpecAdapter.

Voila, a label with red text.

--
Does this mail seem too brief? Sorry for that, I don’t mean to be rude! Please 
see http://emailcharter.org <http://emailcharter.org/> .

Johan Fabry   -   http://pleiad.cl/~jfabry <http://pleiad.cl/~jfabry>
PLEIAD and RyCh labs  -  Computer Science Department (DCC)  -  University of 
Chile

> On Jun 30, 2016, at 07:56, Tommaso Dal Sasso <tommaso.dalsa...@gmail.com 
> <mailto:tommaso.dalsa...@gmail.com>> wrote:
> 
> I was not complaining about Spec, just reporting my experience with the 
> various UI toolkits in Pharo as a relatively newbie to this area of Pharo.
> 
> Anyway, as I wrote in my first email, I had difficulties with Spec to go 
> beyond building a standard interface, especially in performing text 
> manipulation (font size) or coloring the background of a string, or 
> encapsulating pieces of text in frames. I tried to understand how to do that, 
> but there is very little documentation on the matter, and the main answer I 
> got was "be prepared to use Morphic".
> 
> Trying to understand how to access the properties of the elements I found 
> several comments like:
> 
> [talking about font size in Spec]
> On 03/10/15 09:24, stepharo wrote:
> > I think that this part has been completely forgotten by spec.
> > Normally the layout should take into account the size of the label and font
> > and I do not see why we could not specify the color and other attributes we 
> > want to have but we did not work on this point.
> > Now we will have to see that in the context of Brick skin.
> >
> > Stef
> 
> Don't get me wrong, I like Spec, it is just unclear to me if it wants to be 
> the default toolkit to build widgets in Pharo (in this case it should 
> probably access more properties of Morphic), or if wants to be completely 
> engine-agnostic, therefore preferring abstraction over expressiveness.
> 
> Tommaso
> 
> 

Reply via email to