[swx] its been quite~

Ben Lagoutte ben.lagoutte at gozer.com.au
Tue Feb 12 16:40:22 PST 2008


Hi,

I have tried this solution of reusing the same static SWX instance 
throughout the application but it still crashes after a while..
It seems that after a while when too many simultaneous swx requests are 
thrown together it simply stops working, the caller of the swx request 
never receive any of the result, fault or timeout events. Also once this 
has occurred there doesn't seem to be any way to get it back to normal 
unless I restart the flash app, all further requests show the same behaviour

Any idea what's causing it??

Cheers
Ben

Nederflash (Folkert Hielema) wrote:
> You mean you want to create a class to let you do exactly what you want.
>
> If you create a singleton class which holds the SWX object as a private 
> variable (access through get and set methods). The Singleton class acts 
> as a gateway to your SWX. Like underneath (UEvent has EventDispatcher 
> init and stuff):
>
> import org.swxformat.*;
> import org.union.UEvent;
>
> class com.yourCompany.yourApp.gateway.SWXGateway extends UEvent
> {
> 	static var instance	: SWXGateway = null;
> 	private var _swx	: SWX; //instance of the real SWX
> 			
> 	public function SWXGateway()
> 	{
> 		// Create the SWX object
> 		_swx = new SWX();
> 		//set some vars default
> 		_swx.gateway = "http://swxformat.org/php/swx.php";
> 		_swx.encoding = "POST";
> 		_swx.debug = true;
> 		_swx.timeout = 15;
> 	}
> 	
> 	public function get swx():SWX
> 	{
> 		return _swx;
> 	}
> 	public static function getInstance()
> 	{
> 		instance = (instance!=null) ? instance : new SWXGateway();
> 		return instance;
> 	}	
> }
>
>
> You can then use it in lines like:
> var swx:SWX = YourSWXGateway.getInstance().swx;
>
> var callParams:Object =
> {
> 	serviceClass: "Jaiku",
> 	method: currentMethod,
> 	args: args,
> 	result: [this, onJaikuResult],
> 	timeout: [this, onJaikuTimeout],
> 	fault: [this, onSWXFault]
> }
> 		
> // Make the SWX call
> swx.call( this, callParams);
>
> After that just change the callParameters add your other 'serviceClass' 
> and go.
> I like to do the next thing after a call returned (this is for flash 
> lite pretty needed as you can do 1 call at the time in flashLite).
>
> off course the SWXGateway class could vary on implementation but you get 
> the idea ;)
> Hth,
>
> Folkert
>
>
> Erik Katerborg wrote:
>   
>> Well I'm still fooling around with building a twitter tool in flash. I'm 
>> making a small widget that can also post twitter messages, and the 
>> widget will go into the mac os X dashboard. I'll post it when it's 
>> presentable.
>>
>> It's still far from perfect but I really like working with SWX. The only 
>> thing that's bothering me (just a bit) is that you can't have multiple 
>> SWX instances. This would be handy when you use multiple services at the 
>> same time (getting flickr photos AND twitter messages).
>>
>> I've been using FUSE like you mentioned on your site, to do the 
>> animation. it's really convenient and a LOT faster than adobe's tweens!
>>
>>
>>
>>
>> On Feb 8, 2008 8:26 AM, Corban Baxter <corbanb at gmail.com 
>> <mailto:corbanb at gmail.com>> wrote:
>>
>>     What's everybody up too? Do anything new and exciting with SWX?
>>
>>     --
>>     Corban Baxter
>>     http://www.projectx4.com
>>
>>     _______________________________________________
>>     swx mailing list
>>     swx at osflash.org <mailto:swx at osflash.org>
>>     http://osflash.org/mailman/listinfo/swx_osflash.org
>>
>>
>>
>>
>> -- 
>> _____________________________
>> Erik Katerborg
>> Interface & Interaction design
>>
>> +31626706606
>> info at eerkmans.nl <mailto:info at eerkmans.nl>
>> www.eerkmans.nl <http://www.eerkmans.nl>
>> _____________________________
>>
>>
>> ------------------------------------------------------------------------
>>
>> _______________________________________________
>> swx mailing list
>> swx at osflash.org
>> http://osflash.org/mailman/listinfo/swx_osflash.org
>>
>>
>> ------------------------------------------------------------------------
>>
>> No virus found in this incoming message.
>> Checked by AVG Free Edition. 
>> Version: 7.5.516 / Virus Database: 269.19.21/1263 - Release Date: 6-2-2008 20:14
>>     
>
>
> _______________________________________________
> swx mailing list
> swx at osflash.org
> http://osflash.org/mailman/listinfo/swx_osflash.org
>
>   
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://osflash.org/pipermail/swx_osflash.org/attachments/20080213/4a7c2f72/attachment.html 


More information about the swx mailing list