View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0005094 | JEDI VCL | 00 JVCL Components | public | 2010-01-06 15:57 | 2011-06-10 16:10 |
Reporter | migajek | Assigned To | AHUser | ||
Priority | normal | Severity | major | Reproducibility | always |
Status | resolved | Resolution | fixed | ||
Product Version | Daily / GIT | ||||
Target Version | Fixed in Version | 3.40 | |||
Summary | 0005094: JvDocking - ManualTabDock crashes if application's Main Form is uninitialized yet. | ||||
Description | ManualTabDock functions does it: if DockClient1.DockState = JvDockState_Docking then begin ScreenPos := Application.MainForm.ClientRect // Just making it float Form1.ManualFloat(ScreenPos); end; which obviously fails in case MainForm is not initialized yet (like in mine case). Thus it should be replaced with following workaround (I'm not sure if it is correct as I don't get the idea of ManualFloating it, thus I created some random rect) if DockClient1.DockState = JvDockState_Docking then begin if Application.MainForm <> nil then ScreenPos := Application.MainForm.ClientRect // Just making it float temporarily. else ScreenPos := Rect(10, 10, 250, 250); Form1.ManualFloat(ScreenPos); end; anyway it doesn't cause Access Violation anymore. migajek | ||||
Additional Information | if DockClient1.DockState = JvDockState_Docking then begin if Application.MainForm <> nil then ScreenPos := Application.MainForm.ClientRect // Just making it float temporarily. else ScreenPos := Rect(10, 10, 250, 250); //it doesn't make sense probably Form1.ManualFloat(ScreenPos); end; | ||||
Tags | No tags attached. | ||||
|
Please provide the zipped sources of a sample application showing this |
2010-01-13 20:46
|
jvcl_docking.zip (3,030 bytes) |
|
I'm including the source you've asked for, but actually it could be any code that calls ManualTabDock from application's main form OnCreate... It seems that during main form OnCreate execution, Application.MainForm is still nil. This is true for Delphi 7, I'm not able to test it on any recent version ... |
|
Warren Postma has rewritten the ManualTabDock() method and it doesn't use the Application.MainForm property anymore. With this new code I can't reproduce the bug anymore. |
Date Modified | Username | Field | Change |
---|---|---|---|
2010-01-06 15:57 | migajek | New Issue | |
2010-01-13 16:59 | obones | Note Added: 0017110 | |
2010-01-13 16:59 | obones | Status | new => feedback |
2010-01-13 20:46 | migajek | File Added: jvcl_docking.zip | |
2010-01-13 20:46 | migajek | Note Added: 0017117 | |
2010-06-07 13:53 | obones | Status | feedback => acknowledged |
2010-06-07 17:53 | AHUser | Note Added: 0017469 | |
2010-06-07 17:53 | AHUser | Status | acknowledged => resolved |
2010-06-07 17:53 | AHUser | Fixed in Version | => Daily / SVN |
2010-06-07 17:53 | AHUser | Resolution | open => fixed |
2010-06-07 17:53 | AHUser | Assigned To | => AHUser |
2011-06-10 16:10 | obones | Fixed in Version | Daily / SVN => 3.40 |