Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Create Constructor
07-31-2013, 06:04 AM
Post: #1
Create Constructor
Hi, did i miss something.
I have install 5.0.3 on my delphi Xe and when I code something like
a := TIlSegmentText.Create(nil);

I receive an error at runtime and with Trace step by step at this line the system ask for ILSegmentText.pas ( Source file not found )

Can you help me please ?Huh

I will be more specific.

Type Champs = record
Nom : string;
Indexe : Boolean;
TypeChamp : integer; {Mémo, integer, string, float}
Longueur : integer;
Precision : integer;
end;

Type LabelFichier = record
NomSegmentFichier : TIlSegmentText;
NomTable : String;
NombreChamps : integer;
LesChamps : array of Champs;
end;


var TableComplete : array of LabelFichier; /* dynamic table */
var Table1 : TIlSegmentText;

begin
Table1 := TIlSegmentText.create(nil); /* working maybe because the Table1 exist */

SetLength(TableComplete,length(TableComplete)+1);
TableComplete[Indice].NomTable := 'blabla';
TableComplete[Indice].NomSegmentFichier := TIlSegmentText.create(nil);
/* the previous line doesn't work, he ask for the ILSegmentText.pas */
TableComplete[Indice].NomSegmentFichier.Top := 2;
TableComplete[Indice].NomSegmentFichier.Left := 5;
TableComplete[Indice].NomSegmentFichier.Segments.color := ClRed;


end;
Quote this message in a reply
07-31-2013, 08:13 PM
Post: #2
RE: Create Constructor
Hi! Are you trying to create an array of ILSegmentText? If you'd want them on a form perhaps exchange 'nil' with 'Form1'?

Regards,
Dave
Quote this message in a reply
07-31-2013, 10:21 PM
Post: #3
RE: Create Constructor
(07-31-2013 08:13 PM)Dave Wrote:  Hi! Are you trying to create an array of ILSegmentText? If you'd want them on a form perhaps exchange 'nil' with 'Form1'?

Regards,
Dave

Yes, it's a dymanic array of ILSegmentText. The idea behind it's open a database and show up the table name inside. For those of them how are suppose to be there the ILSegmentText will be green, and for those who are not suppose to be there the ILSegmentText will be Red.

I have try with Form1 and same thing append. Undecided

Can you tell me why he ask for a file he doesn't exist ?
Quote this message in a reply
07-31-2013, 11:54 PM
Post: #4
RE: Create Constructor
The compiler likes to show you where the error occured, of course without the source-code it can't but it's still trying. What error do you get? (i don't mean asking for the file)

Regards,
Dave
Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: