Closed GoogleCodeExporter closed 9 years ago
Hi Bach44.
If an instance has been cleared, nothing will work. It's not a bug really, but
a feature.
The clear method is a shortcut to remove everything from it, and therefore it
must necessarily nullify it.
This is documented on the clear doc :
http://media.stimuli.com.br/projects/bulk-
loader/docs/br/com/stimuli/loading/BulkLoader.html#clear()
Cheers
Original comment by debert
on 30 Oct 2009 at 10:05
Yes I'm familiar with the documentation, yet can think of no reason why I
shouldn't always be able to retrieve
a loader instance.
In a component class within an added to stage handler, I am calling
//CODE START
protected var _loader:BulkLoader
//then within the handler
_loader = BulkLoader.getLoader( "imgsLoader" )
//CODE END
This works the first time I reference it in a sub class.
However, later on, when I need to reference the exact same loader, '_loader' is
null
WTF?
Original comment by bac...@gmail.com
on 4 Nov 2009 at 4:13
Hi Bach.
The missing information here is if you are calling loader.clear().
If you aren't, it's a bug and please let me know so I can fix.
If you are calling clear, why should be able to access the same loader? It's
not the
same loader. Once you've called clear, it's lost all of it's events, all of its
assets, all of
it's connections. Whatever you were willing to do with that loader instance
will fail, so
we nullify the reference to make that easier to grasp.
What I mean is that it should have named the 'clear' method to
'nukeEverythingAndMakeThisInstanceTotallyUselessForever'
If you wish to remove items from a instance and to keep using that instance,
then the
removeAll is the method to call.
Cheers
Arthur
Original comment by debert
on 4 Nov 2009 at 5:18
Original issue reported on code.google.com by
bac...@gmail.com
on 30 Oct 2009 at 9:35