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
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:
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
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
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
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
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,
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
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]
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
10 matches
Mail list logo