Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 286515

Summary: [CoolBar] Reparenting of item controls does not work
Product: [RT] RAP Reporter: Ralf Sternberg <rsternberg>
Component: RWTAssignee: Project Inbox <rap-inbox>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: tbuschto
Version: 1.3   
Target Milestone: 1.3 M2   
Hardware: All   
OS: All   
Whiteboard:
Attachments:
Description Flags
Snippet to reproduce
none
Patch to outline a possible approach none

Description Ralf Sternberg CLA 2009-08-13 09:29:52 EDT
Disposing of a coolitem and creating a new item using the same control (usually a toolbar) leads to a Javascript error: "TypeError: this._layoutChanges is null" in FF.
The error occurs in CoolItem.js#setParent while processing control.setParent( this ).
Comment 1 Ralf Sternberg CLA 2009-08-13 09:30:51 EDT
Created attachment 144381 [details]
Snippet to reproduce

The same snippet works as expected in SWT.
Comment 2 Ralf Sternberg CLA 2009-08-13 10:23:05 EDT
The problem is that disposing of a CoolItem also disposes of the control that is set on this item (since qooxdoo diposes of children recursively).
A solution might be to set the parent of _control to null in the CoolItem.js#destruct method, i.e. just before disposing of the item. However, I tried this and I got a different Javascript error...
We need to check how reparenting works in qooxdoo.
Comment 3 Ralf Sternberg CLA 2009-08-13 10:35:15 EDT
Created attachment 144404 [details]
Patch to outline a possible approach

This patch does not solve the whole problem but we must not forget t o add these lines...
Comment 4 Benjamin Muskalla CLA 2009-08-23 07:38:14 EDT
Tim, is this bug fixed as part of bug 237268 ?
Comment 5 Tim Buschtoens CLA 2009-08-24 05:42:01 EDT
The snippet works fine for me with or without patch 145259. This is also what i actually would expect, since widgets are disposed on the client using "destruct", not "dispose". ( "destruct" does not dispose the children. )
Comment 6 RĂ¼diger Herrmann CLA 2009-08-24 07:24:19 EDT
Marking as FIXED.