BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

D5 -> D7 Incompatible Types "String" and "PResStringRec"

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Upgrade
View previous topic :: View next topic  
Author Message
Martin Sedlmair
Guest





PostPosted: Fri Sep 10, 2004 11:40 pm    Post subject: D5 -> D7 Incompatible Types "String" and "PResStringRec" Reply with quote



Hello,

I've updated my D5 to D7. Everything works fine except there's an error in
my exceptions. There's always the error "Incompatible types "String" and
"PResStringRec". What am I doing wrong?

I looked through the Newsgroups but I didn't find a thing about this
problem.

Thanks,
Martin


Back to top
Peter Below (TeamB)
Guest





PostPosted: Sat Sep 11, 2004 11:05 am    Post subject: Re: D5 -> D7 Incompatible Types "String" and "PResStringRec" Reply with quote



In article <41423b7d (AT) newsgroups (DOT) borland.com>, Martin Sedlmair wrote:
Quote:
I've updated my D5 to D7. Everything works fine except there's an error in
my exceptions. There's always the error "Incompatible types "String" and
"PResStringRec". What am I doing wrong?

How can we know that without seeing what you are doing? Code, please!


--
Peter Below (TeamB)
Use the newsgroup archives :
http://www.mers.com/searchsite.html
http://www.tamaracka.com/search.htm
http://groups.google.com
http://www.prolix.be



Back to top
Martin Sedlmair
Guest





PostPosted: Sun Sep 12, 2004 4:22 pm    Post subject: Re: D5 -> D7 Incompatible Types "String" and "PResStringRec" Reply with quote



Sorry Peter, you are right. I could have used a piece of code for this.

My problem was/is that I used a EFOpenError exception like this in Delphi 5:

raise EFOpenError.Create ('TEST');

But this line now shows an error message is given in the Subject:

"Incompatible types "String" and "PResStringRec"

In Delphi 5 it worked but not in Delphi 7. I know that the constructor of
EFOpenError is changed but isn't there an overloaded constructor for
compatibility?

Thanks,.
Martin


"Peter Below (TeamB)" <100113.1101 (AT) compuXXserve (DOT) com> schrieb im Newsbeitrag
news:VA.0000b2bc.00ad4ba2 (AT) nomail (DOT) please...
Quote:
In article <41423b7d (AT) newsgroups (DOT) borland.com>, Martin Sedlmair wrote:
I've updated my D5 to D7. Everything works fine except there's an error
in
my exceptions. There's always the error "Incompatible types "String" and
"PResStringRec". What am I doing wrong?

How can we know that without seeing what you are doing? Code, please!


--
Peter Below (TeamB)
Use the newsgroup archives :
http://www.mers.com/searchsite.html
http://www.tamaracka.com/search.htm
http://groups.google.com
http://www.prolix.be





Back to top
Peter Below (TeamB)
Guest





PostPosted: Sun Sep 12, 2004 9:10 pm    Post subject: Re: D5 -> D7 Incompatible Types "String" and "PResStringRec" Reply with quote

In article <414477cd (AT) newsgroups (DOT) borland.com>, Martin Sedlmair wrote:
Quote:
My problem was/is that I used a EFOpenError exception like this in Delphi 5:

raise EFOpenError.Create ('TEST');

But this line now shows an error message is given in the Subject:

"Incompatible types "String" and "PResStringRec"

In Delphi 5 it worked but not in Delphi 7. I know that the constructor of
EFOpenError is changed but isn't there an overloaded constructor for
compatibility?

As it look there isn't. The TException.Create constructor that takes a single
string parameter is not marked as overload, and neither is the modified
version defined in EFileStreamError (which EFOpenError inherits).

If you want to raise the exception with a single string argument you have to
use the CreateFmt constructor:

raise EFOpenError.CreateFmt ('%s',['TEST']);


--
Peter Below (TeamB)
Use the newsgroup archives :
http://www.mers.com/searchsite.html
http://www.tamaracka.com/search.htm
http://groups.google.com
http://www.prolix.be



Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Upgrade All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.