Here is an example that uses a shared object to store an object and
retrieve the value of a property.  RegisterClass is not necessary.
Tracy

<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.macromedia.com/2003/mxml";
        initialize="initApp()">
<mx:Script><![CDATA[
        private var goLSO:SharedObject;
        private var oMyObject:Object;
        private function initApp():Void{
                oMyObject = new Object()
                goLSO = SharedObject.getLocal("testlso", "/");
                tiLSOValue.text = goLSO.data.test1;
        }
        
        private function showLSOValue():Void{
                goLSO = SharedObject.getLocal("testlso", "/");
                tiLSOValue.text = goLSO.data.test1;
                alert("goLSO.data.test1 == " + goLSO.data.test1 +
"\n\ngoLSO.data.testObj ==" + goLSO.data.testObj.data1);
        }
        
        private function setLSO(event):Void
        {
                oMyObject.data1 = tiLSOValue.text;
                goLSO.data.test1 = tiLSOValue.text;
                goLSO.data.testObj = oMyObject;
                goLSO.flush();
        }
]]></mx:Script>
        <mx:Button label="Show LSO Value" click="showLSOValue()"/>
        <mx:TextInput id="tiLSOValue" focusOut="setLSO()"/>
</mx:Application>

-----Original Message-----
From: [email protected] [mailto:[EMAIL PROTECTED] On
Behalf Of im_sean_s
Sent: Wednesday, January 25, 2006 10:14 PM
To: [email protected]
Subject: [flexcoders] Re: Flash Remoting with Registered Objects

Rob,

Thanks for your quick reply.  I am using registerClass() so that the
object can be saved as a shared object on the client, until the user
is ready to submit the form.  I tried it without doing this, and it
did not work.  The problem I am having is that once the class is
registered, I cannot send an instance of that class to CF.

Thank you,
Sean

--- In [email protected], "Rob Rusher" <[EMAIL PROTECTED]> wrote:
>
> You don't need to use the registerObject(). That is for Java
back-ends.
> 
> Rob Rusher
> 
>  
> 
> RIA Consultant
> 
> Macromedia Certified Flex Instructor
> 
> e:[EMAIL PROTECTED] c:303.885.7044 im:robrusher
> 
> 
> -----Original Message-----
> From: [email protected] [mailto:[EMAIL PROTECTED]
On
> Behalf Of im_sean_s
> Sent: Wednesday, January 25, 2006 7:25 PM
> To: [email protected]
> Subject: [flexcoders] Re: Flash Remoting with Registered Objects
> 
> Sorry, I should have mentioned that I'm using Flex 1.5 with a
> ColdFusion 7 back-end.
> 
> --- In [email protected], "im_sean_s" <[EMAIL PROTECTED]> wrote:
> >
> > Hello all!  I was wondering if someone could give me a hand.  I am
> > currently working on a Flex application that takes the user through
a
> > multi-step form.  Since completing the form requires some thought
and
> > planning, I am using a sharedObject to store the data from each
step.
> >  In order to accomplish this, I have to register my classes using
> > Object.registerObject().  All of this works fine, however when I
> > attempt to submit all the form data, using Flash Remoting, I get an
> > error stating that the data type cannot be converted.  The object
was
> > submitting fine when I was sending an unregistered class, but now it
> > does not work.  Any insight you can provide would be greatly
> appreciated.
> > 
> > Thank you,
> > Sean
> >
> 
> 
> 
> 
> 
> 
> --
> Flexcoders Mailing List
> FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
> Search Archives:
http://www.mail-archive.com/flexcoders%40yahoogroups.com 
> Yahoo! Groups Links
>






--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives:
http://www.mail-archive.com/flexcoders%40yahoogroups.com 
Yahoo! Groups Links



 






--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/flexcoders/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 



Reply via email to