2015-07-05 13:06 GMT+02:00 Peter Uhnák <[email protected]>:
> The cleaner way would be to use TextEditor as default EditorClass in
>> TextModel "beForText" and SmalltalkEditor for "beForCode".
>> With that, the menublock coude ask the editor class for the default menu
>> (now it uses SmalltalkEditors menu as default)
>>
>
> That would work only if the TextModel would always have some EditorClass;
> so if you wanted your custom menu you would have to create a new
> EditorClass object.
>
No, I meant specs TextModels default menuBlock could call its editor menus:
menuHolder := [ :menu :shifted | shifted
ifTrue: [ self editor shiftedYellowButtonMenu ]
ifFalse: [ self editor yellowButtonMenu ] ] asValueHolder.
and if you want your own menu you can set menuHolder to a new value (like
we already do it now).
> While this in principle is ok, Spec already has block-based API so I would
> stick to it.
>