Community
Participate
Working Groups
Build Identifier: 20110916-0149 I made a simple RUI handler with a textfield and a button. There is an onClick handler on the button. At first it didn't give any problems, but when I made a second RUI handler the error that's in the topic appeared. handler testhandler type RUIhandler{initialUI =[ui ], onConstructionFunction = start, cssFile = "css/trtedf.css", title = "testhandler"} ui GridLayout{columns = 3, rows = 4, cellPadding = 4, children = [ Button, TextField ]}; TextField TextField{ layoutData = new GridLayoutData{ row = 1, column = 1 }}; Button DojoButton{ layoutData = new GridLayoutData{ row = 1, column = 2 }, text = "Button", color = "Blue", onClick ::= Button_onClick }; function start() end function Button_onClick(event Event in) end end Reproducible: Couldn't Reproduce
Stijn, The code in description worked fine in nightly build. What build are you using? The problem description in the subject of this bug was saying onClick=Button_onClick, this, however is an incorrect assignment because onClick is an array of EventHandler while Button_onClick is an EventHandler. To append to an array, you may use onClick ::= Button_onClick To assign value to an array, you may use onClick = [Button_onClick] The code you pasted is correct since it is using the array append operator ::=
I've used the milestone build that was online on 07/11/2011 (Version: Indigo Service Release 1 , Build id: 20110916-0149). I didn't write any of the code though, all of it came from drag and drop, even the event. I tried the changes you suggested, and it works that way, but the event doesn't get created that way if you add one in the properties. The javascript notation is still used.
20110916-0149 was a very old version. I recommend you use either the M3 build or the nightly build. The download page is here http://eclipse.org/edt/download/ Nightly build (comparing with M3 build) contains more fixes and performance improvement, but maybe not as stable as M3 because code is delivered everyday. Can you try with one of the recommend build and see if the problem still exists.
Resolve the bug since the latest build works fine for this.
This bug was fixed in 0.7