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


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

Re: SetOptions does not work with Grid

Started byArmand Tamzarian <mike.honeychurch@gmail.com>
First post2011-01-28 11:16 +0000
Last post2011-01-28 11:16 +0000
Articles 1 — 1 participant

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

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: SetOptions does not work with Grid Armand Tamzarian <mike.honeychurch@gmail.com> - 2011-01-28 11:16 +0000

#15686 — Re: SetOptions does not work with Grid

FromArmand Tamzarian <mike.honeychurch@gmail.com>
Date2011-01-28 11:16 +0000
SubjectRe: SetOptions does not work with Grid
Message-ID<ihu8ih$1p5$1@smc.vnet.net>
On Jan 21, 8:31 pm, Armand Tamzarian <mike.honeychu...@gmail.com>
wrote:
> On Jan 20, 10:32 pm, AES <sieg...@stanford.edu> wrote:
>
>
>
> > In article <ih6eb4$3d...@smc.vnet.net>,
> >  Armand Tamzarian <mike.honeychu...@gmail.com> wrote:
>
> > > As it happens I just asked tech support today why SetOptions doesn't
> > > work with Grid (or Column) but does work with Row. The answer was tha=
t
> > > Row is a RowBox and Grid and Column are GridBoxes. "GridBox does not
> > > support SetOptions"
>
> > > In other words it doesn't work because SetOptions isn't supported but
> > > no explanation of why SetOptions isn't, or can't be, supported.
>
> > > Interestingly to demonstrate this behaviour of GridBox the response
> > > was first to Options[GridBox], to show the options, then
> > > SetOptions[GridBox] to get the message. Then do the same for RowBox.
>
> > > When you do that you see that the system tells you GridBox has option=
s
> > > but you cant SetOptions (you get a message), whereas RowBox doesn't
> > > have options (empty list) but you can SetOptions!
>
> > Just a few more additions to Mathematica's extensive "gotcha!" list
> > (or, as someone else started calling them -- and it's a great label --
> > "Today's WTF" list.
>
> The irritating thing in this case is the lack of any messages advising
> the usage of SetOptions is futile. Sure there is a message for GridBox
> but not for Grid, which is the Head most people will be trying to
> SetOptions for (not the underlying GridBox).
>
> Additionally there does not seem to be a source or list of what
> SetOptions works on and what it doesn't work on. Nothing in the
> SetOptions documentation. The place to spell this out to users is,
> IMO, in the More Information part of the documentation for a function/
> Option etc.
>
> I'm also finding that many control elements cannot have their options
> set using SetOptions.
>
> Mike

I got this list from tech support of all box types that do not support
SetOptions:

"ActionMenuBox", "AnimatorBox", "CheckboxBox", "ColorSetterBox", \
"CounterBox", "DynamicBox", "DynamicModuleBox", "DynamicWrapperBox", \
"GridBox", "InputFieldBox", "ItemBox", "Line3DBox", "LineBox", \
"LocatorBox", "LocatorPaneBox", "OpenerBox", "OptionValueBox", \
"OverlayBox", "PaneBox", "PanelBox", "PaneSelectorBox", "Point3DBox",
\
"PointBox", "PopupMenuBox", "ProgressIndicatorBox", "RadioButtonBox",
\
"RectangleBox", "RotationBox", "SetterBox", "Slider2DBox", \
"SliderBox", "TabViewBox", "TemplateBox", "TogglerBox", "TooltipBox",
\
"ValueBox"

>From this we can work out what functions don't support SetOptions.
This should obviously be documented. Additionally because you don't
necessarily get an error message when you use SetOptions -- see Grid
example in this thread -- the user is left none the wiser as to why
things aren't working -- until they contact tech support or read this
thread. So in additional to explicitly stating in the function
documentation that SetOptions doesn't work it might help is a message
is generated when it is used on a function for which it doesn't work.

Mike

[toc] | [standalone]


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


csiph-web