View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0002395 | JEDI VCL | 00 JVCL Components | public | 2004-12-17 15:40 | 2005-01-03 06:39 |
Reporter | anonymous | Assigned To | |||
Priority | normal | Severity | major | Reproducibility | always |
Status | resolved | Resolution | fixed | ||
Product Version | 3.00 BETA 2 | ||||
Target Version | Fixed in Version | 3.00 RC 1 | |||
Summary | 0002395: can't place a JVScrollMax on a Form | ||||
Description | can't place a JVScrollMax on a Form, access violation error is raised on D2k5 | ||||
Tags | No tags attached. | ||||
|
Try creating it at runtime and set breakpoints to find where the error is, i.e: procedure TForm1.FormCreate(Sender:TObject); begin with TJvScrollMax.Create(Self) do begin Parent := Self; Width := 200; Height := 200; // etc end; end; |
|
the exception is raised in this procedure, commenting those two lines the control is showed in the form {$IFDEF JVCLThemesEnabled} procedure TJvScrollMax.SetParentBackground(Value: Boolean); begin inherited SetParentBackground(Value); FPnlEdit.ParentBackground := Value; ****Error HERE FScrollBar.ParentBackground := Value; ****Error HERE end; {$ENDIF JVCLThemesEnabled} |
|
Is FPnlEdit and FScrollBar assigned (i.e not nil)? |
|
I forgot I have an account here.. the instructions FPnlEdit.ParentBackground := Value; FScrollBar.ParentBackground := Value; are reached before FPnlEdit and FScrollBar are created,so as you said they are not assigned after constructor TJvScrollMax.Create(AOwner: TComponent); begin inherited Create(AOwner);-->* ..... ..... FPnlEdit := TJvScrollMaxBands.Create(Self); ..... FScrollBar := TJvPanelScrollBar.Create(Self); ..... end; -->*constructor TJvExCustomPanel.Create(AOwner: TComponent); begin {$IFDEF VisualCLX} WindowProc := WndProc; {$ENDIF VisualCLX} -->* inherited Create(AOwner); after there are 2 dispatchmessage and the procedure TJvScrollMax.SetParentBackground(Value: Boolean); is called generating the error |
|
Looks like Delphi 2005 makes live a lot harder. We must check all SetParentBackground methods and assign the ParentBackground property after creating the sub-controls. |
|
I've updateted the code putting two "if" for the moment and it works. {$IFDEF JVCLThemesEnabled} procedure TJvScrollMax.SetParentBackground(Value: Boolean); begin inherited SetParentBackground(Value); if assigned(FPnlEdit) then //ricscan FPnlEdit.ParentBackground := Value; if assigned(FScrollBar) then //ricscan FScrollBar.ParentBackground := Value; end; {$ENDIF JVCLThemesEnabled} |
|
Fixed in CVS. Inserted the IF statements. |
Date Modified | Username | Field | Change |
---|---|---|---|
2004-12-17 15:40 | anonymous | New Issue | |
2004-12-18 03:53 |
|
Note Added: 0005913 | |
2004-12-18 03:53 |
|
Status | new => feedback |
2004-12-18 14:39 | anonymous | Note Added: 0005923 | |
2004-12-18 14:40 | anonymous | Note Edited: 0005923 | |
2004-12-19 04:23 |
|
Note Added: 0005928 | |
2004-12-20 04:10 | ricscan | Note Added: 0005942 | |
2004-12-20 04:14 | AHUser | Note Added: 0005943 | |
2004-12-20 04:38 | ricscan | Note Added: 0005944 | |
2004-12-20 04:40 | ricscan | Note Edited: 0005944 | |
2005-01-03 06:35 | AHUser | Relationship added | has duplicate 0002451 |
2005-01-03 06:39 | AHUser | Status | feedback => resolved |
2005-01-03 06:39 | AHUser | Resolution | open => fixed |
2005-01-03 06:39 | AHUser | Assigned To | => AHUser |
2005-01-03 06:39 | AHUser | Note Added: 0006068 | |
2005-01-03 06:39 | AHUser | Assigned To | AHUser => |
2005-02-04 00:05 | obones | Relationship added | has duplicate 0002596 |