--- Begin Message ---
Maybe you should use RubSmalltalkMethodEditorModel
(one have also RubSmalltalkScriptEditorModel).

Have a look at RubWorkspaceExample to see how it can be used.

Alain

> On 12 mai 2015, at 16:40, stepharo <[email protected]> wrote:
> 
> 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 :)
> 
> 



--- End Message ---

Reply via email to