View Issue Details

IDProjectCategoryView StatusLast Update
0003026JEDI VCL00 JVCL Componentspublic2005-06-12 11:38
Reporterbrethren70Assigned Toobones 
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
Product Version3.00 
Target VersionFixed in Version3.10 
Summary0003026: JvDBGrid, JvDBUltimGrid cannot be created. Access violation occurs.
DescriptionJvDBGrid, JvDBUltimGrid cannot be dropped to form in design time.
They also cannot be created in runtime due to access violation in TJvDBGrid.NotifyLayoutChange method.

  for I := 0 to FChangeLinks.Count-1 do
    TJvDBGridLayoutChangeLink(FChangeLinks[I]).DoChange(Self, Kind);

FChangeLinks is nil in my Delphi 2005, Delphi 7.

So, I added if statement like below.

  if FChangeLinks <> nil then
   for I := 0 to FChangeLinks.Count-1 do
      TJvDBGridLayoutChangeLink(FChangeLinks[I]).DoChange(Self, Kind);

Is it right?
Is there nobody has a same problem?
TagsNo tags attached.

Activities

obones

2005-06-11 09:33

administrator   ~0007425

I cannot reproduce that, FChangeLinks is set in the constructor. Just step into it and see why it is not set, there lies the real reason.

brethren70

2005-06-12 07:17

reporter   ~0007434

(1) Constructor TJvDBGrid.Create(AOwner: TComponent);
      .......
     Options := DefJvGridOptions; // <<<<< This call TCustomDBGrid.SetOptions;
     .........

(2) TCustomDBGrid.SetOptions(Value: TDBGridOptions);
      ........
      if ChangedOptions * LayoutOptions <> [] then LayoutChanged; <-- This Call procedure TJvDBGrid.NotifyLayoutChange
 
(3) Now, FChangeLinks is nil. FChangeLinks is created later "Options := DefJvGridOptions" statement.


another question
-------------------------
In TJvDBGrid constructor,

constructor TJvDBGrid.Create(AOwner: TComponent);
  FCharList :=
    ['A'..'Z', 'a'..'z', ' ', '-', '+', '0'..'9', '.', ',',
     '?, '?, '?, '?, '?, '?, '?, '?, '?, '?, '?, '?, Backspace]; <-- this statement is not compiled.

Do I have the corrupted source ?

obones

2005-06-12 07:24

administrator   ~0007435

> (2) TCustomDBGrid.SetOptions(Value: TDBGridOptions);
> ........
> if ChangedOptions * LayoutOptions <> [] then LayoutChanged; <-- This
> Call procedure TJvDBGrid.NotifyLayoutChange

No, not here, it does not call it. What version of Delphi are you using?
But there indeed seems to be a potential problem here.


> Do I have the corrupted source ?

What local language are you using? The question marks are replacements for accented characters such as é, è, and ä.

brethren70

2005-06-12 07:30

reporter   ~0007436

my local language is Korean.
Delphi 7 Enterprise (Build 8.1)
Delphi 2005 Architecture Version 9.0.1882.30496

obones

2005-06-12 08:41

administrator   ~0007438

Ok, then you can simply remove all the question marks values and get something like this instead:

['A'..'Z', 'a'..'z', ' ', '-', '+', '0'..'9', '.', ',', Backspace]

That should work.

brethren70

2005-06-12 09:33

reporter   ~0007439

Thanks obones.
What can I do for find the reason of AV in TJvDBGrid?
(because you can't reproduce this problem :)

obones

2005-06-12 11:38

administrator   ~0007441

Well, there is a potential problem, so the solution is now in CVS (revision 1.111), FChangeLinks is created right after the inherited calls.
Thanks for your help, it is very much appreciated.

Issue History

Date Modified Username Field Change
2005-06-10 04:14 brethren70 New Issue
2005-06-11 09:33 obones Note Added: 0007425
2005-06-11 09:33 obones Status new => feedback
2005-06-12 07:17 brethren70 Note Added: 0007434
2005-06-12 07:24 obones Note Added: 0007435
2005-06-12 07:30 brethren70 Note Added: 0007436
2005-06-12 08:41 obones Note Added: 0007438
2005-06-12 09:33 brethren70 Note Added: 0007439
2005-06-12 11:38 obones Status feedback => resolved
2005-06-12 11:38 obones Resolution open => fixed
2005-06-12 11:38 obones Assigned To => obones
2005-06-12 11:38 obones Note Added: 0007441