Community
Participate
Working Groups
Build Identifier: 20110301-1815 The fields "text", "popup" and "arrow" are declared visible for the same package only. This makes it impossible to access information by sub-classes, e.g. for computeSize() fixes. Reason for requiring this: CCombo is higher than normal text fields which looks ugly on many layouts. CCombo should find it's preferred height according to its text field. Reproducible: Always Steps to Reproduce: 1. Try to extend CCombo in another package (fields not accessible / not compilable) 2. Try to extend CCombo in same package and run your personal Demo app (runtime causes SecurityException)
Looks like CCombo is missing a @noextend.
(In reply to comment #1) > Looks like CCombo is missing a @noextend. I would not constrain CCombo even more. CCombo has some drawbacks (the layout problem in comparison to Combo is just one of it). Is there a reason users shall not subclass it? If so, how should someone then alter some behaviour or fix the computeSize() method?
ccombo is not designed for subclassing, computeSize should return the smallest size to show the control including content and trim. If you believe the behaviour is broken then it should be fixed in ccombo and not in a subclass...
computeSize() seems ask its private child list which happens to be disposed. How can that be? ... org.eclipse.swt.SWTException: Widget is disposed at org.eclipse.swt.SWT.error(SWT.java:4361) at org.eclipse.swt.SWT.error(SWT.java:4276) at org.eclipse.swt.SWT.error(SWT.java:4247) at org.eclipse.swt.widgets.Widget.error(Widget.java:468) at org.eclipse.swt.widgets.Widget.checkWidget(Widget.java:340) at org.eclipse.swt.widgets.List.getItems(List.java:492) at org.eclipse.swt.custom.CCombo.computeSize(CCombo.java:432) ...
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant. If the bug is still relevant, please remove the stalebug whiteboard tag.
Still relevant for me, I want to access the CCombo field "Button arrow" to have a bigger arrow for big-font scenarios. I'm doing this via reflection since CCombo still has that field package-private. (I lack privileges to remove the "stalebug" tag.)