Hi!
I think you r right...
i need to give complete information for getting
solution.
i am providing the code snippet from where i can think
 
the error is:

In Main.pas : 

there is call to 
'DisplayLoadedPackages' Procedure from within
Main.FormCreate(Sender : TObject).
This procedure now defined immediately below where
TMain.FormCreate() and then TMain.FormDestroy
completes.

Procedure TMain.DisplayLoadedPackages;
var
 i, j:Integer;
  DirID: Integer;

//Here SideLib is declared above as 
//SIDELid : TDirectory as type in one other .pas file
//(havin no design).

 for i:= 0 to SIDELib.DirCount-1 do begin
    for j:= 0  to SIDELib.Directory[i].NumDataTypes-1
do begin

      if SIDELib.Directory[i].PDataType[j].Name =
'TVector' then begin
        if
Assigned(SIDELib.Directory[i].PDataType[j].EditorClass)
 then begin

// here on executing the line given below, the error
//flashes as 'Access Violation at address xxxx... in
//module vcl30.dpl.read of address  xxxx... Process
//Stopped. Use step or run to continue."

Edit3D:=SIDELib.Directory[i].PDataType[j].EditorClass.Create(Self);
        end;
   end;
// where Edit3D, TPlantType : TEditor;
     

 if SIDELib.Directory[i].PDataType[j].Name =
'TPlantType' then begin
        if
Assigned(SIDELib.Directory[i].PDataType[j].EditorClass)
 then begin
          //GreenhousePlanner
:=SIDELib.Directory[i].PDataType[j].EditorClass.Create(Self);
         
SIDELib.Directory[i].PDataType[j].EditorClass.Create(Self);

          end;

   end;
  end;

  TopPanelForm.DirList.Clear;
  for DirID:=0 to SIDELib.DirCount-1 do begin
   
TopPanelForm.DirList.Add(SideLib.Directory[DirID]);
  end;
  TopPanelForm.LoadDirList;
end;

Now in LibInfo.pas :

TDirectory = class
private
  FPDataTypes: TList;    
FSysElClasses: TList;  
  function GetNumDataTypes: Integer;                  
              virtual;
    function GetPDataType(DTID: Integer): TPDataType; 
                 virtual;
    function GetNumSysElClasses: Integer;
    function GetSysElClass(SEID: Integer):
TSysElClass;
    function GetNumEditorClasses: Integer;
    function GetEditorClass(EDID: Integer):
TEditorClass;
  public
  PathName: String; 
 constructor Create(PDataTypes   : array of
TPDataType;
                       SysElClasses : array of
TSysElClass;
                       ReqdDirs     : array of
ShortString;
                       UsedPubUnits : array of
ShortString;
                       UsedPriUnits : array of
ShortString);    virtual;

 property NumDataTypes: Integer read GetNumDataTypes;
 property PDataType [DTID:Integer]: TPDataType  read
GetPDataType;  default;
 property NumSysElClasses: Integer read
GetNumSysElClasses;
 property SysElClass[SEID: Integer]: TSysElClass read
GetSysElClass;
  property EditorClass[ECID: Integer]: TEditorClass
read GetEditorClass;

//then in
implementation

function TDirectory.GetPDataType(DTID:Integer):
TPDataType;
begin  Result:= FPDataTypes[DTID];
end;

function TDirectory.GetNumEditorClasses: Integer;
begin Result:= FEditorClasses.Count;
end;

function TDirectory.Name: ShortString;
begin
  Result:= GetName(PathName);
end;

procedure TDirectory.AddPDataType(PDataType:
TPDataType);
begin
  FPDataTypes.Add(PDataType);
end;
function TDirectory.GetEditorClass(EDID: Integer):
TEditorClass;
begin Result:= FEditorClasses[EDID];
end;

Last but not least in SeTSysEl.pas File :

TEditor = class(TComponent)  
protected
 FSysEl: TSysEl;                      // Viewers are
Editors who don't
  FPDynVar: TPDynVar;
  FPDataType: TPDataType;
  FConversionFactor: Single;
  FStringField1, FStringField2, FStringField3,
FValString: String;
  FPt: TPoint;
  procedure SetSysEl(aSysEl: TSysEl);   virtual;
abstract;
public
  procedure Execute;                    virtual;
abstract;
  property SysEl: TSysEl             read FSysEl      
     write SetSysEl;
  property PDynVar: TPDynVar         read FPDynVar    
     write FPDynVar;
  property PDataType: TPDataType     read FPDataType  
     write FPDataType;
  property StringField1: String      read
FStringField1     write FStringField1;
  property StringField2: String      read
FStringField2     write FStringField2;
  property StringField3: String      read
FStringField3     write FStringField3;
  property ValString: String         read FValString  
     write FValString;
  property Pt: TPoint                read FPt         
     write FPt;
  property ConversionFactor: Single  read
FConversionFactor write FConversionFactor;
end;

TEditorClass = class of TEditor;

i think now you can solve my problem.
Looking forward for your reply.
thanks.

with regards
-Bijal...


--- logman0u812 <[EMAIL PROTECTED]> wrote:


---------------------------------
Hello,
Create a breakpoint at the beginning of that function
where that AV error is occurring, and run the app and
that function. Step thru the code line by line when it
hits the breakpoint... until the AV happens. 

Something doesnt exist when you try to access it.
At this point we dont have enough info
Hope this helps...
Paul

Bijal Mandviya <[EMAIL PROTECTED]> wrote:    
   Hi there!
 i m very new to delphi world. i have a project
 developed in delphi3
 and is required to migrate into delphi5 and
 delphi2005.
 i am trying alot on this but not able to do this.
 while running my delphi3 project  under delphi5
 enviroment,first i am getting an run-time error as: "
 Project Greenproj.exe raised exception class
 EAccessViolation with message 'access  violation at 
 address C08B0117. Read of address C08B0117'.Process
 stopped. Use step or run to continue"
 This error occurs at line when i m trying to invoke a
 function.
 in that function, there is used Class1.Create(self);
 this Class1 is declared somewhere else as :
 Class1 : Class of TEditor;
 TEditor : Class(Tcomponent);
 and while looking inside this class, there is no
where
 written Constructor Create(.........
 Is it b'coz of this missing Create(), i m getting
 access violation?
 or is this b'coz of Class-reference that is not
 getting it's refernce properly?
 please help me. i m very confussed and not even in
 position to move ahead.
 what should i do?
 is there any alternative to this?
 Looking for your quick response.
 thanks.
 
 
 with regards,
 -Bijal...
   
 
            
---------------------------------
Blab-away for as little as 1ยข/min. Make  PC-to-Phone
Calls using Yahoo! Messenger with Voice.

[Non-text portions of this message have been removed]



-----------------------------------------------------
Home page: http://groups.yahoo.com/group/delphi-en/
To unsubscribe: [EMAIL PROTECTED]

  
    
---------------------------------
  YAHOO! GROUPS LINKS

  
    Visit your group "delphi-en" on the web.
   
    To unsubscribe from this group, send an email to:
 [EMAIL PROTECTED]
   
    Your use of Yahoo! Groups is subject to the Yahoo!
Terms of Service.

  
---------------------------------





                
__________________________________________________________ 
Yahoo! India Matrimony: Find your partner now. Go to http://yahoo.shaadi.com


-----------------------------------------------------
Home page: http://groups.yahoo.com/group/delphi-en/
To unsubscribe: [EMAIL PROTECTED] 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/delphi-en/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 



Reply via email to