Re: Getting the name of the current user
Re: Getting the name of the current user
- Subject: Re: Getting the name of the current user
- From: Ondra Cada <email@hidden>
- Date: Fri, 31 Aug 2001 19:14:30 +0200
Serge,
I hope you don't mind my returning this to the list, since I feel this might
be interesting for others, too:
>
>>>>> Serge Meynard (SM) wrote at Fri, 31 Aug 2001 12:20:33 -0400:
SM> Actually, I tried Sherlock only after the search tools on Apple's
SM> documentation pages failed to find a match... Of course, searching for
SM> "NSUserName" returns the proper match, but "username" doesn't.
Well, that's a deficiency common to Sherlock and MTLibrarian both, alas:
none of them supports the literal search :(((
That's why I recommend, when all other fails, to try the plain old find:
it's slow and ugly, but never fails:
find -L <where> -name \*.html | xargs fgrep -il <what>
(you can omit the '-l' if you want to see the "line" -- in ASCII sense, not
in HTML sense -- shown)
Like:
80 /Mac_OS_X\> find -L Developer/Documentation/Cocoa/Reference
Developer/Documentation/ReleaseNotes -name \*.html | xargs fgrep -il
"username"
Developer/Documentation/Cocoa/Reference/Foundation/Java/Classes/NSSystem.html
Developer/Documentation/Cocoa/Reference/Foundation/ObjC_classic/Functions/FoundationFunctions.html
Developer/Documentation/Cocoa/Reference/Foundation/ObjC_classic/Classes/NSUserDefaults.html
81 /Mac_OS_X\>
SM> Anyway, being a Cocoa beginner, I had missed the "Functions" section in
SM> Foundation. Now that I know about it, I should be able to avoid bothering
SM> this list with similar questions...
It is *definitely* worth to search the complete docs, ie. complete
ObjC_classic folder, PLUS at the very least the Release Notes, and headers.
Some quite interesting things (toolbars, for example) are described just in
the RN. Sometimes, an information from headers did not make it into HTML yet.
MTLibrarian supports that quite intuitively (just place all the interesting
topics to its bookshelf and select them all); for 'find' you can prepare
shell scripts or aliases.
---
Ondra Cada
OCSoftware: email@hidden
http://www.ocs.cz
private email@hidden
http://www.ocs.cz/oc