Re: [Flashcoders] Re: is it ever ideal to NOT use weak references?

2010-02-07 Thread Henrik Andersson
Steven Sacks wrote: Guess what never fires? If you guessed onComplete, you win the prize. You do realize that this is not guaranteed, right? It might not fire, but it may also do fire. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com

RE: [Flashcoders] Re: is it ever ideal to NOT use weak references?

2010-02-07 Thread Cor
Could you give an example of the way you use the strong listener? TIA -Original Message- From: flashcoders-boun...@chattyfig.figleaf.com [mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Steven Sacks Sent: zondag 7 februari 2010 4:32 To: Flash Coders List Subject: Re:

Re: [Flashcoders] Re: is it ever ideal to NOT use weak references?

2010-02-07 Thread wdb
Yes, I am doing the same because the trouble weak event listeners can cause. function loadImage():void { var loader:URLLoader = new URLLoader(); loader.addEventListener(Event.COMPLETE, onComplete, false, 0, true); loader.load(new URLRequest(url)); } function

[Flashcoders] hs_err_pid WAS: E4X, it's just not my day.

2010-02-07 Thread Mendelsohn, Michael
Thanks for still thinking about this over the weekend Jason. :-) I've also been thinking about the aso files. I deleted them and it didn't make much difference. I seem to have a bigger problem now: I have a mysterious hs_err_pid12334.log file that's been created next to my flp. I've never

Re: [Flashcoders] Re: is it ever ideal to NOT use weak references?

2010-02-07 Thread Steven Sacks
function onComplete(event:Event):void { event.target.removeEventListener(Event.COMPLETE, onComplete); } Easy peasy. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Re: [Flashcoders] Re: is it ever ideal to NOT use weak references?

2010-02-07 Thread Piers Cowburn
I use a strong listener only when I know I'm not holding a reference to the dispatcher anywhere else. In all other cases, i.e. if I know I'm going to be keeping the dispatcher on the display list (if it's a DisplayObject) until I no longer need it, or if I know I'm storing a reference the

Re: [Flashcoders] hs_err_pid WAS: E4X, it's just not my day.

2010-02-07 Thread Dave Watts
I seem to have a bigger problem now: I have a mysterious hs_err_pid12334.log file that's been created next to my flp.  I've never seen this before, so I searched for it.  It's some sort of java runtime error log, but I don't get why it would appear with Flash.  Flash now won't let me debug,

[Flashcoders] [JOB] e-Learning Programmer (Newport News, VA)

2010-02-07 Thread Charles Parcell
This is a job posting that we have currently open for a position in my office. This person will be working directly with me. Please pass this on to anyone you may know with these skills or may know someone with these skills. The three skills that I think are most important are... 1. Flash

RE: [Flashcoders] Re: is it ever ideal to NOT use weak references?

2010-02-07 Thread Cor
Oooh, OK, it is also the way I do it. I didn't understand the difference between strong and weakly. Not my native language, I am Dutch. Thanks for clearing it to me! -Original Message- From: flashcoders-boun...@chattyfig.figleaf.com [mailto:flashcoders-boun...@chattyfig.figleaf.com]

Re: [Flashcoders] Re: is it ever ideal to NOT use weak references?

2010-02-07 Thread Christoffer Enedahl
Piers Cowburn skrev: That way, if I forget to remove the event listener in a destroy method or whatever, it should still end up eligible for GC. Cases where the event doesn't fire because a weak reference was used only happen if there are no strong references anywhere else, so the object