Syntax Colors

General questions about using TextPad

Moderators: AmigoJack, bbadmin, helios, MudGuard

Post Reply
randomblink
Posts: 2
Joined: Mon Oct 13, 2003 4:39 pm
Location: Tulsa, Oklahoma, just this side of hell...
Contact:

Syntax Colors

Post by randomblink »

Ok.
I use a syntax file created for Neverwinter Nights scripting.
The language is a C++ derivative.
However, the Syntax file doesn't seem to 'FULLY' work.
It will highlight SOME of the (Keywords 1) words, but not all.
For instance, int gets highlighted, but object does not.
I don't understand what the problem is.

If someone could help it would be greatly appreciated.
Thanks.
That was a hell of a thing.
randomblink
Posts: 2
Joined: Mon Oct 13, 2003 4:39 pm
Location: Tulsa, Oklahoma, just this side of hell...
Contact:

I Figured It Out

Post by randomblink »

I used the CPP.SYN Syntax file to Open ALL my Neverwinter Nights scripts.
THEN...
I saved all the open files as a Workspace.
THEN...
I added in an OFFICIAL Neverwinter Nights Syntax File.
BUT...
The Workspace wouldn't use the Syntax File for Colors or anything else.
It turns out, your Workspace saves a Syntax Definition for each file WHEN IT IS OPENED...
So, I closed all the Neverwinter Files, Re-Opened them, and NOW they use the correct Syntax...

UGH!
I STILL love Textpad...
That was a hell of a thing.
User avatar
Bob Hansen
Posts: 1516
Joined: Sun Mar 02, 2003 8:15 pm
Location: Salem, NH
Contact:

Post by Bob Hansen »

Hello randomblink....

Do you think you can provide more details on this statement:
It turns out, your Workspace saves a Syntax Definition for each file WHEN IT IS OPENED...
Where are these Syntax definitions located? what are their names? :?:
===============================
I am also curious about:
The Workspace wouldn't use the Syntax File for Colors or anything else.
:? Perhaps you can save me from doing the following:

To my knowledge, colors are not part of the syntax files. They are located under Document Classes. I have created a syntax file for Macro Scheduler and added comment lines to reference the colors and fonts that I prefer tor Macro Scheduler, but they still need to be modified manually for the Macro Scheduler class. The syntax file just makes it a bit easier for me to have a simple common reference to the settings.

:idea: Here is an excerpt of a [COLORS] section I added to the Syntax file. Each line is actually commented out:
;[Colors]
;Bookmarks = Teal
;Brackets = Red
;Characters = Teal
;Comments = Navy Blue
;Comments2 = Grey
;Current Line = Teal
;Keywords1 = Green
;Keywords2 = Light Blue
;Keywords3 = Navy Blue
;Keywords4 = Red
;Keywords5 = Sea Green
;Keywords6 = Purple
;Left Margin = Teal
;Numbers = Violet
;Operators = Black
;Page Break = Grey
;Preprocessor Keywords = Bright Blue
;Selected Text(Focus) = White on Green
;Selected (No Focus) = Dark Green on Green
;Strings = green
;Text = Black
;URL = Bright Blue
;Visible Spaces = Red
;
;[Font]
;Comic Sans Serif, Bold, 10
Are you suggesting that you know a method that allows the syntax file to implement colors? :?:
Hope this was helpful.............good luck,
Bob
User avatar
MudGuard
Posts: 1295
Joined: Sun Mar 02, 2003 10:15 pm
Location: Munich, Germany
Contact:

Post by MudGuard »

Do you think you can provide more details on this statement:
Quote:
It turns out, your Workspace saves a Syntax Definition for each file WHEN IT IS OPENED...
Where are these Syntax definitions located? what are their names?
probably means: when you make changes to a syntax file, these changes are not applied to files already opened. You have to close and reopen the file...
The Workspace wouldn't use the Syntax File for Colors or anything else.
Same as above, changes in syntax files are applied only to files opened after the changes took place...
Post Reply