Compiler syntaxColorAt: won't work anymore in D6

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

Compiler syntaxColorAt: won't work anymore in D6

Fernando Rodríguez
Hi,

I'm starting to play aoround with my new copy of D6, and I have a script
that set's all my preferences for an image. This includes removing the italics
for comments:

Compiler syntaxColorAt: #Comment put: '\cf4'.

It doesn't work anymore.  What's the correct way to do this in D6?

Thaks


Reply | Threaded
Open this post in threaded view
|

Re: Compiler syntaxColorAt: won't work anymore in D6

Chris Uppal-3
Fernando,

> I'm starting to play aoround with my new copy of D6, and I have a script
> that set's all my preferences for an image. This includes removing the
> italics for comments:
>
> Compiler syntaxColorAt: #Comment put: '\cf4'.
>
> It doesn't work anymore.  What's the correct way to do this in D6?

There is now a GUI for setting syntax colors.  It's in the user preferences
under Workspace/textStyles.  (Or right-click on the big workspace icon in the
system folder).

Programatic access to the same is via the same aspect of SmalltalkWorkspace.
E.g. I use:

    SmalltalkWorkspace textStyles
        do: [:each | each isBold: false; isItalic: false].

to turn off bold and italic in all the available categories.

    -- chris


Reply | Threaded
Open this post in threaded view
|

Re: Compiler syntaxColorAt: won't work anymore in D6

Ian Bartholomew-21
> Programatic access to the same is via the same aspect of SmalltalkWorkspace.
> E.g. I use:
>
>     SmalltalkWorkspace textStyles
>         do: [:each | each isBold: false; isItalic: false].
>
> to turn off bold and italic in all the available categories.

and if you want to change a specific element you have to search for it
by name.  As in

styles := SmalltalkWorkspace textStyles.
comment := styles detect: [:each | each name = #comment].
comment forecolor: Color blue.
comment isItalic: false.

--
Ian

Use the Reply-To address to contact me (limited validity).
Mail sent to the From address is ignored.


Reply | Threaded
Open this post in threaded view
|

Re: Compiler syntaxColorAt: won't work anymore in D6

Bruno Brasesco
In reply to this post by Fernando Rodríguez
Fernando Rodríguez escribió:

>
> Hi,
>
> I'm starting to play aoround with my new copy of D6, and I have a script
> that set's all my preferences for an image. This includes removing the
> italics for comments:
>
> Compiler syntaxColorAt: #Comment put: '\cf4'.
>
> It doesn't work anymore.  What's the correct way to do this in D6?
>
> Thaks
>
>

Go to:

User Preferences >> Workspace >> textStyles

Regards Bruno