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

Bug 367195

Summary: Support passing any from an EGL service and casting into a concrete type in RUI
Product: z_Archived Reporter: Will Smythe <smythew>
Component: EDTAssignee: Joseph Vincens <jvincens>
Status: NEW --- QA Contact:
Severity: enhancement    
Priority: P3 CC: mheitz, pharmon, svihovec, tww
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Attachments:
Description Flags
Sample project (created in EWDT 0.7) none

Description Will Smythe CLA 2011-12-20 09:54:09 EST
Created attachment 208619 [details]
Sample project (created in EWDT 0.7)

See the attached project. It contains a simple service and RUI handler. The service has 2 functions (getCustomer and getCustomers) that returns a Results record (Results contains some status fields - like 'succeeded' - and also a 'data' field which is of type 'any?'). I am able to construct a Results record, return it from my service functions, and the data (when viewed in the debugger) is getting passed, but I am not able to 'cast' it into a concrete type (in my example: Customer).

Regardless of the complexities, I believe a developer - who is building an end-to-end app - with EGL, should be able to set and return an 'any' variable (either as the return type of a service function or as a field in a record) and be able to cast it into its original type on the client. If the developer attempts to cast the Any into a type that cannot be cast into, it should fail (just like any bad cast).
Comment 1 Will Smythe CLA 2011-12-20 09:55:44 EST
Not sure if this enhancement is related/helped by bug 353401, but am noting it just in case.