Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.soft-sys.math.mathematica > #3253 > unrolled thread

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

Started byUweT <uwe.thuemmel@googlemail.com>
First post2011-06-23 11:33 +0000
Last post2011-06-24 11:45 +0000
Articles 2 — 2 participants

Back to article view | Back to comp.soft-sys.math.mathematica


Contents

  Aw: Re: Is a conditional evaluation of sections of a notebook possible? UweT <uwe.thuemmel@googlemail.com> - 2011-06-23 11:33 +0000
    Re: Is a conditional evaluation of sections of a notebook possible? David Reiss <dbreiss@gmail.com> - 2011-06-24 11:45 +0000

#3253 — Aw: Re: Is a conditional evaluation of sections of a notebook possible?

FromUweT <uwe.thuemmel@googlemail.com>
Date2011-06-23 11:33 +0000
SubjectAw: Re: Is a conditional evaluation of sections of a notebook possible?
Message-ID<itv8au$per$1@smc.vnet.net>
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

[toc] | [next] | [standalone]


#3273 — Re: Is a conditional evaluation of sections of a notebook possible?

FromDavid Reiss <dbreiss@gmail.com>
Date2011-06-24 11:45 +0000
SubjectRe: Is a conditional evaluation of sections of a notebook possible?
Message-ID<iu1tck$9f4$1@smc.vnet.net>
In reply to#3253
On Jun 23, 7:33 am, UweT <uwe.thuem...@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

[toc] | [prev] | [standalone]


Back to top | Article view | comp.soft-sys.math.mathematica


csiph-web