From: John Fultz on
On Tue, 27 Jul 2010 07:53:11 -0400 (EDT), Nate Dudenhoeffer wrote:
> I am deploying several notebooks using player pro. Is there a way to
> prevent the user from getting the "Save Changes" dialog on exit? I want
> to
> ensure that every time a user opens the file it looks exactly the same.
>
> I suppose this could be accomplished by locking the file, but I also would
> like to avoid confusing the user with a save dialog.
>
> Thanks,
> Nate

You can set the Saveable->False option on the notebook (this can be done in the
Option Inspector). This brings up the dilemma of how you save a notebook once
you've done this, of course. You can still save it using File->Save As, or by
using the NotebookSave[] kernel command.

Sincerely,

John Fultz
jfultz(a)wolfram.com
User Interface Group
Wolfram Research, Inc.

From: Nate Dudenhoeffer on
Thanks for the response John.
The dilemma you mention of saving the notebook while still in development
brings to mind another question, which is somewhat off-topic.

I would like to be able to edit a file just before deployment using a script
outside of Mathematica. Perhaps an expression search in Workbench, or maybe
just using grep in a text editor. The option you mention would be nicely
applied with this method, I also might like to apply Editable->False in some
cases. I also often edit stylesheets in a text editor.

The problem with this is that then I get the error message about the file
being edited outside of Mathematica. Is there a way to prevent that error
dialog?

Thanks,
Nate

On Tue, Jul 27, 2010 at 10:44 AM, John Fultz <jfultz(a)wolfram.com> wrote:

> On Tue, 27 Jul 2010 07:53:11 -0400 (EDT), Nate Dudenhoeffer wrote:
> > I am deploying several notebooks using player pro. Is there a way to
> > prevent the user from getting the "Save Changes" dialog on exit? I want
> > to
> > ensure that every time a user opens the file it looks exactly the same.
> >
> > I suppose this could be accomplished by locking the file, but I also
> would
> > like to avoid confusing the user with a save dialog.
> >
> > Thanks,
> > Nate
>
> You can set the Saveable->False option on the notebook (this can be done in
> the
> Option Inspector). This brings up the dilemma of how you save a notebook
> once
> you've done this, of course. You can still save it using File->Save As, or
> by
> using the NotebookSave[] kernel command.
>
> Sincerely,
>
> John Fultz
> jfultz(a)wolfram.com
> User Interface Group
> Wolfram Research, Inc.
>

From: Nate Dudenhoeffer on
The issue I was running into with editing was the cache, and John's
suggestion of deleting this in the text editor worked for Mathematica, but
not for Player Pro.

It seems that if there is no cache Player Pro will not open the notebook.
Have others had the same experience, or is there another reason it will not
open?

Nate

On Wed, Jul 28, 2010 at 1:51 AM, John Fultz <jfultz(a)wolfram.com> wrote:

> If the file is open in Mathematica at the time that you're doing your
> external
> edits, then you should close it. Editing files in two different
> environments
> simultaneously is a recipe for disaster, regardless of what software you're
> doing it in.
>
> If you're not, then you're probably just running into the issue where
> you're
> invalidating the cache information. If you look at the top of the notebook
> file, you'll see some information embedded in Mathematica comments. Just
> delete
> these comments, and Mathematica will no longer try to validate the file
> cache.
>
> The reason for these comments and the cache are that, if they're in place,
> it
> can make reading the file seem considerably more efficient. Mathematica
> doesn't
> need the cache, but it will warn you if there's an inconsistency between
> the
> cache and the actual state of the file.
>
> Sincerely,
>
> John Fultz
> jfultz(a)wolfram.com
> User Interface Group
> Wolfram Research, Inc.
>
>
> On Tue, 27 Jul 2010 11:14:15 -0500, Nate Dudenhoeffer wrote:
> > Thanks for the response John.
> > The dilemma you mention of saving the notebook while still in development
> > brings to mind another question, which is somewhat off-topic.
> >
> > I would like to be able to edit a file just before deployment using a
> > script outside of Mathematica. Perhaps an expression search in
> > Workbench, or maybe just using grep in a text editor. The option you
> > mention would be nicely applied with this method, I also might like to
> > apply Editable->False in some cases. I also often edit stylesheets in a
> > text editor.
> >
> > The problem with this is that then I get the error message about the file
> > being edited outside of Mathematica. Is there a way to prevent that
> > error dialog?
> >
> > Thanks,
> > Nate
> >
> > On Tue, Jul 27, 2010 at 10:44 AM, John Fultz <jfultz(a)wolfram.com> wrote:
> >
> >>
> >> On Tue, 27 Jul 2010 07:53:11 -0400 (EDT), Nate Dudenhoeffer wrote:
> >>
> >>> I am deploying several notebooks using player pro. Is there a way to
> >> prevent the user from getting the "Save Changes" dialog on exit? I want
> >> to
> >> ensure that every time a user opens the file it looks exactly the same.
> >>
> >> I suppose this could be accomplished by locking the file, but I also
> >> would
> >> like to avoid confusing the user with a save dialog.
> >>
> >> Thanks,
> >> Nate
> >
> >
> >> You can set the Saveable->False option on the notebook (this can be
> >> done in the
> > Option Inspector). This brings up the dilemma of how you save a notebook
> > once
> > you've done this, of course. You can still save it using File->Save As,
> > or by
> > using the NotebookSave[] kernel command.
> >
> > Sincerely,
> >
> > John Fultz
> > jfultz(a)wolfram.com
> > User Interface Group
> > Wolfram Research, Inc.
>
>
>
From: Nate Dudenhoeffer on
Except if I have just set Saveavle->False, this proves difficult.

