After reomving error mentioned earlier,
now the problem shifts somewhere else.
now i m gettin Error: Access violation at address xxx... in module
vcl50.dpl. Read of address xxx...Process stopped. Step to or continue."
Like this.
I can say this error can come from :
In Packages.Pas file :
there exists a procedure called
LoadSysEl(DirId : Integer)
in this procedure
TPackageForm.LoadSysEls(DirID:Integer);
var
SEID, i: Integer;
aseCLassLabel : TseClassLabel;
where TseClassLabel = class(TShape) declared under
type identifier of same file.
PrevLabel : TShape;
begin
PrevLabel := nil;
with SIDELib.Directory[DirID] do begin
for SEID := 0 to NumSysElClasses-1 do begin
if seClassLabels.Count > 0
where seClassLabels is TList declared in
TPackageForm = Class(Form).
then PrevLabel := TSeClassLabel(seClasslabels.Last)
else if DTLabels.Count > 0
then PrevLabel := TDTLabel(DTLabels.Last);
aseClassLabel := TseCLassLabel.Create(Self);
upto here executes fine....
with aseClassLabel do begin
aseClassLabel.Parent := Self;
if Assigned(SysElClass[SEID]) then
temp := SideLib.Directory[DirID].SysElClass[SEID];
on executing abouve line as Evaluate\modify i got an value
TSysElClass($13D5590).
But on executing it with .ClassName it gives me an access violation error.
aseClassLabel.Name := temp.ClassName;
written by me, because with below line it shows undeclared identifier
SysElClass[SEID].
so i thought to catch this value in one temp variable and use it.
aseClassLabel.Name := SysElClass[SEID].Classname;
// Name := SysElClass[SEID].Classname;
seClass := SysElClass[SEID];
if PrevLabel <> nil then begin
Left := PrevLabel.Left;
Top := PrevLabel.Top + 50;
end else begin
Left := 5;//10;
Top := 10;
end;
Brush.Color := clYellow;
and something more.....
In LibraryInfo.pas file:
TSysElClass = class of TSysEl;
TDirectory = class
private
FHPackage: HModule;
//
FPDataTypes: TList;
FSysElClasses: TList; //SysElClasses contained in //this dir
FNewSysEls : TStringList; // SysEls to be turned into //new SysElClasses
FDeletedSysEls : TStringList; // SysEls to be deleted //from the
directory
FEditorClasses: TList; // EditorClasses contained in //this dir
FReqdDirNames: TStringList;// dirs required to compile this dir
FUsedPublicUnits: TStringList; // Other Units used
FUsedPrivateUnits: TStringList;
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;
constructor Create(PDataTypes : array of TPDataType;
SysElClasses : array of TSysElClass;
ReqdDirs : array of ShortString;
UsedPubUnits : array of ShortString;
UsedPriUnits : array of ShortString); virtual;
function Name: ShortString;
property NumSysElClasses: Integer read GetNumSysElClasses;
property SysElClass[SEID: Integer]: TSysElClass read GetSysElClass;
constructor TDirectory.Create(
PDataTypes : array of TPDataType;
SysElClasses : array of TSysElClass;
ReqdDirs : array of ShortString;
UsedPubUnits : array of ShortString;
UsedPriUnits : array of ShortString);
var
i: Integer;
begin
inherited Create;
//showmessage('Before Lib ' + self.Name + ' Create');
// PDataTypes & Editors !!! I think we should just add them to the
create arg list
FPDataTypes:= TList.Create;
FEditorClasses:= TList.Create;
FDataTypesModified := False;
for i:= 0 to High(PDataTypes) do
if assigned(PDataTypes[i]) then begin
FPDataTypes.Add(PDataTypes[i]);
if Assigned(PDataTypes[i].EditorClass)then
FEditorClasses.Add(PDataTypes[i].EditorClass)
;//end if
end;//if
/// SysElClasses
FSysElClasses:= TList.Create;
for i:= 0 to High(SysElClasses) do
if Assigned(SysElClasses[i]) then begin
FSysElClasses.Add(SysElClasses[i]);
if SysElClasses[i].ClassName <> 'TSysEl' then
RegisterClass(SysElClasses[i]) // Register
SysEl Classes
;//end if
end//if
and like such filling ......
within conitnuation of TDirectory class...
function TDirectory.GetSysElClass(SEID:Integer): TSysElClass;
begin
Result := nil;
if assigned(FSysElClasses[SEID]) then
Result:= FSysElClasses[SEID];
end;
function TDirectory.Name: ShortString;
begin
Result:= GetName(PathName);
end;
In SeTSysEl.pas File :
type
TSysEl = class; // forward declaration
TSysEl = class(TComponent)
and here so many procedures defined.
But there is no as such Procedure ClassName defined anywhere.
Hope it is bit informative to solve the problem.
Your help is greatly appriciated.
thanks.
with regards,
-Bijal...
-----------------------------------------------------
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/