Hi again,

Im trying to create a business delegate class for handling a connection 
to, for example, an xml socket.

When trying to delegate onXML to the responder it keeps on saying there 
is not such property on the responder, but of course there is. If I 
define the function inside de business delegate class, it works 
(changing responder.myOnXML for myOnXML, of course)

I have something like this on my command class:

class org.nevis.cairngorm.prexon.commands.SubscribeCommand implements 
Command, Responder {
   public function execute( event:Event ) : Void {
    var delegate: SubscriberDelegate = new SubscriberDelegate( this );    
    delegate.subscribe( );
}

public function myOnXML( event : Object ): Void {
        mx.core.Application.alert("RESPONDER OK");
}
..
}

And the business delegate has:
....
this.responder = responder; (the parameter for the class)
myListener.onXML = Delegate.create( responder, responder.myOnXML );
...

What Im I doing wrong? Is it okay setting a responder here? Cause I have 
to define a result and fault handler im never using for this kind of 
services...


Alberto Albericio Salvador escribió:

>No problem Alex, I was looking for the easy way. I will make a look at 
>those papers.
>
>Thanks anyway
>
>Alex Uhlmann escribió:
>
>  
>
>>Alberto,
>>
>>the Flash Player's SharedObject class listens to server pushes. There's much 
>>information on remote SharedObjects in Macromedia documentations such as the 
>>FlashComm Live docs. Sorry, I don't have a generic example right now that 
>>doesn't belong to a client.
>>
>>hope it helps,
>>Alex
>>
>>--
>>Alex Uhlmann
>>Software Engineer
>>iteration::two
>>
>>
>>-----Original Message-----
>>From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] Behalf Of Alberto 
>>Albericio Salvador
>>Sent: 30 August 2005 14:25
>>To: flexcoders@yahoogroups.com
>>Subject: Re: [flexcoders] Re: Cairngorm question
>>
>>
>>Hi Alex,
>>
>>I like the idea of "Listeners" and they way you point to manage server
>>pushes injecting events and data to the Cairngorm architecture. Mainly
>>because server pushes are treat just like if they were data from a
>>user-gesture.
>>
>>If possible, send me a sample code for one of these "Listeners", just a
>>short one so I can see how to initialise the subscription and how
>>handlers for server pushes are defined. I can imagine it's somehow
>>similar to a business delegate class calling a remoteobject but I dont
>>see how to leave these services "in the background" listening and
>>waiting for server pushes.
>>
>>Thanks for your help Alex.
>>
>>
>>Alex Uhlmann escribió:
>>
>> 
>>
>>    
>>
>>>Hi Alberto,
>>>
>>>
>>>in addition to what Dan said, you could create an object similar to Business 
>>>Delegates used for request/response remote calls - in applications that we 
>>>have developed, we call these "Listeners".
>>>
>>>These listeners provide control and protection for your server push remote 
>>>services. In here, you could implement functionality as recovery plans, 
>>>disconnecting etc. In these listeners, we would typically subscribe to 
>>>server-side shared objects. When we receive notification of changes to the 
>>>shared object, we then convert untyped FlashComm data into VOs, before using 
>>>the EventBroadcaster in our listener to broadcast events plus data. So the 
>>>listener is really just another way of injecting an event into the Cairngorm 
>>>architecture, other than a user-gesture.
>>>
>>>In this way, the commands are unaware as to whether the events that called 
>>>them, and the data accompanying these events, was pushed from the server 
>>>(via FlashComm) or generated on the client. Everything else about your 
>>>Cairngorm architecture remains the same - using the ModelLocator for 
>>>instance, to have your commands updating the model, and binding the view to 
>>>the state of your model.
>>>
>>>Depending on the complexity of your application, we might suggest further 
>>>refactorings, i.e. outsourcing functionality of listeners to other classes 
>>>such as recovery plans.
>>>
>>>
>>>Best,
>>>Alex
>>>
>>>--
>>>Alex Uhlmann
>>>Software Engineer
>>>iteration::two
>>>
>>>
>>>-----Original Message-----
>>>From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] Behalf Of Daniel 
>>>Harfleet
>>>Sent: 30 August 2005 10:10
>>>To: flexcoders@yahoogroups.com
>>>Subject: [flexcoders] Re: Cairngorm question
>>>
>>>
>>>Alberto,
>>>
>>>this seems a fair approach to me, you may also want to include some
>>>logic to disconnect from the flash comm server when you know you are
>>>not interested in receiving updates and maybe even a 'recovery plan'
>>>for the service should the connection to the FCS be broken.
>>>
>>>rgds
>>>
>>>dan
>>>
>>>--- In flexcoders@yahoogroups.com, Alberto Albericio Salvador
>>><[EMAIL PROTECTED]> wrote:
>>>
>>>
>>>   
>>>
>>>      
>>>
>>>>Hi all,
>>>>
>>>>The Cairngorm samples are a great resource for understanding how to
>>>>
>>>>
>>>>     
>>>>
>>>>        
>>>>
>>>best
>>>
>>>
>>>   
>>>
>>>      
>>>
>>>>arquitect an specific kind of applications; in this case, applications
>>>>that talk syncly with some servers that expose some services.
>>>>
>>>>Imagine now that Im building an application which implements,
>>>>
>>>>
>>>>     
>>>>
>>>>        
>>>>
>>>somewhere,
>>>
>>>
>>>   
>>>
>>>      
>>>
>>>>some kind of asynchronous services: a flash comm server chat , for
>>>>example. This "service" must be running, in the background, even if im
>>>>visually working in another part of the application, entering some data
>>>>for new providers or whatever. So the question is, where is the best
>>>>place to initialise these services? Or how can I place/work with these
>>>>services within this arquitecture?
>>>>
>>>>My choice would probably be to initialise evrything inside a
>>>>"initialise()" function in the model locator and then use some public
>>>>var there to control msgs and status of this "service" and then bind
>>>>
>>>>
>>>>     
>>>>
>>>>        
>>>>
>>>the
>>>
>>>
>>>   
>>>
>>>      
>>>
>>>>chat components to these vars.
>>>>
>>>>I hope someone can help chosing the best option.
>>>>
>>>>Thanks all in advance.
>>>>
>>>>--
>>>>Alberto Albericio Salvador
>>>>Aura S.A. Seguros
>>>>Departamento Informática
>>>>
>>>>
>>>>     
>>>>
>>>>        
>>>>
>>>
>>>--
>>>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
>>>
>>>Visit your group "flexcoders" on the web.
>>>
>>>To unsubscribe from this group, send an email to:
>>>[EMAIL PROTECTED]
>>>
>>>Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
>>>
>>>
>>>
>>>--
>>>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
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>   
>>>
>>>      
>>>
>>--
>>Alberto Albericio Salvador
>>Aura S.A. Seguros
>>Departamento Informática
>>
>>
>>
>>--
>>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
>>
>>Visit your group "flexcoders" on the web.
>>
>>To unsubscribe from this group, send an email to:
>>[EMAIL PROTECTED]
>>
>>Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service. 
>>
>>
>>
>>--
>>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
>>
>>
>>
>>
>>
>>
>>
>> 
>>
>>    
>>
>
>
>  
>


-- 
Alberto Albericio Salvador
Aura S.A. Seguros
Departamento Informática



------------------------ Yahoo! Groups Sponsor --------------------~--> 
Most low income households are not online. Help bridge the digital divide today!
http://us.click.yahoo.com/cd_AJB/QnQLAA/TtwFAA/nhFolB/TM
--------------------------------------------------------------------~-> 

--
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