Issue 3402 in pharo: SmalltalkEditor new raises an Error

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

Issue 3402 in pharo: SmalltalkEditor new raises an Error

pharo
Status: Accepted
Owner: stephane.ducasse
Labels: Milestone-1.2

New issue 3402 by stephane.ducasse: SmalltalkEditor new raises an Error
http://code.google.com/p/pharo/issues/detail?id=3402

SmalltalkEditor new


Reply | Threaded
Open this post in threaded view
|

Re: Issue 3402 in pharo: SmalltalkEditor new raises an Error

pharo

Comment #1 on issue 3402 by stephane.ducasse: SmalltalkEditor new raises an  
Error
http://code.google.com/p/pharo/issues/detail?id=3402

The #changeParagraph: is bogus:

changeParagraph: aParagraph
        "Install aParagraph as the one to be edited by the receiver."

        self resetState

TextEditor>>paragraph is following:
paragraph
        ^ morph
                ifNotNil: [morph paragraph]


I changed the TextEditor, for creating and initializing it not like:
TextEditor new
but like:
TextEditor newForMorph: morph

in that way, TextEditor>>paragraph always works.
And for same reason, i removed the #changeParagraph: ,
because it useless.

Also, the following test is now should be rewritten:

CompilerEvaluationTest>>testEvaluationOfSelfSend
SmalltalkEditorTest >> testCompilationOfUndefinedVar

they using old SmalltalkEditor new, instead of (newForMorph:)
as well as using #changeParagraph:

So, creating SmalltalkEditor can be done like:

morph := NewTextMorph new.
morph paragraph: paragraph.
editor := SmalltalkEditor newForMorph: morph.



Reply | Threaded
Open this post in threaded view
|

Re: Issue 3402 in pharo: SmalltalkEditor new raises an Error

pharo

Comment #2 on issue 3402 by stephane.ducasse: SmalltalkEditor new raises an  
Error
http://code.google.com/p/pharo/issues/detail?id=3402

(No comment was entered for this change.)

Attachments:
        NewTextMorph-TextEditor-fixes.1.cs  1.6 KB


Reply | Threaded
Open this post in threaded view
|

Re: Issue 3402 in pharo: SmalltalkEditor new raises an Error

pharo
Updates:
        Status: Fixed

Comment #3 on issue 3402 by marcus.denker: SmalltalkEditor new raises an  
Error
http://code.google.com/p/pharo/issues/detail?id=3402

(No comment was entered for this change.)


Reply | Threaded
Open this post in threaded view
|

Re: Issue 3402 in pharo: SmalltalkEditor new raises an Error

pharo
Updates:
        Status: Closed

Comment #4 on issue 3402 by marcus.denker: SmalltalkEditor new raises an  
Error
http://code.google.com/p/pharo/issues/detail?id=3402

12277