Skip to main content

Compiler error on Tables

4 replies [Last post]
michaeljharper
Offline
Joined: 2008-03-16
Points: 0

Hi,

I'm looking for a solution to the following. I'm using a Table and I'm getting the following error at compile time.

Incompatible types
found : com.sun.javafx.runtime.sequence.Sequence
required javafx.ui.TableCell$

I've had a look at converting to compiled code but cant find a reference for this case.

The code responsible for it is this ....
Any help would be very appreciated
cells: bind for (p in model.orders)

[
TableCell {
text:bind p.operatingInstruction
},
TableCell {
text:bind p.orderType
},
TableCell {
text: bind p.dateInstructed

},
TableCell {
text: bind p.dateAuthorised
},
TableCell {
text: bind p.requiredCompletion

},
TableCell {
text: bind p.originatingOffice

},
TableCell {
text: bind p.issuedBy

},
TableCell {
text: bind p.authorisedBy

}]

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
jim_weaver
Offline
Joined: 2007-05-18
Points: 0

Michael.

The "for" expression evaluates to a sequence, and the code use sequence literal as well (the [] around the TableCell instances). Remove the square brackets and it should get past that error.

Thanks,
Jim Weaver

michaeljharper
Offline
Joined: 2008-03-16
Points: 0

Thanks,

I thought I had tried that but I could be wrong. On Jira is says take out the keyword 'bind' and it works, which it does.

I don't know if it's related but clicking around the fields then causes some strange behaviour , like other fields moving to the left in tems of alignment with no apparent pattern.

Anyway it was good to get it working finally.

Thanks again
Mike

jim_weaver
Offline
Joined: 2007-05-18
Points: 0

Not sure about the strange Table behaviour issue. I'm not worrying too much about UI behaviour until the Reprise project is released, which is a streamlined version of the Widget side of JavaFX I'm told.

Thanks,
Jim Weaver
http://JavaFXpert.com

alexsch
Offline
Joined: 2007-07-12
Points: 0

It is a known issue http://openjfx.java.sun.com/jira/browse/JFXC-921
Hope that developers will fix it soon.