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 

Strange D2005 things...
Goto page 1, 2  Next
 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Non-Technical
View previous topic :: View next topic  
Author Message
Mario A. Montoya (mamcx)
Guest





PostPosted: Thu Dec 30, 2004 3:47 pm    Post subject: Strange D2005 things... Reply with quote



I'm playing with the new D2005. I found some extrange things.

- Compilation errors are marked always a line above real line of
problem. That cause me troubles because sometimes the above line look
more prone error but the next look easy but is the real cause of the
error. Only discover it because when you see that "begin" is the line of
error....yeah, riiiiight...

- Sync edit not work at all. I mark a block of code, then change a var
and except the original var, the rest are changed a letter off (ie:
Original var: Example. Change to TExample, rest are changed to ETxample).

In my effort in evaluate this beast, i'm converting a C# project to
Delphi.NET. I do this because i must work with .NET and Delphi at time,
so what can be best than Delphi2005? I convert it with BabelCode (i
wrote a batch utility that transform a whole C# project to Delphi.NET,
more or less). That was ok. Now, i nedd do the manual changes, like put
the "T" after class names, convert private fields to real case and put F
(that its, follow the Delphi convention and not the absurd "i'm a case
sensitive, hard to read, C" convention). I imagine that the refactoring
of Delphi 2005 can be handy in this, and because the project is large i
think is a good enough test...

I don't figure how report it to QC, i never do that (always the QC
client fail before)......
Back to top
Liz
Guest





PostPosted: Thu Dec 30, 2004 3:57 pm    Post subject: Re: Strange D2005 things... Reply with quote



Mario A. Montoya (mamcx) wrote:

Quote:
- Compilation errors are marked always a line above real line of
problem. That cause me troubles because sometimes the above line look
more prone error but the next look easy but is the real cause of the
error. Only discover it because when you see that "begin" is the line
of error....yeah, riiiiight...

Not seen that one yet.

Quote:
- Sync edit not work at all. I mark a block of code, then change a
var and except the original var, the rest are changed a letter off
(ie: Original var: Example. Change to TExample, rest are changed to
ETxample).

Havent tried sync edit yet.. thats next on my list to play with.

Quote:
In my effort in evaluate this beast, i'm converting a C# project to
Delphi.NET. I do this because i must work with .NET and Delphi at
time, so what can be best than Delphi2005? I convert it with
BabelCode (i wrote a batch utility that transform a whole C# project
to Delphi.NET, more or less). That was ok. Now, i nedd do the manual
changes, like put the "T" after class names, convert private fields
to real case and put F (that its, follow the Delphi convention and
not the absurd "i'm a case sensitive, hard to read, C" convention). I
imagine that the refactoring of Delphi 2005 can be handy in this, and
because the project is large i think is a good enough test...

You dont *need* to follow the conventions, they are only conventions,
go with "working" first, then change, no point if it doesnt work
possibly breaking it more.


Quote:
I don't figure how report it to QC, i never do that (always the QC
client fail before)......

Make an example project that recreates the issue, explain step by step
what to do, if necessary add screen prints showing what you see.

Back to top
Bryce K. Nielsen
Guest





PostPosted: Thu Dec 30, 2004 4:08 pm    Post subject: Re: Strange D2005 things... Reply with quote



Quote:
- Compilation errors are marked always a line above real line of problem.
That cause me troubles because sometimes the above line look more prone
error but the next look easy but is the real cause of the error. Only
discover it because when you see that "begin" is the line of
error....yeah, riiiiight...


I've actually seen this one in VS.NET. Do you only experience this in Delphi
for .NET projects, or in Win32 ones as well?

-BKN



Back to top
Nick Hodges [TeamB]
Guest





PostPosted: Thu Dec 30, 2004 4:25 pm    Post subject: Re: Strange D2005 things... Reply with quote

Mario A. Montoya (mamcx) wrote:

Quote:
- Compilation errors are marked always a line above real line of
problem.

This is caused by CR/LF problems in your code. Try pasting all the
code into Notepad, and then copy/pasting it back into your editor.


Quote:
- Sync edit not work at all. I mark a block of code, then change a
var and except the original var, the rest are changed a letter off
(ie: Original var: Example. Change to TExample, rest are changed to
ETxample).

