Hints and tips for components developers

Created by Stefan Rennick Egglestone 2006-08-14
Last update by Stefan Rennick Egglestone 2006-08-14

Although developing components for ECT is not a difficult task, small mistakes made in this process can stop components working as expected, and debugging these mistakes can take some time. To help in this process, we have compiled this page of hints and tips to help developers to solve common problems. If you have a hint or tip that you would like added to this page, please email Stefan Rennick Egglestone. Note that currently all of these hints and tips relate to components developed in Java.
  1. Component appears in capability browser, but cannot be instantiated

    Check that your component class implements interface java.io.Serializable - if not, then it should!

  2. Component doesn't appear in capability browser at all

    A number of possiblities here:

    • the package directive defined in your component class file doesn't match the directory in which you have placed this class file. This commonly happens if you have copied the template component into a new directory, but have failed to modify package equip.components.templates to package equip.components.<new_directory_name>
    • a BeanInfo file isn't being generated properly for your component - check directory <ect_home>\build\<new_directory_name>\equip\ect\components\<new_directory_name> to see if a correctly-named BeanInfo file has been placed there. If it hasn't, you should check the build file to make sure that it has been correctly set-up to auto-generate BeanInfo files (if you are using the auto-generation mechanism)

  3. Although your component is making use of dynamic properties, these properties don't appear in the graph editor

    Check that your component implements interface equip.ect.DynamicProperties - dynamic properties will not work if it doesn't. If you are still struggling, take a look at class equip.ect.components.phidgets.PhidgetInterfaceKit for an example of how to use dynamic properties

  4. Exporter GUI fails for no apparent reason

    A couple of possibilities here:

    • has one of your components used up all the memory allocated to the Exporter GUI process? If so, you are likely to see java.lang.OutOfMemoryException reported by the Exporter GUI
    • does one of your components have a string-typed property onto which a string of length 65536 or more characters has been placed? If so, the Exporter GUI will fail with a UTFDataFormatException. If you really need a property capable of holding such large amounts of character data, you should instead type your property as a char [], and convert internally between char [] and String representations as and when necessary