Page 1 of 1

Temporarily associate doc to another doc class

Posted: Tue Apr 29, 2003 2:34 am
by jeffy
It is now possible to, effectively, create a temporary Document Class for the current document, by right clicking and selecting "Properties". However, having to manually set each property, each time the document is opened, is tedius.

Since document classes already exist, why not point the current document to one, temporarily overriding it's default Document Class, until the document is closed?

Here's a simple dialog that I envision to make this work:

Code: Select all

   Document name:  DemoClass.java

   Temporarily associate this document to
   the following Document Class:

   ------------------------------------------------
   |  Default Document class, based on extension:  |
   |  (o)  Java                  Alt+0             |
   ------------------------------------------------
   Other Document classes:
      ( )  HTML                  Alt+1
      (o)  Java                  Alt+2
      ( )  Perl                  Alt+3
      ( )  Text                  Alt+4
      ( )  TextPad Syntax        Alt+5

   *** This association will revert to the default  ***
   *** Document Class (based on extension) the next ***
   *** time the document is opened                  ***

          [OK]   [CANCEL]   [APPLY]   [HELP]
This association should be saved in the workspace.


There could be configurable key commands for these, like:
  • * DocClassDefault
    * DocClassOne
    * DocClassTwo
    * DocClassThree
    * DocClassFour
    * DocClassFive
    * ... maybe up to ten ...
These are based on alphabetical order, rather than associating directly to a Document Class name. This would allow Document classes to be edited/added/deleted, without affecting the key commands.

To make the key-command refer to the same document class, regardless of what the current document class is (in this example: Java), the default document class should always be in the alphabetical list, <i>as well</i> as the top, default item.


What if there are more than ten document classes? Which ones display in this dialog? There should be a "Display in properties dialog" dialog:

Code: Select all

   Display these Document classes in the Properties
   dialog box

   EXISTING CLASSES               CLASSES IN PROPERTIES
                                  DIALOG (up to ten)
   ------------------     ---     ------------------
   | Sql / PL/SQL |^|    | & |    | HTML         |^|
   | Cold Fusion  | |     ---     | Java         | |
   | Tmp 4 Print  | |             | Perl         | |
   | Default      | |     ---     | Text         | |
   |              |v|    | & |    | TextPad Synt |v|
   ------------------	  ---     ------------------
The intent of this suggestion is to allow for the creation of "specialized" Document Classes, for the purpose of temporarily associating to documents, without having to completely recreate it each time you want to use it. I would have one for "big reading font" and "tiny printing font", for example.

What do you think?

Posted: Tue Apr 29, 2003 6:57 am
by Thomas Schremser
Basically a good idea. I sometime miss such a feature too.

But why having two dialogs? I'd prefer just having one dialog which has a dropdown list with all my defined document classes. In addition the dialog could provide the 5 last used document classes in the form you intended.

Code: Select all

   Document name:  DemoClass.java 

   Temporarily associate this document to 
   the following Document Class: 

   +-----------------------------------------------+
   |  Default Document class, based on extension:  | 
   |  (o)  Java                  Alt+0             | 
   +-----------------------------------------------+
   Other Document classes: 
   +-------------------------------------------+---+
   | Standard                                  | u |
   +-------------------------------------------+---+
   Last used:
      ( )  HTML                  Alt+1 
      (o)  Java                  Alt+2 
      ( )  Perl                  Alt+3 
      ( )  Text                  Alt+4 
      ( )  TextPad Syntax        Alt+5 

   *** This association will revert to the default  *** 
   *** Document Class (based on extension) the next *** 
   *** time the document is opened                  *** 

          [OK]   [CANCEL]   [APPLY]   [HELP]