Assigning a class to a new document

General questions about using TextPad

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

Post Reply
Rich Hamilton

Assigning a class to a new document

Post by Rich Hamilton »

I can't seem to figure out how to get a new document to take on the properties of the desired class. Anyone have clues?
Roy Beatty

RE: Assigning a class to a new document

Post by Roy Beatty »

Rich,

I presume you've added the file extension to the appropriate document class.

To be able to view a file with that extension in TextPad by double-clicking on it from within Windows Explorer, you must also associate that file extension with TextPad: Configure > Preferences > Associated Files.

However your message specifically asks about a *new* document (created by File > New). I've not checked this, but I'd expect the new document to acquire its inheritance from the DEFAULT document class. So modify the Default class as needed for new documents.

I do not know of a way to bestow a non-default inheritance to a new document other than by actually saving it with the appropriate file extension.

HTH,

Roy
Rich Hamilton

RE: Assigning a class to a new document

Post by Rich Hamilton »

Thanks, but changing the default class would cause other problems.

Sometimes, I edit newsletter files (that become email messages) and I want word wrap with hard returns at 65 characters.

The other half of the time I'm editing computer code, and I don't want word wrap at all.

I set up a Newsletter class, for news*.txt files, but I can't seem to get it to apply to any new newsletters. Even if I start the newsletter with File -> Open and specify a new newsletter name, so that TextPad should know what class it should belong to.

And when I reopen a file, it retains the settings from the prior open.
Andreas

RE: Assigning a class to a new document

Post by Andreas »

Could it be that you also have a *.txt class?
Then the order in which the two classes appear in the list of document classes matters (a file is checked against the classes from bottom to top). And the order of appearances is (IIRC) alphabetical.

See previous thread
http://www.textpad.com/forum/read.php?f=1&i=271&t=199

Andreas
Post Reply