SmartGWT 4.1d LGPL 2013-12-09 (also tried 2013-12-06)
Previous versions of VLayout (and likely HLayout) did not have this assertion under getOrCreateRef:
assert refInstance instanceof VLayout
This is messing with an advanced use case, such as creating a Layout and assigning setScClassName later.
I'm not saying that's a good idea - I wouldn't have done it that way but unfortunately I can't refactor it out in the near term which means we can't keep trying new builds until we do.
Perhaps an assertion to Layout may still give you what you need?
assert refInstance instanceof Layout
Here's a test case. I tried to cut out all the extra junk - I believe this simplified code should blow up:
java.lang.AssertionError: null
at com.smartgwt.client.widgets.layout.VLayout.getOrCreateRef(VLayout.java:104)
....
(invoked natively by Canvas.getByJSObject)
Previous versions of VLayout (and likely HLayout) did not have this assertion under getOrCreateRef:
assert refInstance instanceof VLayout
This is messing with an advanced use case, such as creating a Layout and assigning setScClassName later.
I'm not saying that's a good idea - I wouldn't have done it that way but unfortunately I can't refactor it out in the near term which means we can't keep trying new builds until we do.
Perhaps an assertion to Layout may still give you what you need?
assert refInstance instanceof Layout
Here's a test case. I tried to cut out all the extra junk - I believe this simplified code should blow up:
Code:
public class MyWidget extends Layout { public MyWidget() { Layout layout = new Layout(); layout.setScClassName("VLayout"); //Yuck!!! (someone created a base class that's used *everywhere* with an H vs V constructor that calls this method to assign CSS! addMember(layout); Canvas canvas = layout.getTopElement(); } }
at com.smartgwt.client.widgets.layout.VLayout.getOrCreateRef(VLayout.java:104)
....
(invoked natively by Canvas.getByJSObject)
Comment