I have been using Textpad 4.7 for many years, but this problem has appeared only recently.
Files matching the patterns in legitimate document classes (e.g. *.sql for SQL files) are opened using preferences for the default document class instead.
I have tried deinstalling/reinstalling Textpad, upgrading to Textpad 5 from Textpad 4, and deleting/recreating document class definitions. Nothing has any effect.
Is there another preference which I've somehow inadvertently changed which might cause this problem?
Document class not detected from file name
Moderators: AmigoJack, bbadmin, helios, MudGuard
-
ildarbyshire
- Posts: 2
- Joined: Thu Aug 20, 2009 11:00 am
- Location: Manchester UK
- Bob Hansen
- Posts: 1516
- Joined: Sun Mar 02, 2003 8:15 pm
- Location: Salem, NH
- Contact:
What are the exact steps you are takng to defne the sql class?
Also, remember this:
When making configuration changes I find it best to follow these steps, especially for any changes in Classes:
1. Close all other copies of TextPad.
2. Close all open documents, INCLUDING THE DEFAULT NEW BLANK DOCUMENT.
3. Make the changes you want: Configure/Preferences/......
4. Apply and OK your way out the configurations.
5. Close TextPad.
6. Open TextPad again, and your changes should be good.
Also, remember this:
When making configuration changes I find it best to follow these steps, especially for any changes in Classes:
1. Close all other copies of TextPad.
2. Close all open documents, INCLUDING THE DEFAULT NEW BLANK DOCUMENT.
3. Make the changes you want: Configure/Preferences/......
4. Apply and OK your way out the configurations.
5. Close TextPad.
6. Open TextPad again, and your changes should be good.
Hope this was helpful.............good luck,
Bob
Bob
-
ildarbyshire
- Posts: 2
- Joined: Thu Aug 20, 2009 11:00 am
- Location: Manchester UK
Thanks for your sound advice, but I'm talking about ANY document class. Even existing ones no longer work. And these are classes which have been there for a long time, in many cases the built-in classes defined automatically when Textpad is installed.
So I don't think the problem has to do with definition of document classes: they all look fine. It's to do with Textpad not picking the correct document class on the basis of the document's filename.
It's not a problem with the syntax files either. Even tab settings are not being correctly assigned. It is as if every document, regardless of its name, is associated with the "default" document class.
So I don't think the problem has to do with definition of document classes: they all look fine. It's to do with Textpad not picking the correct document class on the basis of the document's filename.
It's not a problem with the syntax files either. Even tab settings are not being correctly assigned. It is as if every document, regardless of its name, is associated with the "default" document class.
Syntax file
I am also having the same problem. I can manually select the syntax file to use once I have opened a file for editing, but the syntax highlighting does not automatically open. I have gone through all of the steps and it still does not work. It worked on version 4.7 before I upgraded. I am running on XP sp2.
The files in class for the Default document class are *.*, so that will pick up all files if they haven't already been applied to another document class.
Try going back to basics and follow the instructions for syntax highlighting below, as this includes adding file extensions to the correct document class:
In order to enable the syntax highlighting, you will need to implement the following procedure for each Document Class, as in the example below:
Click on:
1. Configure
2. Preferences
3. Plus sign next to Document Classes
4. Plus sign next to "Java"
5. Syntax
6. Check the "Enable syntax highlighting" box.
7. Under the heading "Syntax definition file" Select
"java.syn".
8. Click Apply / OK
Please ensure that *.java is a member of the Files in class as follows. If it is not there, then you will need to add it to the list, along with any other file extensions that you are using for Java files:
1. Configure
2. Preferences
3. Plus sign next to Document Classes
4. Click on Java (Not the plus sign next to it)
5. Under the heading "Files in class", make sure that *.java is in the list. If it is not there, then you will need to add it to the list, along with any other file extensions that you are using for Java files.
6.Click Apply / OK
New documents must be saved with the relevant extension, in order for the syntax highlighting to be activated.
I hope this helps.
Try going back to basics and follow the instructions for syntax highlighting below, as this includes adding file extensions to the correct document class:
In order to enable the syntax highlighting, you will need to implement the following procedure for each Document Class, as in the example below:
Click on:
1. Configure
2. Preferences
3. Plus sign next to Document Classes
4. Plus sign next to "Java"
5. Syntax
6. Check the "Enable syntax highlighting" box.
7. Under the heading "Syntax definition file" Select
"java.syn".
8. Click Apply / OK
Please ensure that *.java is a member of the Files in class as follows. If it is not there, then you will need to add it to the list, along with any other file extensions that you are using for Java files:
1. Configure
2. Preferences
3. Plus sign next to Document Classes
4. Click on Java (Not the plus sign next to it)
5. Under the heading "Files in class", make sure that *.java is in the list. If it is not there, then you will need to add it to the list, along with any other file extensions that you are using for Java files.
6.Click Apply / OK
New documents must be saved with the relevant extension, in order for the syntax highlighting to be activated.
I hope this helps.
Helios Software Solutions
Syntax highlighting problem solved
I found the solution:
In the "Text" document class there is an entry for "*" by itself for the files in the class. By deleting this one entry all of my syntax files now automatically highlight the source code properly!
In the "Text" document class there is an entry for "*" by itself for the files in the class. By deleting this one entry all of my syntax files now automatically highlight the source code properly!
Re: Syntax highlighting problem solved
Thank you for posting this! After a recent "upgrade" from the IT department I spent hours trying to get document classes to work before I discovered your post.godseyc1 wrote:In the "Text" document class there is an entry for "*" by itself for the files in the class. By deleting this one entry all of my syntax files now automatically highlight the source code properly!