MathGroup Archive 2006

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

Search the Archive

Re: GridBox coming back unevaluated


Hi,
 
> DisplayForm[GridBox[Partition[ToExpression[Range[9]],3],
> RowLines->True, ColumnLines->True]]
> 
> Apparently, the output from Range in the form of boxes is not being
> interpreted. The function ToExpressions forces the boxes to be
> interpreted as a Mathematica expression.

just in case someone cares: in this case the problem seems not to be with
wrapper boxes but that in one case the list of numbers is a packed array:

In[75]:=
Developer`PackedArrayQ[Partition[Range[9],3]]
Out[75]=
True
In[77]:=
Developer`PackedArrayQ[Table[3i+j,{i,0,2},{j,1,3}]]
Out[77]=
False

and Gridbox obviously doesn't like this. So this will help also:

GridBox[Developer`FromPackedArray[ttt], RowLines -> True, 
    ColumnLines -> True] // DisplayForm

I dont't think it is a very user-friendly feature that you will need
functions from the Developer` context to understand why GridBox doesn't
like the Range-version, so I wonder if there are good reasons why GridBox
doesn't accept PackedArrays ?

albert


  • Prev by Date: Re: Help with Identities
  • Next by Date: Re: HoldFirst question
  • Previous by thread: Re: GridBox coming back unevaluated
  • Next by thread: Re: GridBox coming back unevaluated