Hello,
I looked in the mailing list archive but did not found an answer. Is there any way to have Smalltalk syntactic coloration in a TextModel without having to put efforts in it? I mean, if I do: TextModel new isForSmalltalkCode: true; text: (Collection>>#any) sourceCode; openWithSpec The text displayed is black. Thanks in advance, Julien |
2017-05-03 16:57 GMT+02:00 Julien Delplanque <[hidden email]>: Hello, Hi, you need to add aboutToStyle:true TextModel new isForSmalltalkCode: true; text: (Collection>>#anyOne) sourceCode; aboutToStyle: true; openWithSpec |
Thanks, it works.
Another question: Is it possible to manage the fact that the code displayed is a method? (ie not having the selector and instance variables causing the syntactic coloration to be red) Thanks in advance, Julien On 03/05/17 17:09, Nicolai Hess wrote: > 2017-05-03 16:57 GMT+02:00 Julien Delplanque <[hidden email]>: > >> Hello, >> >> I looked in the mailing list archive but did not found an answer. >> >> Is there any way to have Smalltalk syntactic coloration in a TextModel >> without having to put efforts in it? >> >> I mean, if I do: >> >> TextModel new >> isForSmalltalkCode: true; >> text: (Collection>>#any) sourceCode; >> openWithSpec >> >> The text displayed is black. >> >> Thanks in advance, >> >> Julien >> >> >> > Hi, > you need to add > aboutToStyle:true > > > > TextModel new > isForSmalltalkCode: true; > text: (Collection>>#anyOne) sourceCode; > aboutToStyle: true; > openWithSpec > |
2017-05-04 12:53 GMT+02:00 Julien Delplanque <[hidden email]>: Thanks, it works. Yes, setting the behavior (class of the method): TextModel new isForSmalltalkCode: true; text: (Collection>>#anyOne) sourceCode; aboutToStyle: true; behavior: (Collection>>#anyOne) methodClass; openWithSpec
|
In reply to this post by Nicolai Hess-3-2
On 03/05/17 17:09, Nicolai Hess wrote:
> you need to add > aboutToStyle:true That is an ahem, 'interesting' selector. Stephan |
In reply to this post by Nicolai Hess-3-2
Thanks, it works perfectly.
Julien On 04/05/17 13:11, Nicolai Hess wrote: > 2017-05-04 12:53 GMT+02:00 Julien Delplanque <[hidden email]>: > >> Thanks, it works. >> >> Another question: Is it possible to manage the fact that the >> code displayed is a method? (ie not having the selector and >> instance variables causing the syntactic coloration to be >> red) >> > Yes, setting the behavior (class of the method): > > TextModel new > isForSmalltalkCode: true; > text: (Collection>>#anyOne) sourceCode; > aboutToStyle: true; > behavior: (Collection>>#anyOne) methodClass; > openWithSpec > > >> Thanks in advance, >> >> Julien >> >> >> >> On 03/05/17 17:09, Nicolai Hess wrote: >> >>> 2017-05-03 16:57 GMT+02:00 Julien Delplanque <[hidden email]>: >>> >>> Hello, >>>> I looked in the mailing list archive but did not found an answer. >>>> >>>> Is there any way to have Smalltalk syntactic coloration in a TextModel >>>> without having to put efforts in it? >>>> >>>> I mean, if I do: >>>> >>>> TextModel new >>>> isForSmalltalkCode: true; >>>> text: (Collection>>#any) sourceCode; >>>> openWithSpec >>>> >>>> The text displayed is black. >>>> >>>> Thanks in advance, >>>> >>>> Julien >>>> >>>> >>>> >>>> Hi, >>> you need to add >>> aboutToStyle:true >>> >>> >>> >>> TextModel new >>> isForSmalltalkCode: true; >>> text: (Collection>>#anyOne) sourceCode; >>> aboutToStyle: true; >>> openWithSpec >>> >>> >> |
Free forum by Nabble | Edit this page |