View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 0005707 | JEDI VCL | 00 JVCL Components | public | 2011-11-09 10:38 | 2011-11-09 19:51 |
| Reporter | tetardd | Assigned To | |||
| Priority | normal | Severity | crash | Reproducibility | always |
| Status | closed | Resolution | fixed | ||
| Product Version | 3.45 | ||||
| Target Version | Fixed in Version | ||||
| Summary | 0005707: TJvTreeView.OnAddition can cause app to crash at startup | ||||
| Description | It would appear the OnAddition event is fired when the app starts (main form's creation) if some items exist at design time (see attached demo). This is cause by the fact that in the event handler, if you access other controls, these might not yet have been created. | ||||
| Additional Information | The demo I included was originally to show a previous bugs I reported so ignore the other events, simply focus on OnAddition. If you left the code as is, no crash occurs: procedure TForm7.JvTreeView1Addition(Sender: TObject; Node: TTreeNode); begin If Memo1 <> Nil Then memo1.Lines.Add('Addition'); end; However, if the code is the following (not test): procedure TForm7.JvTreeView1Addition(Sender: TObject; Node: TTreeNode); begin memo1.Lines.Add('Addition'); end; Your app won't start. I don't think it's good to have to force the code to check if a control present at design time has already been created or to rely on control creation order. Maybe the OnAddition event should not be fired if we are still in form creation stage. | ||||
| Tags | No tags attached. | ||||
|
2011-11-09 10:38
|
Bug Jedi.zip (811,757 bytes) |
|
|
Sorry, after more investigation, it's a VCL bug so I'm off filling a QC request. D. |