Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    DynamicForm.clearValues causing error in developer console

    SmartClient Version: v8.3p_2012-12-13/Enterprise Deployment (built 2012-12-13)
    FF 12.0
    Windows 7

    Since upgrading from SmartGWT Pro 2.5.3 to Enterprise 3.1p I am now receiving many errors/warnings in the developer/hosted mode console which I am trying
    to clean up. Here is one type of error which I am getting many times over:
    "
    00:03:20.811 [ERROR] 09:34:02.431:KUP4:WARN:TextItem:isc_TextItem_295[ntmQcode]:$952 - this is a multiple FormItem but newValue is not null and is not an array.
    "

    From the stacktrace in the hosted mode console I can see that this error occurs when I call: editor.clearValues();
    where 'editor' is a DynamicForm instance. I am getting the above error for every field in the datasource (of the dynamic form) which has an attribute of
    multiple. Here is the DS field definition for the 'ntmQcode' field:
    "
    <field name="ntmQcode" type="qcode" title="Q-Codes" childrenProperty="true" multiple="true" />
    "

    I have not defined any default values for these fields so it would seems like 'clearValues' is trying to set these fields to a non-null value
    that is not an array (per the error).

    Any help resolving this would be appreciated. Also if you could offer any general guidance on investigating/resolving errors/warnings showing up in the
    developer console. Sometimes the stack trace of these errors does not trace back to any code I have written so it makes investigation difficult.

    Thanks!

    #2
    This particular warning is something that can safely be ignored. We have made a change to eliminate it but this has not yet hit nightly builds.

    In terms of general advice for debugging / troubleshooting.
    If you haven't already, take a look over the debugging section in the reference documentation.
    Note that the developer console is helpful for more than just stack traces - also useful for debugging RPC requests, application structure, etc.

    As you observe - the stack traces reported in the developer console will typically be helpful for tracing the method calls through SmartClient JavaScript code, and often are enough to determine the cause of problems (or at least make an educated guess).
    They are less good for troubleshooting logic bugs purely in your Java code - but for that there is always the standard Eclipse debugging tools (running your app in debug mode, setting breakpoints, etc).

    Hope this helps

    Regards
    Isomorphic Software

    Comment

    Working...
    X