Project JEDI - Issue Tracker
Mantis Bugtracker

Viewing Issue Simple Details Jump to Notes ] View Advanced ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0002395 [JEDI VCL] 00 JVCL Components major always 2004-12-17 15:40 2005-01-03 06:39
Reporter anonymous View Status public  
Assigned To
Priority normal Resolution fixed  
Status resolved   Product Version 3.00 BETA 2
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
Additional Information
Tags No tags attached.
Attached Files

- Relationships
has duplicate 0002451resolved TJVScrollMax cannot be used 
has duplicate 0002596resolvedobones With RC1 - TJvScrollMax SetParentBackground - Called from inherited Create 

-  Notes
(0005913)
user72
2004-12-18 03:53

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;
(0005923)
anonymous (viewer)
2004-12-18 14:39
edited on: 2004-12-18 14:40

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}

(0005928)
user72
2004-12-19 04:23

Is FPnlEdit and FScrollBar assigned (i.e not nil)?
(0005942)
ricscan (reporter)
2004-12-20 04:10

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
(0005943)
AHUser (developer)
2004-12-20 04:14

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.
(0005944)
ricscan (reporter)
2004-12-20 04:38
edited on: 2004-12-20 04:40

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}

(0006068)
AHUser (developer)
2005-01-03 06:39

Fixed in CVS.

Inserted the IF statements.

- Issue History
Date Modified Username Field Change
2004-12-17 15:40 anonymous New Issue
2004-12-18 03:53 user72 Note Added: 0005913
2004-12-18 03:53 user72 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 user72 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


Mantis 1.1.6[^]
Copyright © 2000 - 2008 Mantis Group
Powered by Mantis Bugtracker