CodeMorph >> text should return an instance of Text but return a String

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

CodeMorph >> text should return an instance of Text but return a String

cdelaunay
In pharo 1.2, NewTextMorphTests>>#testFullMethodName raise an error. This error happen when calling:

   CodeMorph >> defaultStyledText
	| text attribute |
	text := self text.
	text addAttribute: ( self newTextColorAttribute: Color black ).
	^ text.

text is a string, and therefore it does not understand 'addAttribute'. The value return by 'text' depends on the value of the instance variable 'adapter'. adapter can have different values according the way we initialize the CodeMorph. One of them is:

  beFullMethodName 
	aspect := #selector.
	adapter := [:selector| target methodClass name , '.' , self selectorWithArguments ].  

The block return a String and I guess the right code should be 

    beFullMethodName 
	aspect := #selector.
	adapter := [:selector| (target methodClass name , '.' , self selectorWithArguments) asText ]

??.  

I opened an Issue: http://code.google.com/p/pharo/issues/detail?id=3031

_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Re: CodeMorph >> text should return an instance of Text but return a String

cdelaunay
I just saw that there is propositions to remove CodeMorph:


So maybe the best fix will be to remove all the tests related ? :)

2010/10/1 Cyrille Delaunay <[hidden email]>
In pharo 1.2, NewTextMorphTests>>#testFullMethodName raise an error. This error happen when calling:

   CodeMorph >> defaultStyledText
	| text attribute |
	text := self text.
	text addAttribute: ( self newTextColorAttribute: Color black ).
	^ text.

text is a string, and therefore it does not understand 'addAttribute'. The value return by 'text' depends on the value of the instance variable 'adapter'. adapter can have different values according the way we initialize the CodeMorph. One of them is:

  beFullMethodName 
	aspect := #selector.
	adapter := [:selector| target methodClass name , '.' , self selectorWithArguments ].  

The block return a String and I guess the right code should be 

    beFullMethodName 
	aspect := #selector.
	adapter := [:selector| (target methodClass name , '.' , self selectorWithArguments) asText ]

??.  

I opened an Issue: http://code.google.com/p/pharo/issues/detail?id=3031


_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Re: CodeMorph >> text should return an instance of Text but return a String

Fernando olivero-2
Yes, i've been busy so i couldn't finish this issue.

Because CodeMorph comes from Gaucho,  and until now there was no need for it in the Pharo-Core. so i will remove it, and possibly when the need arises will propose its re-inclusion.

Fernando
pd: the idea behind CodeMorph is to have a specialized NewTextMorph for dealing with Methods sources, Class definitions. But now i have second thoughts, because i have the impression that having diferent Editors ( subclasses of TextEditor or  SmalltalkEditor) should do the trick.

On Oct 1, 2010, at 12:02 PM, Cyrille Delaunay wrote:

I just saw that there is propositions to remove CodeMorph:


So maybe the best fix will be to remove all the tests related ? :)

2010/10/1 Cyrille Delaunay <[hidden email]>
In pharo 1.2, NewTextMorphTests>>#testFullMethodName raise an error. This error happen when calling:

   CodeMorph >> defaultStyledText
	| text attribute |
	text := self text.
	text addAttribute: ( self newTextColorAttribute: Color black ).
	^ text.

text is a string, and therefore it does not understand 'addAttribute'. The value return by 'text' depends on the value of the instance variable 'adapter'. adapter can have different values according the way we initialize the CodeMorph. One of them is:

  beFullMethodName 
	aspect := #selector.
	adapter := [:selector| target methodClass name , '.' , self selectorWithArguments ].  

The block return a String and I guess the right code should be 

    beFullMethodName 
	aspect := #selector.
	adapter := [:selector| (target methodClass name , '.' , self selectorWithArguments) asText ]

??.  

I opened an Issue: http://code.google.com/p/pharo/issues/detail?id=3031

<ATT00001..txt>


_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Re: CodeMorph >> text should return an instance of Text but return a String

Fernando olivero-2
ISSUE 2902: CodeMorph removal .

Done, added the change set and set the issue to fixed.


Fernando 

On Oct 1, 2010, at 12:58 PM, Fernando olivero wrote:

Yes, i've been busy so i couldn't finish this issue.

