What's the difference between id and localId in Apache Royale?

255 views Asked by At

In Apache Royale we can identify objects with "id" and "localId" properties. The problem is to know why we have two ways of doing the same apparently.

1

There are 1 answers

0
Carlos Rovira On BEST ANSWER

I found the Answer and sharing solution:

HTML requires ID's that are unique, so by creating Royale components that internally use ID's to identify the inner sub-components this means the same ID will be used in all instances created and therefore generating a problem of lack of uniqueness.

Solution:
Use "localId" in the inner components, so Royale will use it internally and will avoid to add "id" when you transpile to HTML.