Re: Find the 'Application Support' folder
Re: Find the 'Application Support' folder
- Subject: Re: Find the 'Application Support' folder
- From: Greg Hurrell <email@hidden>
- Date: Mon, 18 Oct 2004 01:31:38 +0200
El 12/10/2004, a las 18:40, John Stiles escribió:
On Oct 12, 2004, at 9:21 AM, Charles Srstka wrote:
FSFindFolder works, but I have always wondered why Apple hasn't built
in a Cocoa API for accessing these folders. Having to go through
Carbon to do this is kind of annoying.
Yes, there are third-party categories that give this functionality,
but it really should be part of the default API.
I've never understood this attitude. I must be missing something,
because to me it feels elitist.
Nothing to do with elitism. Everything to do with code readability and
consistency.
A pageful of pure Objective-C method invocations is much easier to read
than the same slab interspersed with C-style function calls. Here's a
contrived example to show the contrast; personally I find the first
version much easier to read:
// version 1: nothing but Objective-C selectors:
[[[instance method1] method2] method3];
// version 2: Objective-C selectors mixed in with C-style function
calls:
result1 = [instance method1];
thing result2;
FunctionCall(result1, &result2);
if (result2)
[result2 method3];
For that reason, if I generally write wrappers for any such function
calls, if it's likely that I'll use them often. That way all the
procedural/functional ugliness is encapsulated away, out of sight.
Cheers,
Greg
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden