- About Scala
- Documentation
- Code Examples
- Software
- Scala Developers
Bug in scala.swing.Table?
Mon, 2008-12-22, 22:40
This time I thought I ask the mailing list before I file a bug that is none :)
scala.swing.Table behaves weirdly. When I start scala.swing.test.UIDemo and go to the Table Tab and drag around a header of a column, the content of that column changes. The content of the column is always the same, even though I drag the table to another location.
Also, sorting within a column does not seem to work, all the content stays in place...
I noticed this when trying to port this to Scala:
http://fisheye.codehaus.org/browse/groovy/trunk/groovy/groovy-core/src/main/groovy/model/DefaultTableModel.java?r=12913
I can upload the code if anyone is interested, but its a work in progress and I am new to scala...
Yup I am pretty sure now...
The JTable converts the index:
http://kickjava.com/src/javax/swing/JTable.java.htm#1902
public void setValueAt(Object JavaDoc aValue, int row, int column) {
getModel().getValueAt(row, convertColumnIndexToModel(column));
}
while the override does not:
override def getValueAt(r: Int, c: Int) =
Table.this.apply(r,c).asInstanceOf[AnyRef]
I played a bit around, it has to be fixed in several places otherwise weird
side effects show up...
I will file it...
Stefan Ackermann-4 wrote:
>
> This time I thought I ask the mailing list before I file a bug that is
> none
> :)
>
> scala.swing.Table behaves weirdly. When I start scala.swing.test.UIDemo
> and
> go to the Table Tab and drag around a header of a column, the content of
> that column changes. The content of the column is always the same, even
> though I drag the table to another location.
>
> Also, sorting within a column does not seem to work, all the content stays
> in place...
>
> I noticed this when trying to port this to Scala:
> http://fisheye.codehaus.org/browse/groovy/trunk/groovy/groovy-core/src/m...
>
> I can upload the code if anyone is interested, but its a work in progress
> and I am new to scala...
>
>