rfo | 23 Jul 2012 19:08

RE: [eiffel_software] ev_grid mystery

OK, I THINK I found the first problem.  Here is what I THINK is going
on.
The sequence:  create tgi.make_with_text ("top level row");
grid.set_item (2, 1, tgi)
inserts an item in column _2_ of the soon-to-be-parent row.  Seems
harmless and even insignificant, right?
Nope.
It seems that the tree behavior takes it cue from that somehow, for some
reason I can neither explain nor fathom.
It's just an item to me.  Sure, the first column in that row does not
YET have an item, but so what?  The subrows relate the parent ROW, and
should not care even a little about what cells happen to be or not be
filled in yet.
Does this mean that there can be NO CELLs to the left of the tree, else
it blows up?  Please say it isn't so.  I chose EV_GRID because I wanted
a grid and didn't want a tree.  I guess that's not an option.  I can
imagine why, but I don't have to like it.

I _can_ adapt what I want to do to the way it works, but that's just
lucky for me.  It's really not what I want.
Maybe a better assertion, or, heaven forbid, an actual comment might
help avoid confusion in the future, but a change in behavior would be
better I think.

Please feel free to correct me on my observations, interpretations,
conclusions, grammar and spelling as needed.

I still want to know how to build nested cells if at all possible.

Thanks
(Continue reading)

rfo | 27 Jul 2012 02:16

RE: [eiffel_software] ev_grid mystery

Thanks Manu!

R

==================================================
Roger F. Osmond

 

-------- Original Message --------
Subject: RE: [eiffel_software] ev_grid mystery
From: "Emmanuel Stapf" <manus@...>
Date: Thu, July 26, 2012 7:11 pm
To: <eiffel_software@...>

  > create tgi.make_with_text ("top level row")
> grid.set_item (2, 1, tgi)

The issue is that the tree starts at column 2, not column one. As a
consequence, the subtree items cannot be inserted at column 1, but 2.
Changing that line to read:

grid.set_item (1, 1, tgi)

fix the problem, or change the last line to insert the item at column 2
instead:

tsr.set_item (2, tgi)

which I recommend from a cosmetic viewpoint. The code that works is
(Continue reading)


Gmane