MathGroup Archive 2011

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

Search the Archive

Re: Is a conditional evaluation of sections of a notebook possible?


On Jun 23, 7:33 am, UweT <uwe.thuem... at googlemail.com> wrote:
> Heike indeed pointed in a good direction. For me the following worked:
>
> setEvaluatable[condition_] := (NotebookLocate["tag"];
>   If[condition==value,
>    SetOptions[NotebookSelection[], Evaluatable -> False,
>      Background -> LightRed];,
>    SetOptions[NotebookSelection[], Evaluatable -> True,
>      Background -> None];]);
>
> If condition==value is True all cells with tag "tag" are set to Evaluatable->False and the background color of these cells is changed to LightRed.  If condition==value is False, the cells with tag "tag" are set to Evaluatable->True and the background color of the cells is set to None.
>
> Best,
> Uwe

And for some tips on tagging, take a look at:

http://scientificarts.com/worklife/conference2008.html

--David


  • Prev by Date: what's in a name? (legal and conventional constructions of identifiers)
  • Next by Date: Re: RevolutionPlot3D Help
  • Previous by thread: Re: what's in a name? (legal and conventional constructions of identifiers)
  • Next by thread: Replacement rules for large matrixes