Spec: why is title on the class side for a ComposableModel

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

Spec: why is title on the class side for a ComposableModel

philippeback
Why is the title of the ComposableModel on the class side?

That's annoying if I need multiple windows each having a different
title when I do an openWithSpec.

TIA
Phil

Reply | Threaded
Open this post in threaded view
|

Re: Spec: why is title on the class side for a ComposableModel

Benjamin Van Ryseghem (Pharo)
Title is defined on both side.

By default the instance side method points to the class side method.
But you can override the instance side method without any problem :)
(by example DualChangeSorterApplication redefine title according of the instance)


Ben

PS: if your title is dependent of the state of your model (by example

title

^ self selectedMethod selector

you can use 
self updateTitle

to update the title)

On Feb 18, 2013, at 10:18 PM, [hidden email] wrote:

Why is the title of the ComposableModel on the class side?

That's annoying if I need multiple windows each having a different
title when I do an openWithSpec.

TIA
Phil