On Sep 6, 2008, at 1:27 PM, Paul McNett wrote:
> I can easily and cleanly subclass dColumn, and instantiate that to add
> to the dGrid.
>
> You already have a case for needing the dNode class exposed, so why
> not
> be consistent with our other main control that is made up of child
> objects?
IMO, the two are not comparable. The comparison is much more apt
between dTreeView and dRadioList.
Grid columns are typically different from each other; at the very
least, they have a different Caption and DataField properties. One
common approach to creating a grid is to create your individual
columns and then add them to the grid iteself. The grid is nothing but
a "holder" for these columns. All columns in the grid are "equal" in
standing. Columns in a grid do not represent actual UI entities, but
rather a collection of properties used by the grid to display the data
in its underlying table.
Trees don't work that way at all. They are not created first and then
added to the tree; instead, an existing node is told to append a child
node to it, and it does that through the tree. The reference to the
resulting dNode instance is returned so that it can be manipulated
programmatically. If you look at the dNode properties, you'll see that
nearly every one references self.tree, and will crash if that
reference isn't present. No such relationship exists between dColumn
and dGrid.
We have a guiding principle that our code should not lead developers
down paths that they shouldn't go. Making dNode a full base Dabo class
would (IMO) send the message that this is a class to use and
manipulate like any other base class. This is definitely not the case,
which is why it was never exposed as a base class. The "case" that I
made is for an extremely unusual situation that I don't think other
developers will ever need, unless they create a tool designed to
manipulate Dabo classes instead of creating an app that uses Dabo
classes.
As I said earlier, if you can think of a good reason that this
*should* be exposed, at the very least prefix the name with an
underscore.
-- Ed Leafe
_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-dev
Searchable Archives: http://leafe.com/archives/search/dabo-dev
This message: http://leafe.com/archives/byMID/[EMAIL PROTECTED]