Parent should be unavailable at createElement time. There is no guarantee when a component will be added to the DOM. It could be instantiated and have its properties set before being given a parent.
Why do you need to know so early? And what code would set the parent so early? -Alex On 11/29/16, 1:02 PM, "carlos.rov...@gmail.com on behalf of Carlos Rovira" <carlos.rov...@gmail.com on behalf of carlosrov...@apache.org> wrote: >In UIHTMLElementWrapper: > >public function get parent():IParent > { > COMPILE::JS > { > var p:WrappedHTMLElement = this.positioner.parentNode as >WrappedHTMLElement; > } > > >this.positioner is undefined, so I think that's a bug right? > > >2016-11-29 20:37 GMT+01:00 Carlos Rovira <carlosrov...@apache.org>: > >> Hi, >> >> I'm trying to see what component is the parent of the current component >>in >> createElement mehtod of a ContainerBase >> >> What's the wat to check this? >> >> I'm trying something like >> >> if (parent is SomeComponent) { >> .... >> } >> >> but I'm getting browser error. Can't find examples in source code or in >> examples >> >> >> Thanks >> >> >> -- >> Carlos Rovira >> http://about.me/carlosrovira >> >> > > >-- >Carlos Rovira >http://about.me/carlosrovira