MathGroup Archive 2006

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

Search the Archive

RE: Pasting a color from DrawGraphicsPalette

  • To: mathgroup at smc.vnet.net
  • Subject: [mg67599] RE: [mg67553] Pasting a color from DrawGraphicsPalette
  • From: "David Park" <djmp at earthlink.net>
  • Date: Sat, 1 Jul 2006 05:13:03 -0400 (EDT)
  • Sender: owner-wri-mathgroup at wolfram.com

Peter,

I do not know what happened there because when I try pasting in Green from
the DrawGraphicsPalette, whether or not Graphics`Colors` or DrawGraphics is
loaded, the plot works without error.

David Park
djmp at earthlink.net
http://home.earthlink.net/~djmp/

From: Peter Breitfeld [mailto:phbrf at t-online.de]
To: mathgroup at smc.vnet.net


Look at this simple example:

In:=Show[Graphics[{Green, Rectangle[{0,0}{1,1}]}]];

If I enter "Green" with the keyboard, I get a green rectangle as
expected. But when I paste "Green" in by klicking on the apropriate
button in the DrawGraphicsPalette (from Package DrawGraphics by David
Park) the following error is reported:

MakeExpression::"boxfmt":"\!\(TextForm\) in
\!\(MakeExpression[\(\(\"Green\", \
TextForm\)\)]\) is not a box formatting type. A box formatting type is any \
member of $BoxForms. \!\(\*ButtonBox[\"Mehr\[Ellipsis]\", \
ButtonStyle->\"RefGuideLinkText\", ButtonFrame->None, \
ButtonData:>\"General::boxfmt\"]\)"

So I tried to add "TextForm" to "$BoxForms" using:

AppendTo[$BoxForms, TextForm]

Now I get a green Rectangle but still an error:

ParentForm::"deflt":"The ParentForm of \!\(ParentForm[TextForm]\) is not \
defined on $BoxForms. \!\( \*ButtonBox[\(Mehr\[Ellipsis]\), \
ButtonData:>\"ParentForm::deflt\", ButtonStyle->\"RefGuideLinkText\", \
ButtonFrame->\"None\"]\)

So I tried to define a ParentForm, eg:

ParentForm[TextForm]^=StandardForm

Mathematica doesn't like this, because TextForm is protected.

No I could unprotect TextForm an assign the ParentForm. Now all works
well, but I'm not sure if there are unwanted side-effects coming up.

Does anyone know more about this?


Gruss Peter
--
==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==
Peter Breitfeld, Bad Saulgau, Germany -- http://www.pBreitfeld.de



  • Prev by Date: Re: when dimension increases
  • Next by Date: Re: Limit of an expression?
  • Previous by thread: RE:Problem in evaluating functions from my own package!!!
  • Next by thread: Re: Problem with LaplaceTransform and InverseLaplaceTransform