Gaurav pls post useful answers not crap, or give me correct links at least to explain the problem. I don't get ur humorism and BTW i don't get any compile errors or runtime errors
Maybe I didn't explain properly the problem The bean-type i get from JSONP Request builder is <BeanData extends JavaScriptObject> and it works fine using its get methods. I can read the data properly and what else. The problem is when it's "saved" in something like this: private BeanData beanData; or this: private JavaScriptObject beanData; and it is passed to another class, the same "get" methods don't work anymore. They return empty values. any idea? Thanks, Julio On 11 Dic, 07:46, Gaurav Vaish <[email protected]> wrote: > Hi Julio, > > I think you need to first understand JavaScript before jumping on to > using GWT. > > Once you are done, and you understand why JavaScriptObject instances > can be type-"cast"ed from one type to another without giving any > compiletime or runtime errors, you will automatically have solution to > your problem! > > -- > Happy Hacking, > Gaurav Vaishhttp://www.mastergaurav.com > > On Dec 10, 9:08 pm, julio <[email protected]> wrote: > > > weird, it looks like i can pass through classes primitive values as > > int, char etc but not complex objects extending JavaScriptObject, cos > > I cannot cast them anymore (BTW no errors got, just empty values) > > > Julio > > > On Dec 10, 10:43 am, julio <[email protected]> wrote: > > > > before this: > > > > BeanData bd = data.createObject().cast(); > > > > I tried with a normal: > > > > BeanData bd = (BeanData) data; > > > > and: > > > > BeanData bd = data.cast(); > > > > but they don't work. > > > > BTW debugged them I saw that the data passed has the same refId of the > > > "original", so it looks like is just not cast at all. > > > > On Dec 10, 10:22 am, skrat <[email protected]> wrote: > > > > > You can't, what you do here is that you create new (and empty) > > > > JavaScriptObject, and cast it to your type. It seems that you think > > > > you're copying the object, but that's certainly not true. I'm not sure > > > > what the problem is, if you need to pass that instance to another > > > > class, you can do it without any tranformation. -- You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
