I noticed now that the class docs specify that the default is false. Should isEditable() be changed to return false on a null property?
On Fri, Oct 16, 2020 at 2:59 PM Nir Lisker <[email protected]> wrote: > Hi, > > Spinner's editable property seems to have conflicting initial values. > isEditable() returns true on an uninitialized property, but initializing it > sets its default to false: > > private BooleanProperty editable; > public final void setEditable(boolean value) { > editableProperty().set(value); > } > public final boolean isEditable() { > return editable == null ? true : editable.get(); // <---- true > } > public final BooleanProperty editableProperty() { > if (editable == null) { > editable = new SimpleBooleanProperty(this, "editable", false); > // <---- false > } > return editable; > } > > Seeme like a bug. What is the correct default? > > - Nir >
