On Thu, Sep 11, 2014 at 5:01 PM, Oleg Konovalov <oleg...@gmail.com> wrote:
> All I get in error stack trace is 1 line (or 2 if it called not directly > from MXML Spark Button definition, but from some method in that skin > class): > > MySkinClass::Btn1_click: line xxx > > > I am using Parsley 2.4 (if that is relevant). > > Lots of times, Parsley eats the exceptions and lets things silently fail. I usually add a try catch in my code and inspect the scope chain for errors. In your case, try adding a try catch where you are trying to access the hostcomponent. In case you are using the parsley swcs, try switching to the parsely source directly and perhaps you can see the exact location things are failing. Thanks, Om > It is really strange: I wrote a lot of such view/viewSkin pairs and > never seen that problem before. > > In that case I copied existing pair of them and copied into it some code > from another pair with minor changes. > Probably missed something.... all compiles and looks normal. > have proper constructor in view... > > > On Thu, Sep 11, 2014 at 3:54 PM, Alex Harui <aha...@adobe.com> wrote: > > > Did you try to attach something? Attachments don't always work on the > > mailing list. Copy and paste the stack trace or post it somewhere and > > send a link to it. > > > > -Alex > > > > On 9/11/14 12:37 PM, "Oleg Konovalov" <oleg...@gmail.com> wrote: > > > > >Skin's spark button click -- to hostComponent.method1() > > >On Sep 11, 2014 3:19 PM, "Alex Harui" <aha...@adobe.com> wrote: > > > > > >> What does the call stack look like? > > >> > > >> On 9/11/14 12:15 PM, "Oleg Konovalov" <oleg...@gmail.com> wrote: > > >> > > >> >I am calling it by clicking a button on fully drawn screen, so I > would > > >> >expect that hostComponent to be initialized by then. Are there any > > >> >conditions to check or configuration I need to know about? > > >> >Seems to work fine on many similar screens. > > >> >Using Flex 4.5.1. > > >> >And F3 does bring me to correct method. > > >> >On Sep 11, 2014 3:03 PM, "Alex Harui" <aha...@adobe.com> wrote: > > >> > > > >> >> Calling too soon before hostComponent is assigned, or maybe > > >> >>hostComponent > > >> >> is the type you specified. > > >> >> > > >> >> On 9/11/14 11:53 AM, "Oleg Konovalov" <oleg...@gmail.com> wrote: > > >> >> > > >> >> >Hi, > > >> >> > > > >> >> >I am creating a View/ViewSkin pair, > > >> >> >with view extending SkinnableContainer. > > >> >> >As usual, often have to call hostComponent.method1(), > > >> >> >but getting Error # 1009 Cannot access a property or method. > > >> >> >I do define HostComponent properly in the skin. > > >> >> >When I call that method1, hostComponent is NULL. Why? > > >> >> >What I might be missing? > > >> >> > > > >> >> >TIA, > > >> >> >Oleg > > >> >> > > >> >> > > >> > > >> > > > > > > > -- > Thank you, > Oleg. >