Re: Permissions in an app bundle
Re: Permissions in an app bundle
- Subject: Re: Permissions in an app bundle
- From: Sherm Pendley <email@hidden>
- Date: Wed, 5 Jul 2006 13:15:06 -0400
On Jul 5, 2006, at 11:13 AM, Nir Soffer wrote:
Quoting Tage Borg <email@hidden>:
Let me just ask, in case you haven't considered this alternative:
Have you thought about letting your application copy the template
directory to an application support folder on first execution? This
way you can have drag and drop installation and also have (1) the
templates outside the bundle and (2) code already in place for
handling drag and drop installation of more templates. Drag and drop
uninstallation won't be there, of course, but still...
I considered this, and I see several problems:
1. If the user delete the template, the app will not work.
Why not? If the app is set up to recognize a missing template and
install it if needed, it could just as easily do that on the
hundredth run as the first. Deleting the template would then be an
easy way of resetting it to the default.
2. A user may not have permissions to copy to /Library, I will have
to handle
this by authorization or fallback to the user Library, then search
for templates
on both directories, handle the case where there are multiple
copies etc.
That's what users expect, that's what Apple's guidelines suggest, and
it's not as difficult to do as you imagine it might be. It's just
looping over a set of directories and checking each one in turn.
3. I leave junk on /Library or user Library folders when uninstalling
If that's a major concern, you could place your templates in a ~/
Documents/Stationery/MyApp/ directory - Most Mac users would
immediately recognize what stationery is.
The best solution seems to be to keep the template in the app
bundle. The
template is not visible to the user, and I don't need to support
more templates
installed by the user.
But you do need to support an editable template - and allowing users
to "reset" to a default template when (not if) their changes go awry
would be a Very Good Idea.
The simplest thing - no code required - is to make the template
writable in the
bundle.
Have you asked your users whether they agree it's simple? They'd have
to right-click on your .app bundle, choose "Show Package Contents",
and navigate an unfamiliar (to them) directory structure to find
Resources. Most non-geeky users are very reluctant to poke around
inside .app bundles.
Making something simpler for the programmer is *never* a good reason
to make it more difficult for end users.
sherm--
Cocoa programming in Perl: http://camelbones.sourceforge.net
Hire me! My resume: http://www.dot-app.org
_______________________________________________
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