Prefs Broken

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:

  1. ZLEVEL
  2. VISIBLE
  3. ENABLED
  4. FORE_COLOR
  5. LOCATION
  6. SIZE
  7. TEXT
  8. 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?

Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.
  1. Nov 11, 2007

    whoknows says:

    i presume NullWidgetProperty is a singleton? gjer.

    i presume NullWidgetProperty is a singleton?
    gjer.

  2. Nov 11, 2007

    Abhijit Borude says:

    yes it is a singleton

    yes it is a singleton

  3. 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.

    1. 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.

  4. Nov 11, 2007

    whoknows says:

    yes, ignore them. gjer.

    yes, ignore them.
    gjer.

  5. 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.

    [INFO | 2007-11-12 09:25:14,453] org.knownspace.fluency.shared.exceptions.FluencyExceptionUtil.main(26 line) :: Exception Handling is ON  
    [INFO | 2007-11-12 09:25:16,203] org.knownspace.fluency.editor.GUI.core.FluencyEditorFrame.main(399 line) :: Opening file C:\Documents and Settings\jazzvm\Fluency\prefs.xml  
    [INFO | 2007-11-12 09:25:16,562] org.knownspace.fluency.editor.tags.TagXMLHandler.Thread-4(71 line) :: No tags.xml file located. Using Empty WidgetTags object  
    [INFO | 2007-11-12 09:25:16,562] org.knownspace.fluency.editor.tags.TagXMLHandler.Thread-3(71 line) :: No tags.xml file located. Using Empty WidgetTags object  
    [INFO | 2007-11-12 09:25:16,890] org.knownspace.fluency.editor.GUI.core.FluencyEditorFrame.main(233 line) :: Editor Model version 0.1.6