done & committed Cheers Alain
On 14 May 2015, at 12:06, Alain Plantec <alain.plantec@yahoo.com> wrote:
ahh, good remark :) the menu stuff is not finished. I do it now thanks Alain
On 13 May 2015, at 18:09, Franck Warlouzet <franck.warlouzet@hotmail.fr <mailto:franck.warlouzet@hotmail.fr>> wrote:
Hi alain
thanks a lot! This helps us a lot. We got nearly something working. We will produce a list of methods and changes we had to do. see in the attached cs.
Now
lookupMenu "default implementation of the algorithm that lookup the menu"
| default | default := [ self editingMode menu ]. ^ self model ifNil: [ default value ] ifNotNil: [ :m | m menu ifNil: [ default value ] ]
We add a new method in nautilus that creates a menu as follow because m is our NautilusModel
menu ^ self sourceCodeMenu: MenuMorph new shifted: false.
But I was wondering why m menu does not take into account the information we passed when we created the rubPluggable
sourceTextArea := self textMorphClass on: self text: #sourceCodeFrom: accept: #compileSource:notifying: readSelection: #contentsSelectionFrom: menu: #sourceCodeMenu:shifted:.
I see that RubEditingArea has a policy but we could find how we can improve RubPluggable to use the menu:
To: pharo-dev@lists.pharo.org <mailto:pharo-dev@lists.pharo.org> From: pharo-dev@lists.pharo.org <mailto:pharo-dev@lists.pharo.org> CC: alain.plantec@yahoo.com <mailto:alain.plantec@yahoo.com> Subject: Re: [Pharo-dev] Trying to use Rubric in Nautilus .... Date: Wed, 13 May 2015 07:26:15 -0700
--Pièce jointe du message transmise-- Subject: Re: [Pharo-dev] Trying to use Rubric in Nautilus .... From: alain.plantec@yahoo.com <mailto:alain.plantec@yahoo.com> Date: Wed, 13 May 2015 16:25:34 +0200 To: pharo-dev@lists.pharo.org <mailto:pharo-dev@lists.pharo.org>
see Rubric-AlainPlantec.196 in the Rubric repo.
Iâve added RubPluggableTextMorph and RubPluggableTextMorphExample. Need to be polished certainly but it should facilitate the integration of Rubric in Nautilus.
cheers Alain
On 12 May 2015, at 22:45, stepharo <stepharo@free.fr <mailto:stepharo@free.fr>> wrote:
For fun I put the following trace in
sourceCodeFrom: aTextMorph Transcript show: '.'. ^ self sourceCode
And in general this method is invoked three times instead of one :)
Before asking we read all the examples and I saw that selector: is used to communicate and update the code pane.
(UIManager default newAutoAcceptTextEntryFor: self get: #selector set: #selector: class: String getEnabled: #haveClassName help: 'Enter a selector' translated entryCompletion: entryCompletion) acceptOnCR: false; ghostText: 'Selector'; withDropListButton;
I think this is only for the drop down list.
What I meant is that I could use set: and pass the selector to be invoked by the dropdown when the drop down is selected. And it will notify self with the selector: selector. So we could sepcify any selector (ie I can register to the drop box and say call me once you are set).
In RubMethodEditingExample>>#selector: it calls the update explicit self updateCodeWith: (cls sourceCodeAt: selector) and updateCodeWith: sets the text on the text model.
Now my problem (and may be there is not solution) is how can I connect from a pluggableListMorph to a RubScrollText when the list does not generate announcement. This is why I tried to pass via dependents or something like that.
I will try to generate announcements but this is a lot more work and I do not know if it will work.
Stef
<glueRubNautilus.2.cs>