MathGroup Archive 2001

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

Search the Archive

notebook question

  • To: mathgroup at smc.vnet.net
  • Subject: [mg27543] notebook question
  • From: Tom De Vries <tdevries at shop.westworld.ca>
  • Date: Sat, 3 Mar 2001 03:40:28 -0500 (EST)
  • Sender: owner-wri-mathgroup at wolfram.com

Hello everyone,

I have a question that I hope someone can help with.

Suppose I create a notebook that I am going to write information to....

questions = NotebookCreate[]

I can then send "whatever" to this notebook....

NotebookWrite[questions,
 Cell[TextData[{"This is a test, ",
       Cell[BoxData[
           FormBox[SqrtBox[SuperscriptBox["x", "2"]], TraditionalForm]]]}],
   "Text"]]

I am working on a set of math lessons where the user will click on a button
and a math question will be generated and sent to a particular notebook that
will be created

The question is..... once the notebook "questions"  has been created.....
how can I either prevent this notebook from being closed by a "user" so I
know that it will be there to write to,   or, if the notebook gets closed,
be able to check for that and reopen it...?

I can do something like.....  (which works....)

If[NotebookInformation[questions] == $Failed, questions = NotebookCreate[]];

Where NotebookInformation returns $Failed if there is no "questions"
Notebook open 

I wonder if anyone else had some ideas about this....?

Sincerely,

Tom De Vries 



  • Prev by Date: Re: Troubles saving as *.m
  • Next by Date: Re: Troubles saving as *.m
  • Previous by thread: Re: Interpreting InputForm[]
  • Next by thread: Re: notebook question