Hi,

I also have a couple of problems:
* How to configure RemoteObject for web2py?
* I suppose the flex files go on the static folder. But where goes the
crossdomain.xml?

I can do this with PyAMF using the SQLAlchemy example or the Twisted
how-to, but I would much rather do this with web2py. My reasons are:
* web2py ROCKS!!!! Txs Massimo
* I can have logic and especially models and the db shared between a
regular web2py / HTML application and a Flex Application.
* I think web2py could give a really good solution to many Python
developers looking to interact with Flex and the many Flex developers
not wanting to use Java to interact with a database.

Txs for any help,
Miguel

On Apr 18, 9:44 am, Alexei Vinidiktov <[email protected]>
wrote:
> Hi,
>
> Now that web2py natively supports amf-rpc, I'd like to make use of it
> but I need some guidance.
>
> I want to use web2py withFlex3. I know there is an example for Flash
> and amf0 athttp://mdp.cti.depaul.edu/AlterEgo/default/show/22,
> but I was wondering if there exists and example forFlex3.
>
> I have a test amfrpc service athttp://localhost:8000/rpc/default/call/amfrpc
>
> I don't know what I should assign to the destination attribute of the
> RemoteObject:
>
>  <mx:RemoteObject id="remoteObj" destination="test"
> endpoint="http://localhost:8000/rpc/default/call/amfrpc";>
>                      <mx:method name="test" result="onResult(event)"
> fault="onFault(event)"/>
>  </mx:RemoteObject>
>
> The full example forFlexthat I took from the pyamf website follows
> (I just changed some attribute values):
>
> <?xml version="1.0" encoding="utf-8"?>
>         <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml";
>                                         horizontalAlign="center" 
> verticalAlign="middle"
>                                         initialize="initApp()">
>
>                 <mx:RemoteObject id="remoteObj" destination="test"
> endpoint="http://localhost:8000/rpc/default/call/amfrpc";>
>                      <mx:method name="test" result="onResult(event)"
> fault="onFault(event)"/>
>                 </mx:RemoteObject>
>
>                 <mx:Script>
>                         <![CDATA[
>                                 import mx.rpc.events.FaultEvent;
>                                 import mx.rpc.events.ResultEvent;
>
>                         public function initApp(): void
>                         {
>                             // This var holds the data we want to pass to the
> remote service.
>                             var param:String = "Hello World!";
>
>                             // Call remote service to fetch data
>                             remoteObj.test( param );
>                         }
>
>                         // Result handler method
>                         private function onResult( re:ResultEvent ): void
>                         {
>                             var myData:String = re.result as String;
>                             trace( myData ); // prints "Hello World!"
>                             status_txt.text = myData;
>                         }
>
>                         // Fault handler method displays error message
>                         private function onFault( fault:FaultEvent ): void
>                         {
>                             // Notify the user of the problem
>                             status_txt.text = "Remoting error: \n";
>                             for ( var d:String in fault.fault ) {
>                                status_txt.text += fault.fault[d] + "\n";
>                             }
>                         }
>                         ]]>
>                 </mx:Script>
>
>                 <mx:TextArea id="status_txt" fontWeight="bold" width="100%"
> height="100%"/>
>
>         </mx:Application>
>
> Thanks.
>
> --
> Alexei Vinidiktov
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"web2py Web Framework" 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/web2py?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to