Is RubMethodEditingExample supposed to work?

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

Is RubMethodEditingExample supposed to work?

Stephan Eggermont-3
Is that supposed to be able to make changes to methods?

Stephan


Reply | Threaded
Open this post in threaded view
|

Re: Is RubMethodEditingExample supposed to work?

Nicolai Hess


2015-10-01 20:52 GMT+02:00 Stephan Eggermont <[hidden email]>:
Is that supposed to be able to make changes to methods?

Maybe it was supposed to work but isn't finished?
There is another example
RubPluggableTextMorphExample
That one can save changes.


 

Stephan



Reply | Threaded
Open this post in threaded view
|

Re: Is RubMethodEditingExample supposed to work?

Pharo Smalltalk Users mailing list
Hello,
 I think It was only to show how to use Rubric for text editing.
Alain
On 02 Oct 2015, at 08:27, Nicolai Hess <[hidden email]> wrote:



2015-10-01 20:52 GMT+02:00 Stephan Eggermont <[hidden email]>:
Is that supposed to be able to make changes to methods?

Maybe it was supposed to work but isn't finished?
There is another example
RubPluggableTextMorphExample
That one can save changes.


 

Stephan




Reply | Threaded
Open this post in threaded view
|

Re: Is RubMethodEditingExample supposed to work?

Stephan Eggermont-3
In reply to this post by Nicolai Hess
On 02-10-15 08:27, Nicolai Hess wrote:
> Maybe it was supposed to work but isn't finished?
> There is another example
> RubPluggableTextMorphExample
> That one can save changes.

Ah, then I'll take a look at that one

Stephan



Reply | Threaded
Open this post in threaded view
|

Re: Is RubMethodEditingExample supposed to work?

Stephan Eggermont-3
On 02-10-15 10:57, Stephan Eggermont wrote:
> On 02-10-15 08:27, Nicolai Hess wrote:
>> Maybe it was supposed to work but isn't finished?
>> There is another example
>> RubPluggableTextMorphExample
>> That one can save changes.
>
> Ah, then I'll take a look at that one

Couldn't make that one work in a Morph.
But I stole its #accept:notifying: and
made saving work. Next steps: updating on
system announcements and asking before
throwing away changes.

Stephan


Reply | Threaded
Open this post in threaded view
|

Re: Is RubMethodEditingExample supposed to work?

Thierry Goubier


2015-10-12 16:52 GMT+02:00 Stephan Eggermont <[hidden email]>:
On 02-10-15 10:57, Stephan Eggermont wrote:
On 02-10-15 08:27, Nicolai Hess wrote:
Maybe it was supposed to work but isn't finished?
There is another example
RubPluggableTextMorphExample
That one can save changes.

Ah, then I'll take a look at that one

Couldn't make that one work in a Morph.
But I stole its #accept:notifying: and
made saving work. Next steps: updating on
system announcements and asking before
throwing away changes.

for the system announcements, I believe you only need to follow MethodModified and MethodRemoved.

Once you get to it, the system announcements work really well except ClassModifiedClassDefinition.

Thierry


 


Stephan



Reply | Threaded
Open this post in threaded view
|

Re: Is RubMethodEditingExample supposed to work?

Stephan Eggermont-3
On 12-10-15 17:12, Thierry Goubier wrote:
> for the system announcements, I believe you only need to
> follow MethodModified and MethodRemoved.

Ah nice, that works. Just that deleting morphs directly when
reacting to the methodRemoved announcement tends to crash the image...
I've had to replace the last line in

CodePanel>>methodRemoved: anAnnouncement
   | allCards nonMetaMethodClass method |
       
   allCards := self submorphs flatCollect: [ :each | each submorphs].
   nonMetaMethodClass:=anAnnouncement methodClass.
   method := anAnnouncement method.
   allCards select: [ :aCard |
     (aCard selectedClass = nonMetaMethodClass) and: [
       aCard selector = method selector]]
   thenDo: [ :card | card delete ]

by
   thenDo: [ :card | WorldState addDeferredUIMessage: [ card delete ]]

Now you just need to load the newest GT-Spotter-AndreiChis.325 for it to
work in Pharo 5

Stephan