Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2005
*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 2005

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

Search the Archive

opening groups under program control/ error handling

  • To: mathgroup at smc.vnet.net
  • Subject: [mg63165] opening groups under program control/ error handling
  • From: pdickof at scf.sk.ca
  • Date: Fri, 16 Dec 2005 07:22:20 -0500 (EST)
  • Sender: owner-wri-mathgroup at wolfram.com

When running a large notebook via Kernel->Evaluation->Evaluate
Notebook, it is convenient to leave the cells closed, hiding the
details... untill something goes wrong. I would like to be able to have
the notebook open its own cell groups and optionally stop further
execution when a condition occurs.

Let us say code is executing in a cell which is inside multiply-nested
cell groups and my code detects a problem. It calls my routine
openParentGroups[], and it opens all the parents/ancestor cell groups
of the current cell. An Abort[] can then be called.

Problems:

1) I can move around with (eg) SelectionMove[nb, Previous, CellGroup],
but I don't want Previous so much as Parent; no such direction
specification exists. Combinations of All and Previous do not seem
helpfull. How can I expand SelectionMove to effectively include
direction specification Parent?

2) Even when I have set the selection to a cell I wish to open, neither
of
FrontEndExecute[FrontEnd`SetOptions[NotebookSelection[nb], CellOpen ->
True]]
SetOptions[NotebookSelection[nb], CellOpen -> True]
seems to do anything. What Am I missing?

3) How could I attach this code to the built-in function Message, so
that my routine is invoked immediately after Mathematica issues a
message? I would also need to be able to unattach it.

Thanks in advance...

Peter Dickof


  • Prev by Date: New MathGL3d Add-On for Mathematica Available
  • Next by Date: Re: own package doesnt work correctly?
  • Previous by thread: Re: New MathGL3d Add-On for Mathematica Available
  • Next by thread: Re: own package doesnt work correctly?