[Pharo-project] CodeMorph >> text should return an instance of Text but return a String

Fernando olivero fernando.olivero at usi.ch
Mon Oct 4 05:09:58 EDT 2010


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 <cy.delaunay at gmail.com>
>> 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>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.pharo.org/pipermail/pharo-dev_lists.pharo.org/attachments/20101004/7b3893a0/attachment-0001.html>


More information about the Pharo-dev mailing list