[Pharo-project] NewTextMorph authoringPrototype
Hi, I was looking for examples of how to use NewTextMorph, and I tried: NewTextMorph authoringPrototype However, it raises errors which seem to be related to an initialization problem. Am I doing something wrong, or is it simply a bug? Cheers, Doru -- www.tudorgirba.com "Not knowing how to do something is not an argument for how it cannot be done."
doru authoringPrototype looks to me like deprecated. and may be it was reintroduced when we loaded it back. Stef On Dec 11, 2010, at 6:26 PM, Tudor Girba wrote:
Hi,
I was looking for examples of how to use NewTextMorph, and I tried:
NewTextMorph authoringPrototype
However, it raises errors which seem to be related to an initialization problem. Am I doing something wrong, or is it simply a bug?
Cheers, Doru
-- www.tudorgirba.com
"Not knowing how to do something is not an argument for how it cannot be done."
Hi, Ok, but the problem appears also with a simple NewTextMorph: | t | t := NewTextMorph new. t openInWorld . Cheers, Doru On 11 Dec 2010, at 18:30, Stéphane Ducasse wrote:
doru authoringPrototype looks to me like deprecated. and may be it was reintroduced when we loaded it back.
Stef
On Dec 11, 2010, at 6:26 PM, Tudor Girba wrote:
Hi,
I was looking for examples of how to use NewTextMorph, and I tried:
NewTextMorph authoringPrototype
However, it raises errors which seem to be related to an initialization problem. Am I doing something wrong, or is it simply a bug?
Cheers, Doru
-- www.tudorgirba.com
"Not knowing how to do something is not an argument for how it cannot be done."
-- www.tudorgirba.com "Problem solving should be focused on describing the problem in a way that makes the solution obvious."
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. -- Best regards, Igor Stasenko AKA sig.
participants (3)
-
Igor Stasenko -
Stéphane Ducasse -
Tudor Girba