Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 1999-05

Objpas and Self problem

5 messages · 3 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Cliff Baeseman
to Michael A. Hess: I'm going to add the {$mode Delphi} if you don't mind because I hate using OPT=-S2. The…

commit when ready.....

Cliff

Earlier message 54 lines
-----Original Message----- From: Michael A. Hess Sent: Friday, May 14, 1999 10:15 AM To: Subject: Re: [lazarus] Objpas and Self problem Michael Van Canneyt wrote: > > hello, > > It seems to me that the objpas and self problem are related. > I removed the objpas everywhere. Instead it should say everywhere > > {$mode delphi} > > and the objpas should be REMOVED from the uses clause. > (I didn't add the {$Mode delphi}, instead I used > 'make OPT=-S2') I'm going to add the {$mode Delphi} if you don't mind because I hate using OPT=-S2. The reason is unless it tells you in the code you don't know you were suppose to set it and when it doesn't compile correctly you don't have a clue as to why. As the Self problem I'm not sure what is going on. I modified the TApplication so that it is GUI independent and it also has the CreateForm method. To get this to work I needed to use Self and I also needed to move LoadMainMenu to be called in the TForm1.Create method. When I moved it their I had to remove the implicit TForm1.{whatever} references since TForm1 wasn't set yet. Therefor it needed to use Self and it works fine. I have managed to compile and run lazarus in this manner. I am going to make a few more changes this morning and will then commit what I have done for everyone to look at. > So, once more: do a > cvs update > before committing anything !! I made a WHOLE lot of changes last night and this morning but I'll update and check out your stuff before committing. -- ==== Programming my first best destiny! ==== Michael A. Hess Miracle Concepts, Inc. http://www.miraclec.com _________________________________________________________________ To unsubscribe: mail with "unsubscribe" as the Subject archives at http://www.miraclec.com/list_archives/lazarus

Reply by email

Michael A. Hess
to Michael Van Canneyt: Please do this ASAP. for me it is evening :) CVS should merge the changes seamlessly. In…
Michael Van Canneyt wrote
Please do this ASAP. for me it is evening :)

I was ready too and then I went through and changed all of my

{$mode objfpc}

to

{$mode delphi}

Now it doesn't compile. It pops up with all sorts of errors. Some related to mismatched types when dealing with strings and some when dealing with pointers of strings such as @Value+1.

What do you think should I just put it back to

{$mode objfpc}
> I made a WHOLE lot of changes last night and this morning but I'll > update and check out your stuff before committing. CVS should merge the changes seamlessly. In theory :-)

I only had to hand edit a few of the changes against what I had already done.

==== Programming my first best destiny! ==== Michael A. Hess Miracle Concepts, Inc. http://www.miraclec.com

Reply by email

Michael Van Canneyt

hello,

It seems to me that the objpas and self problem are related. I removed the objpas everywhere. Instead it should say everywhere

{$mode delphi}

and the objpas should be REMOVED from the uses clause. (I didn't add the {$Mode delphi}, instead I used
'make OPT=-S2')

Note that this is true in general: objpas must be loaded implicitly by the -S2 or -Sd switch (the {$mode delphi}).

it should NEVER be loaded explicitly. This used to be different, but now this is strictly against the rules.

I cannot test the self problem because the app doesn't link on my NT. Once I get to a linux box, I may be able to test.

So, once more: do a
cvs update
before committing anything !!

Michael.

Reply by email

Michael A. Hess
to Michael Van Canneyt
Michael Van Canneyt wrote 11 lines
hello, It seems to me that the objpas and self problem are related. I removed the objpas everywhere. Instead it should say everywhere {$mode delphi} and the objpas should be REMOVED from the uses clause. (I didn't add the {$Mode delphi}, instead I used 'make OPT=-S2')

I'm going to add the {$mode Delphi} if you don't mind because I hate using OPT=-S2. The reason is unless it tells you in the code you don't know you were suppose to set it and when it doesn't compile correctly you don't have a clue as to why.

As the Self problem I'm not sure what is going on. I modified the TApplication so that it is GUI independent and it also has the CreateForm method. To get this to work I needed to use Self and I also needed to move LoadMainMenu to be called in the TForm1.Create method. When I moved it their I had to remove the implicit TForm1.{whatever} references since TForm1 wasn't set yet. Therefor it needed to use Self and it works fine. I have managed to compile and run lazarus in this manner.

I am going to make a few more changes this morning and will then commit what I have done for everyone to look at.

So, once more: do a cvs update before committing anything !!

I made a WHOLE lot of changes last night and this morning but I'll update and check out your stuff before committing.

==== Programming my first best destiny! ==== Michael A. Hess Miracle Concepts, Inc. http://www.miraclec.com

Reply by email

Michael Van Canneyt
to Michael A. Hess
Michael A. Hess wrote 29 lines
Michael Van Canneyt wrote: > > hello, > > It seems to me that the objpas and self problem are related. > I removed the objpas everywhere. Instead it should say everywhere > > {$mode delphi} > > and the objpas should be REMOVED from the uses clause. > (I didn't add the {$Mode delphi}, instead I used > 'make OPT=-S2') I'm going to add the {$mode Delphi} if you don't mind because I hate using OPT=-S2. The reason is unless it tells you in the code you don't know you were suppose to set it and when it doesn't compile correctly you don't have a clue as to why. As the Self problem I'm not sure what is going on. I modified the TApplication so that it is GUI independent and it also has the CreateForm method. To get this to work I needed to use Self and I also needed to move LoadMainMenu to be called in the TForm1.Create method. When I moved it their I had to remove the implicit TForm1.{whatever} references since TForm1 wasn't set yet. Therefor it needed to use Self and it works fine. I have managed to compile and run lazarus in this manner. I am going to make a few more changes this morning and will then commit what I have done for everyone to look at.

Please do this ASAP. for me it is evening :)

Show quoted text 7 lines
> So, once more: do a > cvs update > before committing anything !! I made a WHOLE lot of changes last night and this morning but I'll update and check out your stuff before committing.

CVS should merge the changes seamlessly. In theory :-)

Michael.

Reply by email