BulkLoader events not firing

20 views
Skip to first unread message

Alastair

unread,
Apr 8, 2012, 4:46:01 AM4/8/12
to BulkLoader users
Hey all,

Having a problem with the BulkLoader.COMPLETE not firing.

If I do:

var blTmp:BulkLoader = BulkLoader.getLoader('picsee friend');
blTmp.add(File.applicationStorageDirectory.resolvePath('actions/' +
fileName).url, {id:'friends' + _friend.fid});
blTmp.addEventListener(BulkLoader.COMPLETE, blComplete);
blTmp.start();

to add an event to a previously created BL instance the event simply
does not fire.

However, changing the code to:


var blTmp:BulkLoader = new BulkLoader('test');
blTmp.add(File.applicationStorageDirectory.resolvePath('actions/' +
fileName).url, {id:'friends' + _friend.fid});
blTmp.addEventListener(BulkLoader.COMPLETE, blComplete);
blTmp.start();

Fires the event as expected. Any help with this matter would be
excellent.

Thanks very much in advance,

Alastair

Artur Poniedziałek

unread,
Apr 8, 2012, 5:19:43 AM4/8/12
to bulkload...@googlegroups.com

Hi!

I don't know how is the rest of your code but probably it would be
better if you did such comparison:

var blTmp:BulkLoader = BulkLoader.getLoader('picsee friend');

if( blTmp == null)
{
blTmp = new BulkLoader('picsee friend' );
}

And check the next two things:

- does file File.applicatonStorageDirectory.resolvePath('actons/' +
fileName).url was previously added ?
- don't use loader names with white spaces
- add progress and error BulkLoader events and put breakpoints or trace
in the method to check you got them

W dniu 2012-04-08 10:46, Alastair pisze:


--
Pozdrawiam serdecznie
Artur Poniedziałek
Asystent Kierownika Zespołu - Novision
tel. 516-766-151

www.seminariumbiznesowe.pl
www.seminariumbiznesowe.com
www.novision.pl
www.rentierklub.com.pl
www.bogatedziecko.pl
www.seminariummilionerow.pl
www.akademialiderow.eu
www.konferencjafinansowa.pl

"Kiedy robimy więcej, niż to, za co nam płacą, w końcu będą nam płacić więcej, za to, co robimy." - Zig Ziglar

*Jeżeli nie wyrażasz zgody na otrzymywanie tego typu informacji odpowiedz na tego maila w temacie wpisując: "DZIEKUJĘ".

Alastair

unread,
Apr 8, 2012, 5:24:24 AM4/8/12
to BulkLoader users
Hi Artur,

Thanks very much for your quick response. I'm going to try your
suggestions and see how I get along with that! The key ('actions/' +
fileName) did exist previously now I look at my code again. In this
code I'm trying to replace an existing image or create a new image
depending on the user's actions. If I need to update the image, how
would I manage that with bulk loader? Would I need to delete the asset
from bulk loader and then recreate it?

Thanks again!

Alastair

On Apr 8, 7:19 pm, Artur Poniedziałek <arturponiedzia...@gmail.com>
wrote:

Artur Poniedziałek

unread,
Apr 8, 2012, 5:32:12 AM4/8/12
to bulkload...@googlegroups.com
Probably the best thing you can do is creating new name for the file
even for the same image, then you don't have the problems with files
that previously could not be uploaded (some errors that stop uploading).
To manage such behaviour you can create your own list of file names
aparently from bulkloader.

"Would I need to delete the asset from bulk loader and then recreate

it" - from my experience with bulkloader - YES.
and remember to delete event listeners

W dniu 2012-04-08 11:24, Alastair pisze:


> Hi Artur,
>
> Thanks very much for your quick response. I'm going to try your
> suggestions and see how I get along with that! The key ('actions/' +
> fileName) did exist previously now I look at my code again. In this
> code I'm trying to replace an existing image or create a new image
> depending on the user's actions. If I need to update the image, how
> would I manage that with bulk loader? Would I need to delete the asset
> from bulk loader and then recreate it?
>
> Thanks again!
>
> Alastair
>

> On Apr 8, 7:19 pm, Artur Poniedzia�ek<arturponiedzia...@gmail.com>

>> Artur Poniedzia�ek
>> Asystent Kierownika Zespo�u - Novision
>> tel. 516-766-151
>>
>> www.seminariumbiznesowe.plwww.seminariumbiznesowe.comwww.novision.plwww.rentierklub.com.plwww.bogatedziecko.plwww.seminariummilionerow.plwww.akademialiderow.euwww.konferencjafinansowa.pl
>>
>> "Kiedy robimy wi�cej, ni� to, za co nam p�ac�, w ko�cu b�d� nam p�aci� wi�cej, za to, co robimy." - Zig Ziglar
>>
>> *Je�eli nie wyra�asz zgody na otrzymywanie tego typu informacji odpowiedz na tego maila w temacie wpisuj�c: "DZIEKUJ�".


--
Pozdrawiam serdecznie
Artur Poniedzia�ek
Asystent Kierownika Zespo�u - Novision
tel. 516-766-151

"Kiedy robimy wi�cej, ni� to, za co nam p�ac�, w ko�cu b�d� nam p�aci� wi�cej, za to, co robimy." - Zig Ziglar

*Je�eli nie wyra�asz zgody na otrzymywanie tego typu informacji odpowiedz na tego maila w temacie wpisuj�c: "DZIEKUJ�".

Reply all
Reply to author
Forward
0 new messages