Re: [flexcoders] Re: Help Me for SharedObject and registerClassAlias method

2009-02-16 Thread Braam Genis
Use the metadata tag [RemoteClass(alias=WindowInfo)] above your WindowInfo class declaration and your objects should be typed when you retrieve them from SharedObject. On Sun, Feb 15, 2009 at 3:59 PM, valdhor valdhorli...@embarqmail.comwrote: I don't think you can do that. A SharedObject is

Re: [flexcoders] Re: Help Me for SharedObject and registerClassAlias method

2009-02-16 Thread Johannes Nel
watch out for classes that take arguments in the constructer or java style enums. On Mon, Feb 16, 2009 at 12:07 AM, Braam Genis braamge...@gmail.com wrote: Use the metadata tag [RemoteClass(alias=WindowInfo)] above your WindowInfo class declaration and your objects should be typed when you

[flexcoders] Re: Help Me for SharedObject and registerClassAlias method

2009-02-16 Thread djepyon
What you're saying here works, but you can definitely use RegisterClassAlias to get strongly typed objects when storing/retrieving data from a SharedObject or anything else AMF2 based (LocalConnection for example). This would prevent the need to cast any objects. --- In

Re: [flexcoders] Re: Help Me for SharedObject and registerClassAlias method

2009-02-16 Thread Peter Hall
I'm not sure what you mean about casting in this context. Also, I guess you meant AMF3 when you said AMF2? (with AMF0/ AS2, you can use Object.registerClass() for the same effect). In AS3, registerClassAlias() is the way to make this work. But, as Braam said, [RemoteClass] is the simplest way: it

[flexcoders] Re: Help Me for SharedObject and registerClassAlias method

2009-02-15 Thread valdhor
I don't think you can do that. A SharedObject is just an object. What you would need to do is put the WindowInfo objects you want to store into an array and store the array in the SharedObject. When you want to retrieve the WindowInfo objects, read them into an array and coerce each array item