Preferences Broken
Problem
When we run Fluency, the console is filled up with exceptions. They are 128 in number. Even though Fluency is not affected, getting rid of these exceptions could help as they look really irritating and eat up some boot time.
Analysis
Widget calls init() method in it's constructor which in turn calls createDefaultProperties(). In this method, attempt is made to add following types of default properties in the widget's property list:
- ZLEVEL
- VISIBLE
- ENABLED
- FORE_COLOR
- LOCATION
- SIZE
- TEXT
- TRANSPARENCY
It first checks if the given type of property is applicable to that widget or not by going through it's components. E.g. TEXT property would be applicable for a widget which contains label, text component or a button. If the property is applicable, it creates an instance of appropriate fluency property. E.g. if the widget has a JLabel then for TEXT, it would create an instance of org.knownspace.fluency.shared.widget.property.JLabelTextProperty. If the property type is not applicable, it creates an instance of org.knownspace.fluency.shared.widget.property.NullWidgetProperty. These created fluency property instances are then added to the property list of the widget. In case of NullWidgetProperty, an exception is thrown which is what clutters up the display during boot time.
Solution
If some default property is not applicable to any widget, we should simply ignore it rather than throwing an exception. comments?
Comments (6)
Nov 11, 2007
whoknows says:
i presume NullWidgetProperty is a singleton? gjer.i presume NullWidgetProperty is a singleton?
gjer.
Nov 11, 2007
Abhijit Borude says:
yes it is a singletonyes it is a singleton
Nov 11, 2007
Abhijit Borude says:
since I got the opportunity to study how preferences work in Fluency, I can put ...since I got the opportunity to study how preferences work in Fluency, I can put up a report on how preferences are handled...to add to Fluency documentation.
Nov 11, 2007
whoknows says:
yes. do so. you must write a report on what your team did too. gjer.yes. do so. you must write a report on what your team did too.
gjer.
Nov 11, 2007
whoknows says:
yes, ignore them. gjer.yes, ignore them.
gjer.
Nov 12, 2007
yonghyun says:
I changed remaining system.out.printing when fluency app starting. Thus, now ini...I changed remaining system.out.printing when fluency app starting.
Thus, now initial logging shows only following lines.