FileReference Bug - it just doesn’t load…
20. März 2010
While working on Tilerator i found some strange behaviour on FileReference. Code as follows:
private function selectFile():void{
var f:FileReference=new FileReference();
f.addEventListener(Event.SELECT, loadFile);
f.addEventListener(Event.COMPLETE, parseFile);
f.browse();
}
private function loadFile(e:Event){
var fr:FileReference=FileReference(e.target);
fr.load();
}
private function parseFile(e:Event){
var fr:FileReference=FileReference(e.target);
trace('loading completed');
//never fires
}
Problem:
Even a progress event is rarely fired. The File just won’t load. Pretty annoying - especially when you eagerly want to load some data you’ve been storing away before.
Solution:
FileReference f might be eaten by some really motivated garbage collector, though it still has some event listeners attached. Making f a field var helps.
Purchase@Cheap.Advair” rel=”nofollow”>.…
Buygeneric pills oir…
aciphex@muscle.pain” rel=”nofollow”>..…
Buygeneric pills…
alberta alcohol and drug abuse commission…
Buy_generic meds…
recipes for gastric bypass patients…
Buy_now…
accutane birth defects…
Buy_it now…
dependent disorder anxiety…
Buy_generic pills…
herbal flee collars for dogs…
Buy_generic pills…
statistics on pregnancy in high school…
Buy_generic meds…
cures for fingernail fungi…
Buy_generic meds…
st joseph aspirin coupon…
Buy_generic pills…
altitude and pregnancy…
Buy_it now…
glucophage powered by vbulletin version 2.2.1…
Buy_generic pills…
medical nebulizer…
Buy_generic meds…
air purifiers for allergies…
Buy_generic meds…