Home RSS

Using BulkLoader with FDT and Eliminating Parsing Errors

I have been using the open source BulkLoader AS3 classes since I read about it a few months back on the developer Arthur Debert's blog. When I first used the classes in FDT, the editor shows that the classes have errors in BulkLoader.as and LoadingItem.as. However, the project would still compile without issue so I just kept on coding, ignoring the little "x" as I finished the project. The issue is even marked as "WontFix" in the project's issue database on Google Code.

I am setting up a new project in which I intend to use BulkLoader once again -- and this time I'd prefer not to have FDT barking at me about code which I know compiles correctly, even in strict mode. So, I spent a few minutes and dug up how to fix the issues so that FDT quits complaining. Hopefully this saves someone else the time, and allows you to know your code is really error-free at a glance.

The issue has a proposed fix in the Google Code issue database, but *warning* you'll want to stay away from it, as the fix partially leads to more issues. The correct fix is actually found deep in FDT's forums, the gist of which is:

First, on lines 201-207 of LoadingItem.as remove all of the quotation marks and add a semi-colon at the end of the object definition. These lines should now read:

private static var classes : Object= {
loader: Loader,
xml: URLLoader,
sound: Sound,
text: URLLoader

Second, change line 958 of BulkLoader.as to:

var res : * = item.content as type;

Note that the line numbers are for revision 107 : and may change in future revisions.

Arthur Debert said,

January 26, 2008 @ 9:10 am

Hi Jon.

I’ve been insanely busy the last three weeks for a site launch, and haven’t managed to hack bulk loader much. Hopefully, in a couple of days I’ll resume work on it and look further into it.

Thanks for the tip.

The thing though is that this is a bug on FDT’s parser. I’ve exchanged emails with one of the developers, and they acknowledge the bug, and said they’ll fix it soon. This is valid AS3 code, and to me it does seem reasonable (your milage may vary though).

Thanks for using (and helping improve) BulkLoader. I’ll look into this with care soon.

Arthur Debert

Jon MacDonald said,

January 26, 2008 @ 10:46 am

Arthur —

I completely understand that this is an FDT issue, as the FDT team even states so in the forum I linked to above. Apparently it isn’t a high priority on their list of bugs to fix, but they know about it and have committed to fixing it.

Thanks for contributing a great project to the community!

Arthur Debert said,

February 5, 2008 @ 7:56 am

Hi Jon.

The FDT fix was taking too long.
This one got fixed (hopefully) on rev 111. I don’t have a license for FDT, so I can’t be 100% sure it’s fixed, and it would be great to have an FDT user confirm the fix worked.

Thanks for the report,

Arthur Debert

Owen van Dijk said,

February 27, 2008 @ 5:37 am

I’m using FDT 3.0 and fix as mentioned works :)

jlister said,

October 22, 2008 @ 6:51 am

There is a little trick to prevent external class libraries from creating errors/warnings in Eclipse. Make a separate source folder (eg ‘ext’) for external libraries, then add it to the class path. Right click the project, go ‘Properties >> FDT Build Path’ to see the list of source folders. Select the ‘ext’ folder and uncheck ‘Generate Problems/Tasks’. Then you will only get warnings for your own mistakes :)

jonnymac blog » FDT Tip: Turning Off Error Notices for External Classes said,

November 18, 2008 @ 2:17 pm

[…] had blogged about this exact issue when using BulkLoader a while back, and in that case I had resorted to altering the code so the errors would go away. […]

RSS feed for comments on this post

Powered by WordPress.