Jump to content
Search Community

LoaderMax.strictMode = true?

Steve test
Moderator Tag

Recommended Posts

Hi Jack,

 

Loving your work with LoaderMax, and of course TweenLite/Max. You're a real hero!

 

However, one thing I've noticed is that LoaderMax doesn't seem to throw errors when things aren't found, etc.

 

Whilst I appreciate this makes it more accessible to the masses, it can turn bug-tracking into a bit of a wild goose chase.

 

I was wondering therefore if you would ever consider adding some sort of strict-mode to LoaderMax?

 

I would love to hear your thoughts on this...

 

Cheers,

 

Steve

Link to comment
Share on other sites

Well, Steve, I actually tried to make error handling easier with LoaderMax, not harder. Here's how:

 

1) Errors bubble up through the hierarchy, so if you have a loader nested inside of a LoaderMax that's inside of another LoaderMax, any errors on that nested loader will be dispatched by that loader and all of its ancestors (the two LoaderMax instances in this case). That means you don't have to fret about adding listeners to all of your loaders - you could just listen for errors on the parent LoaderMax.

 

2) With loading, you typically don't want the show-stopping effects of true Errors getting thrown. I can't tell you how many times I've seen this on the web - one hiccup on the server and the swf comes to a grinding halt and throws an error. I realize your suggestion would allow folks to kick on or off the strictMode to control that sort of thing (which is cool) - I'd just hope people remember to turn it off.

 

3) You don't need to listen for the various different types of errors (IO_ERROR, SECURITY_ERROR, etc.) - there's a common LoaderEvent.ERROR that handles 'em all. Of course the specific ones are dispatched as well if you want to get granular.

 

4) I force a trace() whenever an error occurs which should help with debugging (otherwise folks who forget to listen for ERROR or FAIL events might be clueless about why their app isn't working).

 

All that being said, maybe there still is a good enough reason to add a strictMode feature that would justify the extra kb it would cost - could you explain why you think it would be valuable in light of the points I mentioned above? Is there a particular scenario in which LoaderMax falls short?

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...