[comp.sys.next] Application switches

mrc@Tomobiki-Cho.CAC.Washington.EDU (Mark Crispin) (05/25/89)

     I just discovered that applications have a -Debug switch, that
seems to display all icons, windows, and panels in the primary .nib
file.  I stumbled upon this when I added defaults database processing
to my application and one of the defaults I was trying to add
was...you guessed it...something called "Debug"!

     OK, so now we have -Host and -Debug...I wonder what other magic
switches are built into applications.  I can't find any documentation
about this anyplace.  That doesn't mean it isn't documented, but since
there's no index for the NeXT manuals (grr!) it's pretty damn hard to
look.

Mark Crispin / 6158 Lariat Loop NE / Bainbridge Island, WA 98110-2020
mrc@CAC.Washington.EDU / MRC@WSMR-SIMTEL20.Army.Mil / (206) 842-2385
Atheist & Proud / 450cc Rebel pilot -- a step up from 250cc's!!!
tabesaserarenakerebanaranakattarashii...kisha no kisha ga kisha de kisha-shita
sumomo mo momo, momo mo momo, momo ni mo iroiro aru
uraniwa ni wa niwa, niwa ni wa niwa niwatori ga iru

dorner@pequod.cso.uiuc.edu (Steve Dorner) (05/25/89)

In article <2160@blake.acs.washington.edu> mrc@Tomobiki-Cho.CAC.Washington.EDU (Mark Crispin) writes:
>     OK, so now we have -Host and -Debug...I wonder what other magic
>switches are built into applications.

Last time someone wanted to know switches, someone from NeXT said:
"Applications are supposed to have Preferences panels so you don't
have to use dwrite," and "you can use dread to find out switches."

Leaving it as an exercise to the reader to reconcile the two statements :-),
I'd like to point out that precious few applications now have preferences
panels, and I also don't think the majority of applications write the
values of all their switches into the defaults database.

In the absence of real documentation and preferences panels, perhaps
some kind person at NeXT who has collected a large and interesting
defaults database could do a "dread -l" to the net, so we can see what
other interesting things exist.
-- 
Steve Dorner, U of Illinois Computing Services Office
Internet: s-dorner@uiuc.edu  UUCP: {convex,uunet}!uiucuxc!dorner
IfUMust:  (217) 244-1765

ali@polya.Stanford.EDU (Ali T. Ozer) (05/26/89)

In article <1116@garcon.cso.uiuc.edu> Steve Dorner writes:
>Last time someone wanted to know switches, someone from NeXT said:
>"Applications are supposed to have Preferences panels so you don't
>have to use dwrite," and "you can use dread to find out switches."
> ...
>In the absence of real documentation and preferences panels, perhaps
>some kind person at NeXT who has collected a large and interesting
>defaults database could do a "dread -l" to the net, so we can see what
>other interesting things exist.

Well, here are some of the defaults provided by some of the apps...
Beware that trying to dwrite funny values into these variables
might probably crash or confuse some apps. 

Edit, Shell, and most other apps that support setting of fonts support
the Font and FontSize defaults values. For instance, the following combo
works for demonstrations on a light valve:

dwrite Edit Font Courier-Bold
dwrite Edit FontSize 24

I don't think Edit, Shell, and Mail write out the font value when it's
changed within the program; however, you can set it as shown above.

Edit has plenty other defaults variables, all of which can be set through 
the Preferences panel. These include "WidthInChars," "HeightInChars,"
"IndentWidth," "TabWidth," "DeleteBackup," "AutoIndent," ...

Workspace Manager provides "LaunchThese," "IconsSnapTo," and "CoreLimit,"
along with several others to define the location and size of the initial 
browser window. I believe "CoreLimit" is the only one not settable
through the menus or panels; it allows your programs to dump core when
they crash. A useful setting might be:

dwrite Workspace CoreLimit 16000000

to allow for core files upto 16 Megs.

Some system wide defaults include the infamous "PublicWindowServer,"
"Printer," and "UnixExpert." These can be set by the Printer app or
Preferences. Preferences also has some of its own, such as "HideClock."
There are also some "NeXT1" defaults set by Preferences; these include
"AutoDimTime," "MouseButtonsTied," and "MouseHandedness."

Interface Builder provides four variables, all of which can be
set by the Preferences panel in the program. These are "ShowPalettes,"
"ShowBrowser," "ProjectMake," and "ProjectMain." These take 1/0 values
rather than YES/NO (which most other boolean variables use).

Webster's defaults variables include "ClosePictures," "ExactMatch," "FontSize,"
"FullWordIndex," "PrintPictures," "ShowPictures," "ThesaurusOpen," and
"DictionaryOpen." These can all be  set from within the application.
Librarian has "ContentFont," "ContentSize," "SummaryFont," "SummarySize,"
and "AutoOpen," again all settable through the Preferences panel in the
program.

All applications also have some other defaults variables whose values
are changed by the printer-related panels. These include "Margins,"
"PaperType," "Resolution," and "Printer." This latter one will override
the systemwide "Printer", I believe, to let an app use a different printer.

Hope this helps.

Ali Ozer, NeXT Developer Support
aozer@NeXT.com

ps. Oh, and there's one I'm fond of. BreakApp's "HighScore" instance 
    variable stores the high score. You can easily impress your friends with 
    a simple dwrite!

gore@eecs.nwu.edu (Jacob Gore) (05/26/89)

/ comp.sys.next / ali@polya.Stanford.EDU (Ali T. Ozer) / May 25, 1989 /
>Well, here are some of the defaults provided by some of the apps...

Does TechReport use such switches?  It's a pain having to reenter all that
configuration information every time it starts up.

Jacob Gore				Gore@EECS.NWU.Edu
Northwestern Univ., EECS Dept.		{oddjob,chinet,att}!nucsrl!gore

ali@polya.Stanford.EDU (Ali T. Ozer) (05/26/89)

In article <9472@polya.Stanford.EDU> I wrote:
>I don't think Edit, Shell, and Mail write out the font value when it's
>changed within the program; however, you can set it as shown above.

I'm wrong here; Edit does write out a default for Font & FontSize, but only
when you change it through the Preferences panel. Changing it through the
Font panel doesn't write new values out.

>Interface Builder provides four variables, all of which can be
>set by the Preferences panel in the program. These are "ShowPalettes,"
>"ShowBrowser," "ProjectMake," and "ProjectMain." 

Actually the last two are named "GenerateMainfile" and "GenerateMakefile" ---
not "ProjectMain" and "ProjectMake." There is a bug which prevents the 
GenerateMakefile value from being written out; so you'll have to set that
one by hand through dwrite.

Ali Ozer, NeXT Developer Support
aozer@NeXT.com

ali@polya.Stanford.EDU (Ali T. Ozer) (05/26/89)

In article <12670033@eecs.nwu.edu> gore@eecs.nwu.edu (Jacob Gore) writes:
>Does TechReport use such switches?  It's a pain having to reenter all that
>configuration information every time it starts up.

No, it doesn't. I will pass on the suggestion that it should.
Ali