Understanding DynamicJava Limitations

The usage of DynamicJava within Isight has certain limitations and restrictions, which are not present when using DynamicJava in other environments.

Consider the following limitations when using DynamicJava within Isight:

  • You must compare string values (especially the values of string parameters) with the equals method, not with the == operator. For example:

    if ("none".equals(sName))     // OK
    if ("none" == sName)          //   *** WRONG - is always false.
    
    jobLog.logInfo("Status message");       // OK
    System.out.println("lost message");     //  **** WRONG - is not
    visible anywhere.
    
    Param.getValueObj().setValue(Param2.getValueObj().getAsReal());
    // Correct - assigns value of Param2 to Param.
    Param = 42.0;      // ** WRONG - gives a type error '42.0 is not a
    ScalarVariable'.
    Param = Param2;    // ** WRONG - silently alters local variable
    Param to point to the parameter Param2.