I'm trying to create a list with some custom functionality, and I want to be able to re-use it with different skins for different situations. I made a simple list class, and started filling out it's functionality, then I realized I couldn't set the skinClass property from outside anymore!
So, in a file called CustomList.mxml within an RSL library, I define the most basic sparks list:
<!-- Place non-visual elements (e.g., services, value objects) here -->
Then, in a module, I create one of these lists and try to assign it a skin class:
<CustomList id="receiptList" height="100%" width="100%" skinClass="skins.CustomListSkin" itemRenderer="renderers.CustomItemRenderer" />
And I get a compiler error: Cannot resolve attribute "SkinClass" for component type controls.CustomList.
Why can I not do this? I could set the skinclass directly in customlist.mxml in the tag at the top, but it is inaccessible from outside! Also, if I changed the tag in the module to say just "s:List" instead of "CustomList", it works fine. Can someone point me in the right direction?
Nevermind! Nevermind. I had two classes named CustomList in two different libraries, and my module was all confused. I spent hours on this problem. This is the king of stupid mistakes.
Sorry to trouble you all.