It worked! Thanks, Om.
I simply added the path src/skin in the source path of my style project, and
then changed the ClassReference as
ClassReference("sparkSkins.SkinForCustomItemRendererComponent"); and this
worked.
We should probably expose this solution to the public world. I've been
struggling with this issue and looks like a lot of people did have the same
issue long before. Not sure if they found a solution. So, it would be great to
have our mailing list solutions "googleable".
Anyway, thanks again for the help!
- David
-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of OmPrakash
Muppirala
Sent: Monday, February 09, 2015 11:11 AM
To: [email protected]
Subject: Re: Flex 4.6 Spark Skin question
David,
It looks like you did not get my earlier response.
For q1:
It seems like your main source path is not set to "src". If you set it to src,
it might fix your problem.
Or you could try: skinClass:
ClassReference("sparkSkins.SkinForCustomItemRendererComponent");
I hope that helps.
Thanks,
Om
On Mon, Feb 9, 2015 at 10:47 AM, David Frank <[email protected]> wrote:
> Hi Jude,
>
> Adding a '../' to the ClassReference gives me the following error: 1084:
> Syntax error: expecting identifier before doubledot.
>
> Can someone throw some ideas, please? Just FYI, this is in reference
> to Issue no.1 as described below in my original email. Issue no.2 is
> fixed :)
>
> Thanks in advance!
>
> - David
>
>
> -----Original Message-----
> From: jude [mailto:[email protected]]
> Sent: Friday, February 06, 2015 4:33 PM
> To: [email protected]
> Subject: Re: Flex 4.6 Spark Skin question
>
> Maybe
> ClassReference("../skin.sparkSkins.SkinForCustomItemRendererComponent
>
> On Friday, February 6, 2015, David Frank <[email protected]> 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 though.
> >
> >
> > Thank you in advance for your help!
> >
> > Cheers,
> >
> > David Frank
> >
>