Saving a document to a predefined location

  • Hi!

    I would like to offer the option to save a (NS)document to a fixed
    location. I.e. the user is free to chose the file name, but not the
    location.

    One option I see is to set the document as delegate to the NSSavePanel
    and have it reset the target directory each time the user changes it.
    That ought to work, but does not seem to be good UI. I'd rather forbid
    the change than reverse it.

    The other option is to write my own save panel. But then I'd have to
    handle quite some stuff myself that NSSavePanel ought to take care of.
    E.g. duplicate file names.

    Thoughts welcome...

    Best,
    Pierre
  • On Oct 26, 2007, at 1:54 PM, Pierre Bernard wrote:

    > I would like to offer the option to save a (NS)document to a fixed
    > location. I.e. the user is free to chose the file name, but not the
    > location.
    >
    > One option I see is to set the document as delegate to the
    > NSSavePanel and have it reset the target directory each time the
    > user changes it. That ought to work, but does not seem to be good
    > UI. I'd rather forbid the change than reverse it.
    >
    > The other option is to write my own save panel. But then I'd have
    > to handle quite some stuff myself that NSSavePanel ought to take
    > care of. E.g. duplicate file names.

    Even if you could prevent the user from changing the directory used
    by NSSaveDialog, it's still bad UI and will definitely feel broken.

    Dealing with duplicate file names is easy enough that I'm surprised
    you'd consider compromising the user-experience to avoid it.

    Writing your own save pane is the best option.

    _murat
  • On 27/10/2007, at 6:54 AM, Pierre Bernard wrote:

    > Hi!
    >
    > I would like to offer the option to save a (NS)document to a fixed
    > location. I.e. the user is free to chose the file name, but not the
    > location.
    >
    > One option I see is to set the document as delegate to the
    > NSSavePanel and have it reset the target directory each time the
    > user changes it. That ought to work, but does not seem to be good
    > UI. I'd rather forbid the change than reverse it.
    >
    > The other option is to write my own save panel. But then I'd have
    > to handle quite some stuff myself that NSSavePanel ought to take
    > care of. E.g. duplicate file names.
    >
    > Thoughts welcome...
    >
    > Best,
    > Pierre

    You could not bother with any sort of save panel and simply save the
    file to the location you want.  In my app, the user can save groups
    of settings to be reloaded.  The settings are saved as plists and I
    save them to the Application Support/myApp folder.  This way the user
    doesn't need to decide where to put the saved settings and navigate
    to them when he/she wants to reload them.

    Ron
  • What I am trying to save are document templates. There can be any
    number of those. They need to be named by the user.

    Pierre

    On Oct 27, 2007, at 12:19 AM, Ron Fleckner wrote:

    >
    > On 27/10/2007, at 6:54 AM, Pierre Bernard wrote:
    >
    >> Hi!
    >>
    >> I would like to offer the option to save a (NS)document to a fixed
    >> location. I.e. the user is free to chose the file name, but not
    >> the location.
    >>
    >> One option I see is to set the document as delegate to the
    >> NSSavePanel and have it reset the target directory each time the
    >> user changes it. That ought to work, but does not seem to be good
    >> UI. I'd rather forbid the change than reverse it.
    >>
    >> The other option is to write my own save panel. But then I'd have
    >> to handle quite some stuff myself that NSSavePanel ought to take
    >> care of. E.g. duplicate file names.
    >>
    >> Thoughts welcome...
    >>
    >> Best,
    >> Pierre
    >
    > You could not bother with any sort of save panel and simply save
    > the file to the location you want.  In my app, the user can save
    > groups of settings to be reloaded.  The settings are saved as
    > plists and I save them to the Application Support/myApp folder.
    > This way the user doesn't need to decide where to put the saved
    > settings and navigate to them when he/she wants to reload them.
    >
    > Ron

    - - -
    Houdah Software s. à r. l.
    http://www.houdah.com

    HoudahGeo: One-stop photo geocoding
    HoudahSpot: Powerful Spotlight frontend
  • But it IS a document, yes? Give the user a place to name the file
    (document template) and a button to save it, then save it to the
    desired location.  Of course, you'd need also UI to retrieve the
    template (or a fresh copy, perhaps).  I don't see why you'd
    particularly need an NSSavePanel.

    Ron

    On 27/10/2007, at 8:36 AM, Pierre Bernard wrote:

    > What I am trying to save are document templates. There can be any
    > number of those. They need to be named by the user.
    >
    > Pierre
    >
    >
    > On Oct 27, 2007, at 12:19 AM, Ron Fleckner wrote:
    >
    >>
    >> On 27/10/2007, at 6:54 AM, Pierre Bernard wrote:
    >>
    >>> Hi!
    >>>
    >>> I would like to offer the option to save a (NS)document to a
    >>> fixed location. I.e. the user is free to chose the file name, but
    >>> not the location.
    >>>
    >>> One option I see is to set the document as delegate to the
    >>> NSSavePanel and have it reset the target directory each time the
    >>> user changes it. That ought to work, but does not seem to be good
    >>> UI. I'd rather forbid the change than reverse it.
    >>>
    >>> The other option is to write my own save panel. But then I'd have
    >>> to handle quite some stuff myself that NSSavePanel ought to take
    >>> care of. E.g. duplicate file names.
    >>>
    >>> Thoughts welcome...
    >>>
    >>> Best,
    >>> Pierre
    >>
    >> You could not bother with any sort of save panel and simply save
    >> the file to the location you want.  In my app, the user can save
    >> groups of settings to be reloaded.  The settings are saved as
    >> plists and I save them to the Application Support/myApp folder.
    >> This way the user doesn't need to decide where to put the saved
    >> settings and navigate to them when he/she wants to reload them.
    >>
    >> Ron
    >
    > - - -
    > Houdah Software s. à r. l.
    > http://www.houdah.com
    >
    > HoudahGeo: One-stop photo geocoding
    > HoudahSpot: Powerful Spotlight frontend
    >
    >
previous month october 2007 next month
MTWTFSS
1 2 3 4 5 6 7
8 9 10 11 12 13 14
15 16 17 18 19 20 21
22 23 24 25 26 27 28
29 30 31        
Go to today