mdixon@parc.xerox.com (Mike Dixon) (03/20/91)
(i posted an earlier version of this quite a while ago for 1.0; several people have asked if it can be made to work in 2.0, so...) if you've played around with dread/dwrite, you may start to wonder just what kind of hidden options some of the programs out there support. to find out *all* of the options a program checks for in the defaults database, try this: 1. start the program you're interested in under gdb (e.g. 'gdb /NextApps/Librarian.app/Librarian') 2. give gdb the following string of commands: (if you're still running 1.0, substitute '0x605d89e' for the magic number on the first line) break *0x500976a commands 1 silent printf "%s: ", *$a2 output {char *}(4+$a2) echo \n cont end run and you'll get a listing something like this: DoLaunchTiming: (char *) 0x0 HomeDirectory: (char *) 0x0 LaunchTime: (char *) 0x60bd16b "0 0" MachLaunch: (char *) 0x0 ServicesMenuTimings: (char *) 0x0 SavePanelTiming: (char *) 0x0 SavePanelDebug: (char *) 0x0 Uid: (char *) 0x0 UserName: (char *) 0x0 PBSName: (char *) 0x0 NPDName: (char *) 0x0 ProfileString: (char *) 0x0 BoldSystemFont: (char *) 0x60bd1e7 "Helvetica-Bold" ButtonDelay: (char *) 0x60bd202 "0.4" ButtonPeriod: (char *) 0x60bd213 "0.075" BrowserSpeed: (char *) 0x60bd226 "400" ... NXShowAllWindows: (char *) 0x0 NXShowPS: (char *) 0x0 NXTraceEvents: (char *) 0x0 NXFont: (char *) 0x60bd2d9 "Helvetica" NXFontSize: (char *) 0x60bd4b0 "12" NXFixedPitchFont: (char *) 0x60bd4c4 "Ohlfs" NXFixedPitchFontSize: (char *) 0x60bd4df "10" NXMallocDebug: (char *) 0x60bd4f0 "0" NXWordTablesFile: (char *) 0x0 NXNetTimeout: (char *) 0x60bd510 "60" NXOptimizeDrawing: (char *) 0x0 NXIsJournalable: (char *) 0x60bd34b "YES" NXWindowDepthLimit: (char *) 0x0 NXDebugLanguages: (char *) 0x0 _NXBypassNSC: (char *) 0x0 NXServiceLaunch: (char *) 0x0 DynamicServices: (char *) 0x28b84 "Yes" SplitviewDivider: (char *) 0x28b84 "Yes" note that: - the values listed are the "default defaults" (i.e. the value that will be used if there is no entry in the defaults database) - a lot of these options have nothing to do with Librarian; they're read by the Appkit for every program - this will launch the program; you'll probably want to quit it and then say 'quit' to gdb needless to say, you're on your own as far as guessing what some of these mean and finding out what happens when you set them to random values... -- .mike.