Starling-Framework icon indicating copy to clipboard operation
Starling-Framework copied to clipboard

AssetManager enqueuing File subclass won't work

Open SamYStudiO opened this issue 10 years ago • 5 comments

Hi Daniel,

i know it's pretty uncommon to subclass File class but if you do so you won't be able to enque those files using AssetManager.

SamYStudiO avatar Dec 06 '15 22:12 SamYStudiO

What exactly do you mean with "won't work"?

(... I guess that it doesn't take that class directly, but will just get the URL and create a new File instance, right?)

PrimaryFeather avatar Dec 07 '15 15:12 PrimaryFeather

Yep exactly you need to convert your subclass to a File instance to make it works. This is really minor but i guess making work File and all File subclasses should'nt be a tough one? ;) (Maybe using getQualifiedSuperclassName?)

SamYStudiO avatar Dec 07 '15 16:12 SamYStudiO

I'll have to look into that, I'm not sure it's that easy. :wink: How critical is that for you? I'll create a new version of the AssetManager either for or shortly after the Starling 2 release; that would be a perfect time to look into that, but this will take until early 2016 ...

Perhaps you can use another workaround for now? I'd have to spend much time on the class knowing that I'll rewrite everything soon, as you can imagine ... :wink:

PrimaryFeather avatar Dec 07 '15 16:12 PrimaryFeather

As i said this is really minor, more a suggestion, so you may add this for later ;)

SamYStudiO avatar Dec 07 '15 16:12 SamYStudiO

Perfect, thanks for your understanding! :smile:

PrimaryFeather avatar Dec 07 '15 16:12 PrimaryFeather