[Newbies] Omnibrowser, italic Traits' method names

Juraj Kubelka Juraj.Kubelka at gmail.com
Sat Jun 23 17:53:50 UTC 2007


Hello Robert,

It is a standard OB filter subclassed from OBFilter.  It is added to  
OBCodeBrowser metagraph. There are source codes in attachment.

Best regards,
Juraj


-------------- next part --------------
A non-text attachment was scrubbed...
Name: OBTraitColorFilter.st
Type: application/octet-stream
Size: 942 bytes
Desc: not available
Url : http://lists.squeakfoundation.org/pipermail/beginners/attachments/20070623/b4165932/OBTraitColorFilter.obj
-------------- next part --------------
A non-text attachment was scrubbed...
Name: OBCodeBrowser class-buildMetagraphOnclasscommentmetaclass.st
Type: application/octet-stream
Size: 1364 bytes
Desc: not available
Url : http://lists.squeakfoundation.org/pipermail/beginners/attachments/20070623/b4165932/OBCodeBrowserclass-buildMetagraphOnclasscommentmetaclass.obj
-------------- next part --------------

On 23.6.2007, at 19:34, Robert Krahn wrote:

> 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
>
> _______________________________________________
> Beginners mailing list
> Beginners at lists.squeakfoundation.org
> http://lists.squeakfoundation.org/mailman/listinfo/beginners



More information about the Beginners mailing list