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

Bug 377427

Summary: Ambiguous type of image property in protocol
Product: [RT] RAP Reporter: Johannes Eickhold <jeick>
Component: RWTAssignee: Project Inbox <rap-inbox>
Status: RESOLVED FIXED QA Contact:
Severity: major    
Priority: P3    
Version: 1.5   
Target Milestone: 1.5 M7   
Hardware: All   
OS: All   
Whiteboard:

Description Johannes Eickhold CLA 2012-04-23 12:14:08 EDT
The type of the image property is ambiguous when creating different widgets. When creating a shell with an image in the title the property is a plain String. In other contexts (e.g. ) the image property is a triple (String, int, int).
This ambiguity makes it difficult to implement the protocol on the Android platform.
I suggest to unify the type of this property to a JSON list in all occurrences.

Example of the image property being a plain String when creating a shell:
"operations": [ [ "create", "w9", "rwt.widgets.Shell", {
"style": [ "CLOSE", "TITLE", "APPLICATION_MODAL", "BORDER" ],
"image": "rwt-resources/generated/f3637e6",
"text": "Dialog",
"active": true,
"minimumSize": [ 80, 64 ],
"activeControl": "w10",
"bounds": [ 462, 227, 149, 242 ],
"children": [ "w10", "w11" ],
"tabIndex": -1,
"visibility": true
} ...

Example of the image property being a JSON list when creating a label with an image and changing the image later:
"operations": [ ... [ "create", "w41", "rwt.widgets.Label", {
"parent": "w18",
"style": [ "NONE" ],
"bounds": [ 5, 6, 30, 30 ],
"tabIndex": -1,
"image": [ "rwt-resources/generated/86ecca70", 30, 30 ]
} ] ...

"operations": [ [ "set", "w41", {
"image": [ "rwt-resources/generated/76b2ffaf", 30, 30 ]
} ] ]
Comment 1 Ivan Furnadjiev CLA 2012-04-23 13:59:28 EDT
Shell image is now rendered as all other images - "image": [ "rwt-resources/generated/76b2ffaf", 30, 30 ]. Changes are in CVS HEAD.
Comment 2 Johannes Eickhold CLA 2012-04-24 05:38:02 EDT
Thanks Ivan!