Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!apple!bionet!arisia!roo!mdixon From: mdixon@parc.xerox.com (Mike Dixon) Newsgroups: comp.sys.next Subject: Re: How do you find all of an Apps possible defaults. Message-ID: Date: 13 Nov 90 21:58:18 GMT References: Sender: news@parc.xerox.com Organization: Xerox PARC, Palo Alto, CA Lines: 86 In-reply-to: declan@remus.rutgers.edu's message of 13 Nov 90 05:51:40 GMT > In particular, how do I find all of the possible defaults for something > like Workspace or Edit. "dread -l" will do the trick (next time, you might want to read the man pages first before posting a question to the net at large). actually, dread *won't* do the trick -- it only tells you what defaults are already set. if you want to find them all, try this: start the program you're interested in under gdb (e.g. 'gdb /NextApps/Librarian.app/Librarian') give gdb the following string of commands: break *0x605d89e commands 1 silent printf "%s: ", *$a2 output {char *}(4+$a2) echo \n cont end run this should give you something like the following: (the values given are the application defaults, i.e. what you'll get if there's nothing in your defaults database) Sort: (char *) 0x1a02c "Weight" SummaryFont: (char *) 0x1a134 "Helvetica" SummarySize: (char *) 0x1a234 "12" ContentFont: (char *) 0x1a1b4 "Helvetica" ContentSize: (char *) 0x1a2b4 "12" AutoOpen: (char *) 0x1a334 "YES" DoLaunchTiming: (char *) 0x0 HomeDirectory: (char *) 0x0 LaunchTime: (char *) 0x6006259 "0 0" MachLaunch: (char *) 0x0 SavePanelTiming: (char *) 0x0 Uid: (char *) 0x0 UserName: (char *) 0x0 BoldSystemFont: (char *) 0x60062d5 "Helvetica-Bold" BrowserSpeed: (char *) 0x60062f1 "50" Printer: (char *) 0x60062fc "Local_Printer" PrinterHost: (char *) 0x6006316 "" PrinterResolution: (char *) 0x6006329 "400" ScrollerButtonDelay: (char *) 0x6006341 "0.5" ScrollerButtonPeriod: (char *) 0x600635a "0.025" ScrollerKnobDelay: (char *) 0x6006372 "0.001" ScrollerKnobCount: (char *) 0x600638a "2" SystemFont: (char *) 0x6006397 "Helvetica" UnixExpert: (char *) 0x60063ac "NO" NXAutoLaunch: (char *) 0x60063ac "NO" NXCaseSensitiveBrowser: (char *) 0x0 NXHost: (char *) 0x0 NXMargins: (char *) 0x6006445 "72 72 90 90" NXMenuX: (char *) 0x6006459 "-1.0" NXMenuY: (char *) 0x6006466 "1000000.0" NXOpen: (char *) 0x0 NXOpenTemp: (char *) 0x0 NXPSName: (char *) 0x0 NXPaperType: (char *) 0x6006497 "Letter" NXShowAllWindows: (char *) 0x0 NXShowPS: (char *) 0x0 NXFont: (char *) 0x6006397 "Helvetica" NXFontSize: (char *) 0x60064ca "12" NXFixedPitchFont: (char *) 0x60064de "Ohlfs" NXFixedPitchFontSize: (char *) 0x60064f9 "10" NXMallocDebug: (char *) 0x600650a "32" (note that most of the preferences are loaded by appkit, and have nothing to do with librarian specifically.) this also starts the program running; you'll probably want to quit it, and then quit gdb (by typing 'quit'). by the way, the magic number in the first line is an address in the shared library (NXRegisterDefaults+70), and almost certainly will have to be changed to work under 2.0. have fun... .mike. -- .mike.