Hi

we are trying with Franck Warlouzet to use Rubric in Nautilus
and we saw that getMenuSelector is missing.

on: aModel text: aGetTextSelector accept: aSetTextSelector readSelection: aReadSelectionSelector menu: aGetMenuSelector
    self getTextSelector: aGetTextSelector.
    self setTextSelector: aSetTextSelector.
    self getSelectionSelector: aReadSelectionSelector.
    "self getMenuSelector: aGetMenuSelector."
    self on: aModel


Alain

we are trying to adapt

buildCodePane

    sourceTextArea := self textMorphClass
                on: self
                text: #sourceCodeFrom:
                accept: #compileSource:notifying:
                readSelection: #contentsSelectionFrom:
                menu: #sourceCodeMenu:shifted:.

    sourceTextArea
        askBeforeDiscardingEdits: true;
        vResizing: #spaceFill;
        hResizing: #spaceFill;
        font: StandardFonts codeFont;
        spaceFillWeight: 3;
        on: #keyStroke send: #keyStroke:fromSourceCodeMorph: to: self.

    self setSourceCodeShorcutsTo: sourceTextArea.
    ^ sourceTextArea

to use Rubric

buildCodePane

    widget := RubScrolledTextMorph new.
    widget
        on: self
        text: #sourceCodeFrom:
        accept: #compileSource:notifying:
        readSelection: #contentsSelectionFrom:
        menu: #sourceCodeMenu:shifted:.
    widget
        beWrapped;
        beForSmalltalkCode;
        withLineNumbers;
        setText: self sourceCode;
        getTextSelector: #halt.
    ^ widget


And now we do not get how the widget can be notified when a new method is selected.

Alain :)


Reply via email to