Maybe related to the above? SyncEdit works perfectly for me.


Quote:
I imagine that the refactoring of Delphi 2005 can be handy in this,
and because the project is large i think is a good enough test...

Rename Variable is a great refactoring here.

--
Nick Hodges -- TeamB
Lemanix Corporation -- http://www.lemanix.com
Read my Blog -- http://www.lemanix.com/nick

Back to top
David Farrell-Garcia
Guest





PostPosted: Thu Dec 30, 2004 4:34 pm    Post subject: Re: Strange D2005 things... Reply with quote

Nick Hodges [TeamB] wrote:

Quote:
This is caused by CR/LF problems in your code. Try pasting all the
code into Notepad, and then copy/pasting it back into your editor.

I agree with Nick on this one. I have had the same problem when pasting
from other sources into my D7 apps as well. Drives you nuts until you
figure it out.

--
David Farrell-Garcia
Whidbey Island Software LLC

Posted with XanaNews 1.17.1.2

Back to top
Rudy Velthuis [TeamB]
Guest





PostPosted: Thu Dec 30, 2004 4:54 pm    Post subject: Re: Strange D2005 things... Reply with quote

Mario A. Montoya (mamcx) wrote:

Quote:
I'm playing with the new D2005. I found some extrange things.

- Compilation errors are marked always a line above real line of
problem. That cause me troubles because sometimes the above line look
more prone error but the next look easy but is the real cause of the
error. Only discover it because when you see that "begin" is the line
of error....yeah, riiiiight...

Looks as if you have bad line ending in your code. Open it with Notepad
and then save it again. Then try again.

Or your source file does not correspond with the debug info. Do a full
rebuild of source.


--
Rudy Velthuis [TeamB] http://rvelthuis.bei.t-online.de

"You can get more with a kind word and a gun than you can with a kind
word alone."
- Al Capone (1899-1947)

Back to top
Rudy Velthuis [TeamB]
Guest





PostPosted: Thu Dec 30, 2004 4:55 pm    Post subject: Re: Strange D2005 things... Reply with quote

Nick Hodges [TeamB] wrote:

Quote:
Mario A. Montoya (mamcx) wrote:

- Compilation errors are marked always a line above real line of
problem.

This is caused by CR/LF problems in your code. Try pasting all the
code into Notepad, and then copy/pasting it back into your editor.

Opening and saving with Notepad will do as well. The editor will even
notice that the source has changed.
--
Rudy Velthuis [TeamB] http://rvelthuis.bei.t-online.de

"2 + 2 = 5, for extremely large values of 2." -- unknown

Back to top
David Clegg
Guest





PostPosted: Thu Dec 30, 2004 5:07 pm    Post subject: Re: Strange D2005 things... Reply with quote

Mario A. Montoya (mamcx) wrote:

