You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
First off, thanks for creating such a great loading library :)
I started a new project today using ASC2.0 and found that AssetLoader is throwing errors due to invalid config values (in my case ConfigVO.type and ConfigVO.blendMode).
I've tracked it down to the XmlConfigParser.parseVo method. What is happening is that using the old compiler the XML attribute queries return null where the attribute does not exist, allowing the OR expression to select the value from the 'inheritFrom' VO. Using the new compiler, the attribute queries appear to be returning an empty XMLList. When assigned to the string properties in ConfigVO, you end up with empty strings for properties such as 'type', which breaks things later on.
child.type = xml.@type || inheritFrom.type;
So the above code will assign xml.@type even when it doesn't exist.
Now, I don't know whether to consider this a bug with ASC2.0 or AssetLoader, but I've found a couple of potential solutions I thought I'd run by you before submitting any pull request:
I'm sure there are several other ways to approach it too. Shame to lose the simple OR assignment, I'm a bit fan of its simplicity, but I really want to start using ASC2.0 and AssetLoader!
Thanks for your time,
Ian
The text was updated successfully, but these errors were encountered:
Thanks for pointing this out. I starting to use the ASC2.0 compiler as well and I will be fixing up Assetloader to support it sometime soon. As you may have noticed I promised v3 quite a while back, but due to workload, getting married, etc. I just didn't get round to it. I've got a half written version which I need to pick up on. But we should squeeze ASC2.0 compiler support in first. :)
Hi Matan,
First off, thanks for creating such a great loading library :)
I started a new project today using ASC2.0 and found that AssetLoader is throwing errors due to invalid config values (in my case ConfigVO.type and ConfigVO.blendMode).
I've tracked it down to the XmlConfigParser.parseVo method. What is happening is that using the old compiler the XML attribute queries return null where the attribute does not exist, allowing the OR expression to select the value from the 'inheritFrom' VO. Using the new compiler, the attribute queries appear to be returning an empty XMLList. When assigned to the string properties in ConfigVO, you end up with empty strings for properties such as 'type', which breaks things later on.
So the above code will assign xml.@type even when it doesn't exist.
Now, I don't know whether to consider this a bug with ASC2.0 or AssetLoader, but I've found a couple of potential solutions I thought I'd run by you before submitting any pull request:
I'm sure there are several other ways to approach it too. Shame to lose the simple OR assignment, I'm a bit fan of its simplicity, but I really want to start using ASC2.0 and AssetLoader!
Thanks for your time,
Ian
The text was updated successfully, but these errors were encountered: