MathGroup Archive 1999

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

Search the Archive

Programming the front end

  • To: mathgroup at smc.vnet.net
  • Subject: [mg20298] Programming the front end
  • From: abraham at kodiak.demon.co.uk (Roberto Abraham)
  • Date: Tue, 12 Oct 1999 03:39:33 -0400
  • Sender: owner-wri-mathgroup at wolfram.com

Hi ---

I'm new to front-end programming and am finding it a bit confusing.
Does anyone know how to program the front end to generate sections
containing cells that behave in the same manner as a section with a
bunch of cells created interactively?

The makeSection[] function below generates a set of cells orgnized the
way I want but unfortunately the generated cells have funny properties in
terms of overwriting each other when I want them to, and not overwriting
each other when I do want them to! For example, evaluating this function 
twice in a row doesn't create two subsubsections (the behaviour I'm 
after), instead it creates a single subsubsection and appends the
cells from the second function call to the end of the first section. I've
experimented with adding the GeneratedCell->False option to various
cells but this doesn't seem to help.

makeSection[] := Block[{},
      CellPrint[Cell["This is an object", "Subsubsection"]];
      CellPrint[ 
        Cell[BoxData[
            RowBox[{RowBox[{RowBox[{"foo", "=", "bar"}], ";"}], " "}]],
          "Input"]];
      CellPrint[
        Cell[BoxData[
            RowBox[{RowBox[{RowBox[{"foobar", "=", "barfoo"}], ";"}], " "}]],
          "Input"]];
      CellPrint[
        Cell[BoxData[
            RowBox[{RowBox[{"test1", " ", "=", " ", "test2"}], ";"}]],
          "Input"]];
      ];

The point of this exercise is to ultimately read in a set of image
file names from an ascii file generated outside of mathematica, and to
use something akin to this function to generate a bunch of labelled
sections in a notebook containing the commands needed to analyse and
reduce the images.

Thanks,

Bob Abraham 
abraham at ast.cam.ac.uk

~
~
~     




  • Prev by Date: Re: Generalization of Greater to matrices
  • Next by Date: Defining new Forms
  • Previous by thread: Re: Real integrand->complex result.
  • Next by thread: Re: Programming the front end