Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
1999
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 1999

[Date Index] [Thread Index] [Author Index]

Search the Archive

NotebookSave[] Bugs

  • To: mathgroup at smc.vnet.net
  • Subject: [mg20268] NotebookSave[] Bugs
  • From: Murphy <werner.schuster at netway.at>
  • Date: Sun, 10 Oct 1999 01:27:27 -0400
  • Sender: owner-wri-mathgroup at wolfram.com

yo MathGroup,

I have a serious problem with the NotebookSave[] Functions;
I am using Mathematica 3.0;

Anytime I call them, I get a "Why the beep", telling me that there was some 
problem with the Notebook & that I should close the file & open it using 
OpenSpecial;
the function seems to destroy the notebook, cause some cells turn white, 
like they were not there;
it even crashes mathematica completely (I have to kill it via Taskmanager)

this behaviour is reproducable and not only appearing on my Mathematica 
installation, because I have already sent the following code to a 
mathematica expert, he ran the code and told me tha he had'nt seen anything 
like it before;
---
Module[{nb=InputNotebook[],nb1},
		
	NotebookSave[nb];
	NotebookSave[nb, "MurphyABC"];
	NotebookClose[nb];
	nb1 = NotebookOpen["MurphyABC"];
		
	NotebookFind[nb1,"CellTagName", All, CellTags];
	NotebookDelete[nb1];
---
the problem is that Mathematica only gets til the NotebookSave[] functions, 
and the shows the behaviour I described above;

what I want to do with the code is to:
- somehow produce a copy of a notebook
- find all cells with a certain cell-tag in the copy
- delete all the cells with the cell-tag

a previous attempt was to get the copy using this code:
---
Module[{nb=InputNotebook[],nb1},
nb1=NotebookPut[NotebookGet[nb]];
NotebookFind[nb1,"CellTagName", All, CellTags];
NotebookDelete[nb1];
---

the notebook to copy is about 900 KB;
the problem with this code is that it takes about 126 seconds on my PC (100 
MHZ, 24 MB RAM, NT4.0);
even on a 200 MHZ Pentium with 64 MB RAM, this code still takes 25 seconds, 
which is still way too slow;
the bottle neck is the NotebookGet/-Put functions; the finding & deleting 
of the cells takes (on my PC) about 4 seconds;


my questions are:

-	does anybody know a way to copy a notebook in memory (like 	with 
NotebookPut/-Get)?
AND/OR
- 	does anybody know a workaround for the NotebookSave bugs?


I hope you understand the babbling above and can help me;
Thanx in advance

murphee
***************************************
UNITE FOR JAVA -> www.javalobby.org
Check this out -> www.jos.org
My site -> www.angelfire.com/co/werners
***************************************
... and the fact, that i haven't put a gun to my mouth yet,
proves that i'm a winner!
Al Bundy


  • Prev by Date: Re: Finding lengths of identical sequences in lists
  • Next by Date: Re: Replacing Part of a Matrix
  • Previous by thread: Re: Timing[] and AbsoluteTime[].
  • Next by thread: Re: NotebookSave[] Bugs