Default file type

General questions about using TextPad

Moderators: AmigoJack, bbadmin, helios, Bob Hansen, MudGuard

Post Reply
vr8ce
Posts: 25
Joined: Thu Dec 04, 2003 6:54 pm

Default file type

Post by vr8ce »

TP 7.0.7 on Win7 Ultimate SP1.

It appears that TP is not respecting the default file type.

I have the Default file type (and indeed every file type except Text) set to Unix. I have not modified the Text file type, so it has the default list of names and extensions.

When either starting Textpad with a non-existent filename on the command-line (a filename that does not meet the Text criteria for name or extension, e.g. abc.bcp), or when creating a new file (File/New or Ctrl-N) from within TP, it shows the new file as PC, rather than Unix.
vr8ce
Posts: 25
Joined: Thu Dec 04, 2003 6:54 pm

Post by vr8ce »

Admin? Can you confirm this? I work in a mixed environment, and this is causing all sorts of problems when I forget to change the type (which I usually do since I've never had to worry about it before).
User avatar
bbadmin
Site Admin
Posts: 878
Joined: Mon Feb 17, 2003 8:54 pm
Contact:

Post by bbadmin »

It works as expected for me. To test, I set "Create new files as Unix" for the Default and Text classes, and the default file extension to "txt". Starting TextPad from the command line, with parameter "junk.junk", created a file of that name with Unix line endings, and clicking New created a new document with Unix line endings.

Make sure that TextPad is picking up the correct configuration file when it starts. Unless you override it with command line parameters, it will use

C:\Users\login name\AppData\Roaming\Helios\TextPad\7\ConfigState.xml
vr8ce
Posts: 25
Joined: Thu Dec 04, 2003 6:54 pm

Post by vr8ce »

How do I check that? I'm certainly not specifying one on the command line. I deleted the 5.0 directory in that tree, just to make sure, but it made no difference.

I do know the program itself is showing the proper configuration, but not showing the proper behavior.

I have screenshots of the PC in the command line after typing "textpad junk.junk", and that shows the configuration of the Default file type (which shows Unix selected). I don't think they can be attached; I can see that we can put a URL in an img, but I don't have a place to upload them.[/img]
miked
Posts: 60
Joined: Tue Feb 27, 2007 11:17 am

Post by miked »

In Configure/Preferences/File, what do you have Default file extension set to? If it is set to .txt then you will see the behaviour you describe when creating a file with file/new.

If you leave it blank then new documents will use the default document class.

It doesn't explain why you get the problem starting from the command line though.
vr8ce
Posts: 25
Joined: Thu Dec 04, 2003 6:54 pm

Post by vr8ce »

Bingo! That worked both from the command line and when doing New from within TP.

For the record, that's … not obvious at best, odd at worst. If I run "textpad7 junk.junk", the file has an extension, that extension is not .txt, .junk is not one of the extensions in the Text class, so there's no reason, that I can see, that it should be defaulting to a .txt file. (The .txt does not get added to the file, i.e. when it's saved, it saved as junk.junk, not junk.junk.txt).

But, problem solved, so thanks very much!
miked
Posts: 60
Joined: Tue Feb 27, 2007 11:17 am

Post by miked »

Glad it worked.

I have to agree with you. I would have thought that the default file extension should only come into play with files that don't have an extension.
Post Reply