Re: [lazarus] illegal qualifier problem arose to a newbie

2007-01-13 Thread Sönmez Kartal
Oh, I fixed it. Compiler couldn't find TDate class because it is in a 
different unit. I added that unit to uses clause where I am using and 
everything is ok now.


Thanks for everything. Happy coding...

Darius Blaszijk yazmış:
I just checked the sources and there is no TDate class available in 
FPC/Lazarus, and I doubt (as Joost did) that Delphi has it but I'm not 
shure.
You never actually mentioned what exact error message you get. Can you 
post it here?


Darius

- Original Message - From: "Sönmez Kartal" 
<[EMAIL PROTECTED]>

To: 
Sent: Saturday, January 13, 2007 4:03 PM
Subject: Re: [lazarus] illegal qualifier problem arose to a newbie



Hi,

Yeah, I forgot to write it. TheDay is a field in the form class. 
Anyway, this doesn't matter.


I wondered about why I cannot assign an object or access a field. But, 
Delphi code from the book's source is compiled well. I will lookup 
that pages Lee sent links before you.


Thanks, Joost.

Joost van der Sluis yazmış:

On Sat, 2007-01-13 at 14:24 +0200, Sönmez Kartal wrote:

Hello,

I am new to Lazarus. I have a book named Mastering Delphi 7 by Marco 
Cantu. I got an error when I tried to compile an example.


procedure TDateForm.FormCreate(Sender: TObject);
begin
   TheDay := TDate.Create();
   TheDay.SetValue(2007,1,13);
end;


Well, this won't compile in Delphi either. First of all you'll need to
define the TheDay variable. Secondly, I don't know any object-type (so
that you can call it's constructor create) which is called TDate.

So probably Marco Cantu has defined his own class TDate, and defined a
variable TheDay somewhere. (Probably somewhere in TDateForm?)

Joost

_
 To unsubscribe: mail [EMAIL PROTECTED] with
"unsubscribe" as the Subject
   archives at http://www.lazarus.freepascal.org/mailarchives



_
To unsubscribe: mail [EMAIL PROTECTED] with
   "unsubscribe" as the Subject
  archives at http://www.lazarus.freepascal.org/mailarchives 


_
To unsubscribe: mail [EMAIL PROTECTED] with
   "unsubscribe" as the Subject
  archives at http://www.lazarus.freepascal.org/mailarchives



_
To unsubscribe: mail [EMAIL PROTECTED] with
   "unsubscribe" as the Subject
  archives at http://www.lazarus.freepascal.org/mailarchives


Re: [lazarus] illegal qualifier problem arose to a newbie

2007-01-13 Thread Darius Blaszijk
I just checked the sources and there is no TDate class available in 
FPC/Lazarus, and I doubt (as Joost did) that Delphi has it but I'm not 
shure.
You never actually mentioned what exact error message you get. Can you post 
it here?


Darius

- Original Message - 
From: "Sönmez Kartal" <[EMAIL PROTECTED]>

To: 
Sent: Saturday, January 13, 2007 4:03 PM
Subject: Re: [lazarus] illegal qualifier problem arose to a newbie



Hi,

Yeah, I forgot to write it. TheDay is a field in the form class. Anyway, 
this doesn't matter.


I wondered about why I cannot assign an object or access a field. But, 
Delphi code from the book's source is compiled well. I will lookup that 
pages Lee sent links before you.


Thanks, Joost.

Joost van der Sluis yazmış:

On Sat, 2007-01-13 at 14:24 +0200, Sönmez Kartal wrote:

Hello,

I am new to Lazarus. I have a book named Mastering Delphi 7 by Marco 
Cantu. I got an error when I tried to compile an example.


procedure TDateForm.FormCreate(Sender: TObject);
begin
   TheDay := TDate.Create();
   TheDay.SetValue(2007,1,13);
end;


Well, this won't compile in Delphi either. First of all you'll need to
define the TheDay variable. Secondly, I don't know any object-type (so
that you can call it's constructor create) which is called TDate.

So probably Marco Cantu has defined his own class TDate, and defined a
variable TheDay somewhere. (Probably somewhere in TDateForm?)

Joost

_
 To unsubscribe: mail [EMAIL PROTECTED] with
"unsubscribe" as the Subject
   archives at http://www.lazarus.freepascal.org/mailarchives



_
To unsubscribe: mail [EMAIL PROTECTED] with
   "unsubscribe" as the Subject
  archives at http://www.lazarus.freepascal.org/mailarchives 


_
To unsubscribe: mail [EMAIL PROTECTED] with
   "unsubscribe" as the Subject
  archives at http://www.lazarus.freepascal.org/mailarchives


Re: [lazarus] illegal qualifier problem arose to a newbie

2007-01-13 Thread Sönmez Kartal

Hi,

