SystemWindow initial labelling from model

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

SystemWindow initial labelling from model

Daniel Lyons
A bit confused on this. You can define labelString on your model, pass
an instance to SystemWindow, and it doesn't get the label. Seems you
either have to send #label: to the SystemWindow instance or send
#update:#relabel to pick it up. Is this by design? Am I missing
something?

Thanks,

--
Daniel Lyons

Reply | Threaded
Open this post in threaded view
|

Re: SystemWindow initial labelling from model

Daniel Lyons
A curative is to insert the following line into SystemWindow>>model:

  (model respondsTo: #labelString) ifTrue: [ self setLabel: model labelString ].

Looks like everyone is just sending it manually though.

--
Daniel Lyons




Reply | Threaded
Open this post in threaded view
|

Re: SystemWindow initial labelling from model

Stéphane Ducasse
no this is a hack
we show use polymorphic object and avoid as much as possible respondsTo:

On May 18, 2012, at 6:20 AM, Daniel Lyons wrote:

> A curative is to insert the following line into SystemWindow>>model:
>
>  (model respondsTo: #labelString) ifTrue: [ self setLabel: model labelString ].
>
> Looks like everyone is just sending it manually though.
>
> --
> Daniel Lyons
>
>
>
>