Quote:
I convert it with BabelCode (i wrote a batch utility that transform a
whole C# project to Delphi.NET, more or less).

Not sure if you've seen this, but it's an OTAPI add-in for Delphi 2005
which wraps the BabelCode web service.

http://cc.borland.com/codecentral/ccweb.exe/listing?id=22678

It allows you to convert C#Builder or VS.NET C# projects, or code
snippets. It also has a 'Paste as Delphi' feature, where it attempt to
convert the clipboard contents before pasting (leaving the original
contents untouched on the clipboard).

It simply wraps the web service, with no extra conversion logic, so any
errors in the conversion are probably best reported to QualityCentral
in the same manner as for the BabelCode web page interface. There is a
basic QC interface in the add-in to make this a little easier.

And as a last note, if you've downloaded the D2005 examples, you will
already have it, although there may be a later version on CodeCentral
(you never know your luck <g>).

HTH.

--
Cheers,
David Clegg
[email]dclegg (AT) gmail (DOT) com[/email]

Vote 1 http://cc.borland.com/codecentral/ccweb.exe/listing?id=21489 Smile
Now supports Google Groups searching with Dyna-extend(tm) technology!

QualityCentral. The best way to bug Borland about bugs.
http://qc.borland.com

"Note to self. Stop doing anything." - Homer Simpson

Back to top
Mario A. Montoya (mamcx)
Guest





PostPosted: Thu Dec 30, 2004 5:10 pm    Post subject: Re: Strange D2005 things... Reply with quote

Quote:
This is caused by CR/LF problems in your code. Try pasting all the
code into Notepad, and then copy/pasting it back into your editor.

I do that. I note that in Notepad a "extrange" character appear. I think
is CR or LF. Unfortunaly that not do the trick Sad....But doing it with
MS Word yes! Thanks for the help.

I remember that in my utility i need change #10 to #10#13 (i need load
the sourcecode in TStringList and with the result of BabelCode
TStringList.Count always return 1, and i need fix the unit name (the web
service return the namespace but no the correct unit name), but maybe
the order was wrong? If is this, then i can recode the batch converter
and fix for the other files...

Back to top
Mario A. Montoya (mamcx)
Guest





PostPosted: Thu Dec 30, 2004 5:23 pm    Post subject: Re: Strange D2005 things... Reply with quote

Yes. In fact, i have this Wink. Is a nice tool, but i want convert a whole
C# project (230 files), so i build a batch converter, because do it at
hand is not funny.
Back to top
Liz
Guest





PostPosted: Thu Dec 30, 2004 5:25 pm    Post subject: Re: Strange D2005 things... Reply with quote

Mario A. Montoya (mamcx) wrote:

Quote:
I remember that in my utility i need change #10 to #10#13 (i need
load the sourcecode in TStringList and with the result of BabelCode
TStringList.Count always return 1, and i need fix the unit name (the
web service return the namespace but no the correct unit name), but
maybe the order was wrong? If is this, then i can recode the batch
converter and fix for the other files...

changing #10 to #10#13 can be done simply with a replace command

It depends a lot on what you're doing.

unix gives lines with #10, macs with #13 and dos is #13#10 I believe

Back to top
David Clegg
Guest





PostPosted: Thu Dec 30, 2004 5:32 pm    Post subject: Re: Strange D2005 things... Reply with quote

Mario A. Montoya (mamcx) wrote:

Quote:
but i want convert a whole C# project (230 files)

It should convert a whole project, although I've never tested it on one
that size.

--
Cheers,
David Clegg
[email]dclegg (AT) gmail (DOT) com[/email]

Vote 1 http://cc.borland.com/codecentral/ccweb.exe/listing?id=21489 Smile
Now supports Google Groups searching with Dyna-extend(tm) technology!

QualityCentral. The best way to bug Borland about bugs.
http://qc.borland.com

"Just because I don't care doesn't mean I don't understand." - Homer
Simpson

Back to top
Kevin
Guest





PostPosted: Thu Dec 30, 2004 7:24 pm    Post subject: Re: Strange D2005 things... Reply with quote

Mario A. Montoya (mamcx) wrote:
Quote:
- Compilation errors are marked always a line above real line of
problem. That cause me troubles because sometimes the above line look
more prone error but the next look easy but is the real cause of the
error. Only discover it because when you see that "begin" is the line of
error....yeah, riiiiight...

This has been a "problem" in Delphi for a few versions at least
(probably since version 1.0 I'm guessing). I know that it also occurs
in Delphi 7. To fix it Borland needs to treat LF characters like CR-LF
pairs. The editor currently does this for display of source code but
the error line reporting (from the compiler I guess) ignores the LF
characters so it reports the line number incorrectly.

This is a very perplexing problem when you first encounter it,
especially if you don't know that Unix text files are formatted
differently to "DOS" files.

I use my own LF to CR-LF utility to "fix" source code files when I see
this problem.

Cheers,
Kevin.

Back to top
Mario A. Montoya (mamcx)
Guest





PostPosted: Thu Dec 30, 2004 8:00 pm    Post subject: Re: THANKS Strange D2005 things... Reply with quote

Thanks to all. Now i'm working fine and feel more productive. Now, all
is working...
Back to top
Andrew Rybenkov
Guest





PostPosted: Thu Dec 30, 2004 8:05 pm    Post subject: Re: Strange D2005 things... Reply with quote

Quote:
(probably since version 1.0 I'm guessing).

that is hardly - Readln (language function!) was changed between D5 and D6.
Because of a Unix clone Borland 'ucked down the ancieniest compatibility.


--
Andrew Rybenkov.




Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Non-Technical All times are GMT
Goto page 1, 2  Next
Page 1 of 2

 
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.