Because CodeMorph comes from Gaucho,  and until now there was no need for it in the Pharo-Core. so i will remove it, and possibly when the need arises will propose its re-inclusion.

Fernando
pd: the idea behind CodeMorph is to have a specialized NewTextMorph for dealing with Methods sources, Class definitions. But now i have second thoughts, because i have the impression that having diferent Editors ( subclasses of TextEditor or  SmalltalkEditor) should do the trick.

On Oct 1, 2010, at 12:02 PM, Cyrille Delaunay wrote:

I just saw that there is propositions to remove CodeMorph:


So maybe the best fix will be to remove all the tests related ? :)

2010/10/1 Cyrille Delaunay <[hidden email]>
In pharo 1.2, NewTextMorphTests>>#testFullMethodName raise an error. This error happen when calling:

   CodeMorph >> defaultStyledText
	| text attribute |
	text := self text.
	text addAttribute: ( self newTextColorAttribute: Color black ).
	^ text.

text is a string, and therefore it does not understand 'addAttribute'. The value return by 'text' depends on the value of the instance variable 'adapter'. adapter can have different values according the way we initialize the CodeMorph. One of them is:

  beFullMethodName 
	aspect := #selector.
	adapter := [:selector| target methodClass name , '.' , self selectorWithArguments ].  

The block return a String and I guess the right code should be 

    beFullMethodName 
	aspect := #selector.
	adapter := [:selector| (target methodClass name , '.' , self selectorWithArguments) asText ]

??.  

I opened an Issue: http://code.google.com/p/pharo/issues/detail?id=3031

<ATT00001..txt>

<ATT00001..txt>


_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Re: CodeMorph >> text should return an instance of Text but return a String

Stéphane Ducasse
In reply to this post by Fernando olivero-2
Excellent!


On Oct 4, 2010, at 11:10 AM, Fernando olivero wrote:

> ISSUE 2902: CodeMorph removal .
>
> Done, added the change set and set the issue to fixed.
>
>
> Fernando
>
> On Oct 1, 2010, at 12:58 PM, Fernando olivero wrote:
>
>> Yes, i've been busy so i couldn't finish this issue.
>>
>> Because CodeMorph comes from Gaucho,  and until now there was no need for it in the Pharo-Core. so i will remove it, and possibly when the need arises will propose its re-inclusion.
>>
>> Fernando
>> pd: the idea behind CodeMorph is to have a specialized NewTextMorph for dealing with Methods sources, Class definitions. But now i have second thoughts, because i have the impression that having diferent Editors ( subclasses of TextEditor or  SmalltalkEditor) should do the trick.
>>
>> On Oct 1, 2010, at 12:02 PM, Cyrille Delaunay wrote:
>>
>>> I just saw that there is propositions to remove CodeMorph:
>>>
>>> http://code.google.com/p/pharo/issues/detail?id=2902&q=CodeMorph&colspec=ID%20Type%20Status%20Summary%20Milestone%20Difficulty
>>>
>>> So maybe the best fix will be to remove all the tests related ? :)
>>>
>>> 2010/10/1 Cyrille Delaunay <[hidden email]>
>>> In pharo 1.2, NewTextMorphTests>>#testFullMethodName raise an error. This error happen when calling:
>>>
>>>    CodeMorph >> defaultStyledText
>>> | text attribute |
>>> text := self text.
>>> text addAttribute: ( self newTextColorAttribute: Color black ).
>>> ^ text.
>>>
>>> text is a string, and therefore it does not understand 'addAttribute'. The value return by 'text' depends on the value of the instance variable 'adapter'. adapter can have different values according the way we initialize the CodeMorph. One of them is:
>>>
>>>   beFullMethodName
>>> aspect := #selector.
>>> adapter := [:selector| target methodClass name , '.' , self selectorWithArguments ].  
>>>
>>> The block return a String and I guess the right code should be
>>>
>>>     beFullMethodName
>>> aspect := #selector.
>>> adapter := [:selector| (target methodClass name , '.' , self selectorWithArguments) asText ]
>>>
>>> ??.  
>>>
>>>
>>> I opened an Issue: http://code.google.com/p/pharo/issues/detail?id=3031
>>>
>>> <ATT00001..txt>
>>
>> <ATT00001..txt>
>
> _______________________________________________
> Pharo-project mailing list
> [hidden email]
> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project


_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project