flex-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Frank <David.Fr...@on24.com>
Subject RE: Flex 4.6 Spark Skin question
Date Mon, 09 Feb 2015 18:44:38 GMT
Hi Scott,

The linking of all the projects and sub-projects into the style project finally fixed Issue
no. 2.

Thank you for your help!

- David

-----Original Message-----
From: Scott Talsma [mailto:scott@talsma.tv] 
Sent: Friday, February 06, 2015 1:58 PM
To: dev@flex.apache.org
Subject: Re: Flex 4.6 Spark Skin question


Is there a particular reason you are maintaining two separate projects?  Is it your intention
to share the skins across projects?

One thing you can try to it add your skins directory as a secondary source root.  I'm not
sure how to do it in FlashBuilder, but I recall it being pretty simple.

That would probably solve both problems.  But if you attempt to reuse projectSkin in a third
project, you will still have to contend w/references to possibly non-existent HostComponents
that are referenced in Project1.


On Fri, Feb 6, 2015 at 1:45 PM, David Frank <David.Frank@on24.com> wrote:

> Hey guys,
> First time mailing the group. Let me introduce myself. I've been 
> working on Flex 3.2 for the past 6 years, and I've only recently 
> upgraded my project to Flex 4.6.
> I'm having difficulty in two areas and I've Googled the hell out of 
> this but all the web links that seem to have the answers, are dead. 
> Serves me right for upgrading 6 years after Flex 4 was introduced.
> Anyway, I'm hoping some of you might have the answer to my issues.
> Issue 1:
> I have a main Flex project for my application. I have a separate Flex 
> project (a "style" project) that has all the style definitions and 
> assets in it. The .css file is located under src/skin folder inside 
> this style project. The problem is that I'm not able to 
> 'ClassReference' my skin class. The compiler keeps throwing an error 
> saying that the class is not found. Here is my sample:
> custom|CustomItemRendererComponent
> {
>       skinClass:
> ClassReference("skin.sparkSkins.SkinForCustomItemRendererComponent");
> }
> If I move my .css file directly under the src folder, then the 
> compiler seems to find the class. If it is under src/skin, this 
> breaks. Can someone tell me if there is a workaround for this without 
> having to move the .css file directly under the src folder?
> Issue 2:
> A skin class is inside a separate Flex project (a "style" project as 
> mentioned above). I am unable to declare the HostComponent inside the 
> skin class if this is a custom component belonging to the main Flex project.
> Here is my sample:
> [HostComponent("custom.itemRenderers.CustomItemRendererComponent")]
> The CustomItemRendererComponent is defined inside the main Flex Project.
> So, I thought that this was the reason the compiler is not able to 
> find the class. So, I linked the entire main Flex project in the 
> Source Path of my style project. But this still does not get rid of 
> the error. I even get the class in the code hinting, but the compiler 
> doesn't see the class. (Please note that this error happens even if I 
> have the .css file directly under the src folder of the style 
> project.) The error goes away only if I physically move the 
> CustomItemRendererComponent skin class somewhere inside the style 
> project itself. This is not feasible unfortunately since I have other 
> classes referenced inside the skin class and so on. Can someone help 
> please? Is there a way I can fix the compiler error or maybe tell the 
> compiler to ignore this "error" in any way? FYI, until this error goes 
> away, I'm forced to change the HostComponent to 
> "spark.components.SkinnableContainer" (super class of 
> CustomItemRendererComponent). I would prefer to use the actual custom component class
> Thank you in advance for your help!
> Cheers,
> David Frank
View raw message