On Sep 4, 2011, at 11:54 PM, Alain Plantec wrote:

> On 04/09/2011 22:26, Stéphane Ducasse wrote:
>> Alain
>> 
>> it means that we should define shoutAboutToStyle: to certain places like 
>> inspector pane.
>> Isn't?
>> :)
>> 
> arrggh, I've tried and it exhibits a problem. see the end of the answer.
> 
> yes, you can do it with a shoutAboutToStyle:
> 
> something like:
> 
> Inspector>>shoutAboutToStyle: aPluggableTextMorph
>       ^ (aPluggableTextMorph getTextSelector = #contents) not
> 
> because an inspector is made of two text views.
> The one for the contents should not be styled.
> Only the one for coding should.
> 
> But this solution is not so good because the model is making an asumptions 
> about the view. It considers that the argument responds to #getTextSelector 
> and that #contents can be the value of the result.
> 
> Another solution should be to directly set the text editors as not styled 
> when the view is built.
> Regarding Inspector view, it is built by
> MorphicUIManager>>openInspector: asMorphOn: withLabel:
> Normally, sending #styled: to a PluggableTextMorph with true as argument set 
> it as styled.

right now the separation is bogus because to me a model should not refer to 
methods that cretae the UI. :)
anyway. we will see that later.
I do not like that Morphic UIMAnager define creation method of widgets

> I prefer this solution because of the  separation of concern between the 
> model and its view(s).
> But now that the default is "not styled", this solution is broken.
> Maybe we should re-introduce a 'styled' inst var and revise the #okToStyle 
> implementation.
> I open an issue.

:)

> 
> Alain
> 
> 
> 
> 


Reply via email to