[Newbies] Omnibrowser, italic Traits' method names

Robert Krahn robert.krahn at student.hpi.uni-potsdam.de
Sat Jun 23 17:34:31 UTC 2007


Hello Juraj,

 From where do you call #displayString:forNode: ?


Am 23.06.2007 um 19:11 schrieb Juraj Kubelka:

> Hello Robert,
>
> Thank you!
>
> I am playing with OB and I tried to make a filter which should  
> display Traits' names with bold text.  But it doesn't work.  It  
> displays prefix '(t) ' but nothing more. I have no idea where is  
> the mistake.  Do you have any idea?  I can file out the filter  
> class, if you wish.
>
> displayString: aString forNode: aNode
> 	(aNode isKindOf: OBClassNode) ifFalse: [^ aString].
> 	^ ((aNode theClass respondsTo: #isTrait) and: [ aNode theClass  
> isTrait ])
> 		ifTrue: [('(t) ', aString) asText addAttribute: TextEmphasis bold ]
> 		ifFalse: ['(c) ', aString].
>
>
> Thank you in advance,
> Juraj
>
> On 23.6.2007, at 18:32, Robert Krahn wrote:
>
>> Hello Juraj,
>>
>> the code you are looking for is in OBMethodNode>>displayString.  
>> There the text attribute TextEmphasis italic is added when the  
>> selector belongs to a trait (= is not local)
>>
>> Regards
>> Robert
>>
>> Am 23.06.2007 um 17:29 schrieb Juraj Kubelka:
>>
>>> Hi All,
>>>
>>> May I ask you, how is it done that Traits' method names are  
>>> displayed in italic?  I cannot find a code which do this.
>>>
>>> Thank you in advance,
>>> Juraj
>>>
>>> _______________________________________________
>>> Beginners mailing list
>>> Beginners at lists.squeakfoundation.org
>>> http://lists.squeakfoundation.org/mailman/listinfo/beginners
>>
>> _______________________________________________
>> Beginners mailing list
>> Beginners at lists.squeakfoundation.org
>> http://lists.squeakfoundation.org/mailman/listinfo/beginners
>
> _______________________________________________
> Beginners mailing list
> Beginners at lists.squeakfoundation.org
> http://lists.squeakfoundation.org/mailman/listinfo/beginners



More information about the Beginners mailing list