On 5/23/17, 12:28 AM, "Christofer Dutz" <christofer.d...@c-ware.de> wrote:
>Hi Piotr, > >Well in the old Flex world there was no global id like concept. There >were only local ids, only in rare cases we needed to access stuff “above” >and that’s what the parent was used for. So I guess that in general the >same should apply for new MXML components. The only difference is that in >Flex we didn’t need the id’s to be globally unique, in JS they however >need to be unique. What I’m proposing, is to continue using only local >ids, but have the compiler or the framework use the “id” attribute in >MXML and to translate that into an “effective-global-id” by appending the >parents “effective-global-id” with “:{local-id}” generating a new global >id. This would eliminate a lot of possible problems, but also it would >probably break the option to style elements with CSS based on their id. >But I think that’s bad practice anyway, I usually use style classes for >that. If you want to continue to use ids, you would simply have to >replace the “lala” CSS id selector with >“myapp:someintermediate:another:lala” and all should continue to work. >Don’t know if there are any other drawbacks. Maybe I don't understand your plan, but for an MXML item renderer where an "id" is used in the MXML, there could be more than one instance of it with the exact same parent List. -Alex