View Issue Details

IDProjectCategoryView StatusLast Update
0002395JEDI VCL00 JVCL Componentspublic2005-01-03 06:39
ReporteranonymousAssigned To 
PrioritynormalSeveritymajorReproducibilityalways
Status resolvedResolutionfixed 
Product Version3.00 BETA 2 
Target VersionFixed in Version3.00 RC 1 
Summary0002395: can't place a JVScrollMax on a Form
Descriptioncan't place a JVScrollMax on a Form, access violation error is raised on D2k5
TagsNo tags attached.

Relationships

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

Activities

user72

2004-12-18 03:53

  ~0005913

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;

anonymous

2004-12-18 14:39

viewer   ~0005923

Last edited: 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}

user72

2004-12-19 04:23

  ~0005928

Is FPnlEdit and FScrollBar assigned (i.e not nil)?

ricscan

2004-12-20 04:10

reporter   ~0005942

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

AHUser

2004-12-20 04:14

developer   ~0005943

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.

ricscan

2004-12-20 04:38

reporter   ~0005944

Last edited: 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}

AHUser

2005-01-03 06:39

developer   ~0006068

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