[fxruby-users] table item suggestions

Jeroen van der Zijp jeroen at fox-toolkit.org
Thu Feb 16 18:05:30 EST 2006


On Thursday 16 February 2006 16:58, you wrote:
> On 2/16/06, Jeroen van der Zijp <jeroen at fox-toolkit.org> wrote:
> >
> > On Thursday 16 February 2006 08:06, Meinrad Recheis wrote:
> > > hi lyle,
> > > TableItem cannot do some things the table can do on it's items:
> > >
> > > the row and column index
> > > spanning? <=> table.itemSpanning?
> > > color(=)  <=> table.s/getCellColor
> > >
> > > maybe also these two methods:
> > > startInput
> > > makePositionVisible
> > >
> > > would it make sense to add these methods to the interface of tableItem?
> > > since tableitem surely knows its table it should be no problem of
> > forwarding
> > > the according method calls to the table instance.
> >
> > The FXTableItem's interface is intended for FXTable, and the FXTable
> > interface
> > is meant for your programs.
> >
> > Thus, FXTableItem doesn't know about FXTable except insofar as when
> > FXTable is
> > passed as a parameter sometimes.
> >
> > Certainly, it is the case that FXTableItem doesn't know which cell it's
> > in, and
> > so doesn't know if it's a spanning item either.
> >
> > I suggest strongly to manipulate items through FXTable and not via
> > FXTableItem
> > directly; manipulating via FXTableItem means FXTable isn't aware anything
> > has
> > changed and thus doesn't know it needs to update or recompute....
> 
> 
> pity. i was hoping that i did not need to use the fxtable interface to
> manipulate items, because lyle
> included methods each_row{|tableItemArray| } and
> each_column{|tableItemArray| } in FXRuby.
> the ruby way of manipulating complex structures is iterating over the
> structure instead of loops and indexaccess.
> 
> so i suggest for fxruby a complete rework of the tableitem in fxruby which
> forwards its attribute manipulators to the
> table interface. i did even implement this allready but then thought it was
> not necessary because i thought that tableItem
> had almost all attributes the table also provides in its interface.

Sorry, this is how its done in C++; Lyle can clue you in on Ruby particulars...


	- Jeroen



-- 
+----------------------------------------------------------------------------+
| Copyright (C) 17:00 02/16/2006 Jeroen van der Zijp.   All Rights Reserved. |
+----------------------------------------------------------------------------+
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://rubyforge.org/pipermail/fxruby-users/attachments/20060216/d6cfc075/attachment.bin


More information about the fxruby-users mailing list