I have set the notebooks up so they are opened by clicking a button in an
introduction screen, which uses NotebookOpen[mynotebook.nb,
Saveable->False], which seems to wrok well.

I appreciate your suggestions, you have certainly helped me better
understand how mathematica handles notebooks.

Nate


On Sun, Aug 1, 2010 at 10:05 AM, John Fultz <jfultz(a)wolfram.com> wrote:

> After you make the edits, you should open and re-save them in Mathematica.
> Then
> they'll work in Player Pro.
>
> Sincerely,
>
> John Fultz
> jfultz(a)wolfram.com
> User Interface Group
> Wolfram Research, Inc.
>
>
> On Sat, 31 Jul 2010 19:38:33 -0500, Nate Dudenhoeffer wrote:
> > The issue I was running into with editing was the cache, and John's
> > suggestion of deleting this in the text editor worked for Mathematica,
> > but not for Player Pro.
> >
> > It seems that if there is no cache Player Pro will not open the notebook.
> > Have others had the same experience, or is there another reason it will
> > not open?
> >
> > Nate
> >
> > On Wed, Jul 28, 2010 at 1:51 AM, John Fultz <jfultz(a)wolfram.com> wrote:
> >
> > If the file is open in Mathematica at the time that you're doing your
> > external edits, then you should close it. Editing files in two different
> > environments simultaneously is a recipe for disaster, regardless of what
> > software you're doing it in.
> >
> > If you're not, then you're probably just running into the issue where
> > you're invalidating the cache information. If you look at the top of the
> > notebook file, you'll see some information embedded in Mathematica
> > comments. Just delete these comments, and Mathematica will no longer try
> > to validate the file cache.
> >
> > The reason for these comments and the cache are that, if they're in
> > place, it can make reading the file seem considerably more efficient.
> > Mathematica doesn't need the cache, but it will warn you if there's an
> > inconsistency between the cache and the actual state of the file.
> >
> >
> >> Sincerely,
> >>
> > John Fultz
> > jfultz(a)wolfram.com
> > User Interface Group
> > Wolfram Research, Inc.
> >
> >
> >> On Tue, 27 Jul 2010 11:14:15 -0500, Nate Dudenhoeffer wrote:
> >>
> >>
> >> Thanks for the response John. The dilemma you mention of saving the
> >> notebook while still in development brings to mind another question,
> >> which is somewhat off-topic.
> >>
> >> I would like to be able to edit a file just before deployment using a
> >> script outside of Mathematica. Perhaps an expression search in
> >> Workbench, or maybe just using grep in a text editor. The option you
> >> mention would be nicely applied with this method, I also might like to
> >> apply Editable->False in some cases. I also often edit stylesheets in a
> >> text editor.
> >>
> >> The problem with this is that then I get the error message about the
> >> file being edited outside of Mathematica. Is there a way to prevent
> >> that error dialog?
> >>
> >> Thanks,
> >> Nate
> >>
> >> On Tue, Jul 27, 2010 at 10:44 AM, John Fultz <jfultz(a)wolfram.com>
> wrote:
> >>
> >>>
> >>> On Tue, 27 Jul 2010 07:53:11 -0400 (EDT), Nate Dudenhoeffer wrote:
> >>>
> >>> I am deploying several notebooks using player pro. Is there a way to
> >>> prevent the user from getting the "Save Changes" dialog on exit? I
> >>> want to ensure that every time a user opens the file it looks exactly
> >>> the same.
> >>>
> >>> I suppose this could be accomplished by locking the file, but I also
> >>> would like to avoid confusing the user with a save dialog.
> >>>
> >>> Thanks,
> >>> Nate
> >>>
> >>
> >> You can set the Saveable->False option on the notebook (this can be done
> >> in the Option Inspector). This brings up the dilemma of how you save a
> >> notebook once you've done this, of course. You can still save it using
> >> File->Save As, or by using the NotebookSave[] kernel command.
> >>
> >> Sincerely,
> >>
> >> John Fultz
> >> jfultz(a)wolfram.com
> >> User Interface Group
> >> Wolfram Research, Inc.
>
>
>
From: Albert Retey on
Hi,

> The issue I was running into with editing was the cache, and John's
> suggestion of deleting this in the text editor worked for Mathematica, but
> not for Player Pro.
>
> It seems that if there is no cache Player Pro will not open the notebook.
> Have others had the same experience, or is there another reason it will not
> open?

Not 100% sure on this and the whole story might be more complicated, but
I think this is on purpose: valid cache information seems to be the way
that WRI tries to ensure that the Player will only open notebooks that
have been created with a genuine Mathematica...

hth,

albert