This is due to qx.ui.basic.Atom prusuming that it's layout will always be a qx.ui.layout.Atom, which is untrue and unenforced.
This restricts the use of included appearance entries, as if TabButton includes one of it's superclass' appearances, that superclass cannot safely define these properties in it's appearance.
To Reproduce
Steps to reproduce the behavior:
Add a TabView to a project
Target the TabView button in appearances and set a gap value (or include a superclass' appearance which has a gap value)
Observe the error
Expected behavior
The error should not be thrown, and the application of the gap property should be ignored. This mirrors the way in which the vast majority of layout-specific properties work in CSS.
This could be done by either detatching TabButton from the inheritance chain to Atom, or by modifying Atom to be permissive of alternative layouts (latter option implemented in this PR).
This PR
Provides a simple error prevention mechanism within the property applies in qx.ui.basic.Atom which ensures the layout supports the given property before attempting to set it, provides a warning in development environments if the layout does not support the property.
Due to the following code in TabButton;
https://github.com/qooxdoo/qooxdoo/blob/b3553384ed4a5194e67d4addd41b1795ea73704f/source/class/qx/ui/tabview/TabButton.js#L37-L41
A conflict arises with the following property apply methods in the Atom superclass;
https://github.com/qooxdoo/qooxdoo/blob/b3553384ed4a5194e67d4addd41b1795ea73704f/source/class/qx/ui/basic/Atom.js#L280-L282 https://github.com/qooxdoo/qooxdoo/blob/b3553384ed4a5194e67d4addd41b1795ea73704f/source/class/qx/ui/basic/Atom.js#L291-L293 https://github.com/qooxdoo/qooxdoo/blob/b3553384ed4a5194e67d4addd41b1795ea73704f/source/class/qx/ui/basic/Atom.js#L296-L298
This is due to
qx.ui.basic.Atom
prusuming that it's layout will always be aqx.ui.layout.Atom
, which is untrue and unenforced.This restricts the use of included appearance entries, as if
TabButton
includes one of it's superclass' appearances, that superclass cannot safely define these properties in it's appearance.To Reproduce
Steps to reproduce the behavior:
gap
value (or include a superclass' appearance which has agap
value)Expected behavior
The error should not be thrown, and the application of the
gap
property should be ignored. This mirrors the way in which the vast majority of layout-specific properties work in CSS.This could be done by either detatching
TabButton
from the inheritance chain toAtom
, or by modifyingAtom
to be permissive of alternative layouts (latter option implemented in this PR).This PR
Provides a simple error prevention mechanism within the property applies in
qx.ui.basic.Atom
which ensures the layout supports the given property before attempting to set it, provides a warning in development environments if the layout does not support the property.