Re: How to know a file is writeable?
Re: How to know a file is writeable?
- Subject: Re: How to know a file is writeable?
- From: Steve Bird <email@hidden>
- Date: Fri, 25 Feb 2005 11:18:47 -0500
On Feb 25, 2005, at 9:34 AM, John C. Daub wrote:
To give an example, let's say you're writing an application that does
file
system browsing. The user browses to some directory, and it's
reasonable to
use something like access() or the NSFileManager routines or the
kFSCatInfoUserAccess information to display a "slashed out pencil"
icon to
say you can't write to that directory. If the user explicitly tries to
copy
something into that directory via your app, you shouldn't just say no
but
should actually try the copy. Thus the success or failure of the copy
is
ultimately and properly determined by the file system.
--- I understand your thinking that it's possible the situation may
have changed between the time the icon was presented and the time the
operation was attempted, but I have to express something concerning
your advice.
One of my biggest peeves with Windows (and Windows programmers) is
their willingness (obsession?) with doing just what you said.
I just finished a session with ZoneAlarm which was most frustrating: It
allows me to select an item from a list then click an operator button
to operate on that item. But certain items are prohibited from having
that operation done - so what does it do? It puts up an error alert
saying "You can't do that".
To which my immediate question is: "Then why did you let me click on
the button? After all, you knew I couldn't do that before I did!"
I vaguely remember this being in the Human Interface Guidelines (back
when such things were respected), and it turns out to make easier
programming anyway. The buttons, menus, etc are always in a state
where actions that are impossible at the moment are not available.
Perhaps that fuels my frustration - hoping that Apple's 1986 HI
guidelines would apply to 2005's Windows programmers, but a good idea
is a good idea.
----------------------------------------------------------------
Steve Bird
Culverson Software - Elegant software that is a pleasure to use.
www.Culverson.com (toll free) 1-877-676-8175
_______________________________________________
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