Right now it doesn’t support singleton access.  Generally if you need to ensure a singleton you write a simple adapter object that can be instantiated and will proxy logic through the singleton.

 

Even if method A returns void you can still use the result event to indicate when it has completed (event.result may just be null).

 

Matt


From: flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] On Behalf Of Aly Sidi
Sent: Wednesday, October 12, 2005 12:46 PM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] mx:method

 

Thanks Matt
1. clear thank you.
2. Method A returns void
   ex : Method A is void Init( String host, String port )
          Method B is String Execute(String var1, String var2)
I kinda solved it by creating a Method C which calls Method A then B.

Is there a  concept of a static RemoteObject or a Singleton Design Pattern?

Ive tried the Singleton in my Java code, but it seems FLEX cant infer the Class Methods from a Property.

Although I do like teh asyn nature much better. I dont mind making mods...just wondering how far i can push the RemoteObject.. =)
-aly



On 10/11/05, Matt Chotin <[EMAIL PROTECTED]> wrote:

1. Multiple means that multiple calls to the same method are allowed before previous calls have returned.  This is the default behavior and what you're generally used to when calling any method.  We added a few more concurrency values to try to simplify logic if you really didn't want to think about the case of "what happens if someone sends again before the first call returned."  "single" means that once a call has gone out no other calls to the same method (off the same RemoteObject instance) are allowed until the first call returns.  Therefore you are guaranteed that the result event will only fire for that first call.  "last" is the opposite, if you call the method multiple times in a row only the last call will have its result returned in the result event.  However, all calls will make their way to the server, it's just the previous calls results or faults will be ignored.  This is mentioned somewhere in the docs I'm sure, just search for "concurrency"

 

2. Call remote object A, in the result handler for A call method B using the return values from A.

 

Matt

 

 

 


From: flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] On Behalf Of Aly Sidi
Sent: Monday, October 10, 2005 10:41 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] mx:method

 

quicl question about mx:method concurrency.
1. what do all the values mean : multiple, single, etc....i couldnt find specifc documentation

2. how do call 1 remote object method A that sets some inits, then use the properties in remote object method B

so A inits hostName and Port and B Executes something based on thos parameters

i know i can wrap it in one function but is there some way to use a singleton pattern or statics or something...or is this not possible because flex is async by nature per call??
-aly




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




Reply via email to