Community
Participate
Working Groups
1 Create an Web 2.0 Client application. 2 Create a library file:testLib: DojoButton DojoButton{ layoutData = new GridLayoutData{ row = 3, column = 2 }, text = "Button" }; 3 create an RUI handler and import testLib. 4 Properties of DojoButton can be updated Expected Result: DojoButton cannot be updated
Created attachment 207284 [details] Sample project for reproducing the debug Sample project for reproducing the debug
RBD prevent button properties to be changed in such condition. It need to be fixed after 0.7.
I thought that this issue was resolved already in .7?
It still can be reproduced in the latest build. I have talked with Forest and he's not aware of any changes around this. It sounds like something worked in RBD is either not ported to EDT, or is broken. (In reply to comment #3) > I thought that this issue was resolved already in .7?
I spoke with Yun Feng about this one, and it seems to be related to the following: ui Box{ children = [Lib2.var1, var2] }; var2 Button = Lib2.var1; NOTE: I replaced GridLayout with Box. In this code, the same widget instance is being referenced in two locations. Since a widget can only have one parent, the second reference should 'win'. I believe this means that the 'ui' field should display one child, and that child should be the var1 field of Lib2. Note that the 'ui' array should have two children, and they should both be the var1 field of Lib2. In EDT, I am seeing two buttons displayed on the screen when I run this code, with one of the buttons representing Lib2.var1 and the other representing a new button. In the setEmpty function of the handler, I see the following: "eze$$setEmpty": function() { this.ui = new egl.org.eclipse.edt.rui.widgets.Box(); this.var2 = new egl.org.eclipse.edt.rui.widgets.Button(); } where var2 is set to a new button. In the setInitial function of the handler, I see var2 being parented by 'ui': this.ui.setChildren([(function(x){ return x == null ? x : egl.eglx.ui.rui.Widget.fromWidget.apply( this, arguments );})(egl.checkNull(egl.client.Lib2['$inst']).var1,"org.eclipse.edt.rui.widgets.Button"), (function(x){ return x == null ? x : egl.eglx.ui.rui.Widget.fromWidget.apply( this, arguments );})(this.var2,"org.eclipse.edt.rui.widgets.Button")].setType("[org.eclipse.edt.rui.widgets.Button")); followed by var2 being assigned to the var1 field of Lib2: this.var2 = egl.checkNull(egl.client.Lib2['$inst']).var1; We will either need to mark this forward reference as invalid, leave it the way it is, or figure out how to go back and update references to the field that is being reassigned. I believe that this is an edge case that we can defer until a future release. If the library field is only referenced once, things seem to work as designed: ui Box{ children = [Lib2.var1] }; Note that the following code also fails: var2 Button = Lib2.var1; ui Box{ children = [var2] };
Set this to JSGen.
I think there are 2 problems in this bug. 1. The property view/outline view didn't show correctly.This is the original problem.(The name in the ourline is incorrect, the property should be disabled.) 2. The problem of initialization mentioned in comment 5. I think this is a variation of bug 359165. Forest, can you take a look at the first problem?
Forest, have you reviewed comment 7? I agree with Ji Yong that issue 2 in comment 7 is a duplicate of 359165.
Created attachment 209531 [details] fix
Hi, Brian I agree with comment 7, and made a fix to protect widget in library to be selected in property view. Please help to review, thanks
Route to Forest for the remaining issue. I can help commit the code if the it passes the review.
I don't think this patch does what we want, and it throws an NPE. I have opened Bug 369003 - Referenced libraries are not marked as 'moveable' to describe what I think is the real problem indicated by comment 7, #1. Also, to avoid confusion with defect 359165, the issue we are now dealing with is: ui Box{ children = [Lib2.var1, var2] }; var2 Button{}; The user should see two buttons in the Design view and the outline view. They should be able to move both buttons in the design view and outline view, and they should be able to set properties on var2 only. (you can run the example above and the one from 369003 in RBD to see how it should work) I would recommend that we move this conversation to 369003 and mark this one as a duplicate of 359165.
mark as duplicate to 359165 as Brian said in Comment 12. *** This bug has been marked as a duplicate of bug 359165 ***