Uncaught TypeError: Cannot set property 'html' of undefined on j:Label on SDK 0.9.6
- Dominant language
- ActionScript
- Stars
- 380
- Forks
- 120
- PR merge metrics
- No merged PRs in 30d
Description
Hi,
After several hours to try differents tests cases the following code thrown an _**Cannot set property 'html' of undefined**_ on `a j:Label` and I don't understand why.
**MonComptePanel.mxml**
```
Please log in.
lbl_ident.html = str; // here is the issue
}
]]>
```
To reproduce the issue, code must be in
**Main.mxlx**
```
```
The full error is
```
EventDispatcher.js:73 Uncaught TypeError: Cannot set property 'html' of undefined
at MonComptePanel.MonComptePanel_ev_initComplete (MonComptePanel.mxml:28)
at MonComptePanel.$EH0 (MonComptePanel.mxml:7)
at MonComptePanel.goog.events.EventTarget.fireListeners (eventtarget.js:284)
at Function.goog.events.EventTarget.dispatchEventInternal_ (eventtarget.js:382)
at MonComptePanel.goog.events.EventTarget.dispatchEvent (eventtarget.js:196)
at MonComptePanel.org.apache.royale.events.EventDispatcher.dispatchEvent (EventDispatcher.js:70)
at MonComptePanel.org.apache.royale.core.HTMLElementWrapper.dispatchEvent (HTMLElementWrapper.js:254)
at MonComptePanel.org.apache.royale.jewel.Container.addedToParent (Container.js:180)
at org.apache.royale.jewel.ApplicationMainContent.org.apache.royale.core.UIBase.addElement (UIBase.js:410)
at org.apache.royale.jewel.ApplicationMainContent.org.apache.royale.core.GroupBase.addElement (GroupBase.js:165)
```
Here is full source code
[TestRoyale4.zip](https://github.com/apache/royale-asjs/files/3708547/TestRoyale4.zip)
Any ideas ?
Regards
Contributor guide
No contributing guide indexed for this repository
Research direction
Run the reproduction from Main.mxlx using MonComptePanel.mxml and inspect the generated MonComptePanel_ev_initComplete call in the stack trace. Trace the Label creation and initComplete lifecycle through EventDispatcher.js, Container.js, and UIBase.js. Done means the supplied example no longer throws when assigning Label.html and the corrected behavior is covered by an appropriate regression check.
Written by the indexing model from the issue text.
Assessment
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100