Open
Description
The following code prints 0, the length of the menu's contents field, but it should be 1. It is also impossible to access the elements in contents.
It is interesting to note, however, that if the menu was to be shown, it would indeed have the item "foobar" in it.
import scala.swing._
val menu = new Menu("File") {
contents += new MenuItem("foobar")
}
println(menu.contents.length)
Metadata
Metadata
Assignees
Labels
No labels