Yeah, I forgot to write it. TheDay is a field in the form class. Anyway, 
this doesn't matter.


I wondered about why I cannot assign an object or access a field. But, 
Delphi code from the book's source is compiled well. I will lookup that 
pages Lee sent links before you.


Thanks, Joost.

Joost van der Sluis yazmış:

On Sat, 2007-01-13 at 14:24 +0200, Sönmez Kartal wrote:

Hello,

I am new to Lazarus. I have a book named Mastering Delphi 7 by Marco 
Cantu. I got an error when I tried to compile an example.


procedure TDateForm.FormCreate(Sender: TObject);
begin
   TheDay := TDate.Create();
   TheDay.SetValue(2007,1,13);
end;


Well, this won't compile in Delphi either. First of all you'll need to
define the TheDay variable. Secondly, I don't know any object-type (so
that you can call it's constructor create) which is called TDate.

So probably Marco Cantu has defined his own class TDate, and defined a
variable TheDay somewhere. (Probably somewhere in TDateForm?)

Joost

_
 To unsubscribe: mail [EMAIL PROTECTED] with
"unsubscribe" as the Subject
   archives at http://www.lazarus.freepascal.org/mailarchives



_
To unsubscribe: mail [EMAIL PROTECTED] with
   "unsubscribe" as the Subject
  archives at http://www.lazarus.freepascal.org/mailarchives


Re: [lazarus] illegal qualifier problem arose to a newbie

2007-01-13 Thread Joost van der Sluis
On Sat, 2007-01-13 at 14:24 +0200, Sönmez Kartal wrote:
> Hello,
> 
> I am new to Lazarus. I have a book named Mastering Delphi 7 by Marco 
> Cantu. I got an error when I tried to compile an example.
> 
> procedure TDateForm.FormCreate(Sender: TObject);
> begin
>TheDay := TDate.Create();
>TheDay.SetValue(2007,1,13);
> end;

Well, this won't compile in Delphi either. First of all you'll need to
define the TheDay variable. Secondly, I don't know any object-type (so
that you can call it's constructor create) which is called TDate.

So probably Marco Cantu has defined his own class TDate, and defined a
variable TheDay somewhere. (Probably somewhere in TDateForm?)

Joost

_
 To unsubscribe: mail [EMAIL PROTECTED] with
"unsubscribe" as the Subject
   archives at http://www.lazarus.freepascal.org/mailarchives


Re: [lazarus] illegal qualifier problem arose to a newbie

2007-01-13 Thread Sönmez Kartal

Hi, thanks for reply back.

That code part was an example that is intented to understand 
encapsulation. EncodeDate method was used in an inner method in the class.


I asked that because there is a problem that I cannot access a member of 
an object and wondered why I can't access it.


TheDay is declared in the private area of class.

Thanks Lee.

Lee Jenkins yazmış:

Sönmez Kartal wrote:

Hello,

I am new to Lazarus. I have a book named Mastering Delphi 7 by Marco 
Cantu. I got an error when I tried to compile an example.


procedure TDateForm.FormCreate(Sender: TObject);
begin
  TheDay := TDate.Create();
  TheDay.SetValue(2007,1,13);
end;



What not something like this?

procedure TDateForm.FormCreate(sender: TObject);
begin
TheDay := EncodeDate(2007,1,13);
end;

This is assuming that the "TheDay" var is declared in the form where it 
is accessible.


This may help as well:

http://www.taoyue.com/tutorials/pascal/contents.html

http://packetstormsecurity.nl/programming-tutorials/Pascal/pascal-tutorial/paslist.htm 



_
To unsubscribe: mail [EMAIL PROTECTED] with
   "unsubscribe" as the Subject
  archives at http://www.lazarus.freepascal.org/mailarchives


Re: [lazarus] illegal qualifier problem arose to a newbie

2007-01-13 Thread Lee Jenkins

Sönmez Kartal wrote:

Hello,

I am new to Lazarus. I have a book named Mastering Delphi 7 by Marco 
Cantu. I got an error when I tried to compile an example.


procedure TDateForm.FormCreate(Sender: TObject);
begin
  TheDay := TDate.Create();
  TheDay.SetValue(2007,1,13);
end;



What not something like this?

procedure TDateForm.FormCreate(sender: TObject);
begin
TheDay := EncodeDate(2007,1,13);
end;

This is assuming that the "TheDay" var is declared in the form where it 
is accessible.


This may help as well:

http://www.taoyue.com/tutorials/pascal/contents.html

http://packetstormsecurity.nl/programming-tutorials/Pascal/pascal-tutorial/paslist.htm
--

Warm Regards,

Lee

_
To unsubscribe: mail [EMAIL PROTECTED] with
   "unsubscribe" as the Subject
  archives at http://www.lazarus.freepascal.org/mailarchives