Announcement

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

    destroy child-item

    hi,
    we have a very large Smartgwt-app.

    1. what is the best way to replace childs from a shown layout?

    should we first
    layout.removeMember(child);
    and than
    child.markForDestroy();

    or shall we directly
    child.markForDestroy();

    afterwards we want to call
    layout.addMember(newItem)

    .

    2. are there any known issues with
    layout.removeMember(child);
    as I have seen an Exception from it in our logs:
    Caused by: com.google.gwt.core.client.JavaScriptException: (TypeError) : Die Eigenschaft "getItems" eines undefinierten oder Nullverweises kann nicht abgerufen werden.
    at Unknown.pGb(Exceptions.java:36)
    at Unknown.o1b(Layout.java:1310)

    ?

    (we are using smartgwt-5.0-2015-08-20) with IE-11).


    Thank you.

    #2
    In the case that you are immediately adding some new members or making other changes to a Layout that contains a widget that you want to destroy, calling removeMember() then markForDestroy() has the subtle advantage that the member will be immediately removed the layout and so won't be involved in any calculations done by the Layout from then on, which can save some extra work.

    Other than a special circumstance like this, it doesn't matter.

    As far as your issue with getItems(), first update to a full patched build (your build is about 1.5 years out of date), then if you still have the problem, see the FAQ for how to report a possible bug.

    Comment

    Working...
    X