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 

XP Carriage return

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> comp.lang.pascal.delphi.misc
View previous topic :: View next topic  
Author Message
Hans J. Klarskov Mortense
Guest





PostPosted: Sat Dec 13, 2003 9:46 pm    Post subject: XP Carriage return Reply with quote



A wierd problem: On one machine running Win XP the memo-controls will
not accept a CR/LF entered from the keybord. Lines added
programatically by eg

with memo1.lines. do begin
add('Blalalald');
.....
add('More blablabla');

appear as one long line and instead of CR/LF I get black squares. It
works perfectly on WinMe/98 - and one other XP-machine. I use Delphi 5
pro. No problem with TRichEdit controls. It sounds stupid, I know -
but it is nevertheless a problem.
Any help would be greatly appreciated.

Hans J. Klarskov Mortensen
Back to top
AlanGLLoyd
Guest





PostPosted: Sun Dec 14, 2003 11:44 am    Post subject: Re: XP Carriage return Reply with quote



In article <7eadf3c9.0312131346.49e1cfde (AT) posting (DOT) google.com>,
[email]km (AT) vordingbg-gym (DOT) dk[/email] (Hans J. Klarskov Mortensen) writes:

Quote:
A wierd problem: On one machine running Win XP the memo-controls will
not accept a CR/LF entered from the keybord. Lines added
programatically by eg


Have you tried another keyboard - sounds like it may be sending LF/CR.
Alternatively copy (or stream, but _don't_ use Memo1.Lines.SaveToStream)
Memo1.Lines.Text to a file (after inputting a few lines with funny line breaks)
and check the content of the file using DEBUG in a Dos window for "0C 0A" pairs
(correct) and not "0A 0C".

Alan Lloyd
[email]alanglloyd (AT) aol (DOT) com[/email]

Back to top
AlanGLLoyd
Guest





PostPosted: Sun Dec 14, 2003 12:26 pm    Post subject: Re: XP Carriage return Reply with quote



In article <20031214064434.00545.00002920 (AT) mb-m02 (DOT) aol.com>, [email]alanglloyd (AT) aol (DOT) com[/email]
(AlanGLLoyd) writes:

Quote:
and check the content of the file using DEBUG in a Dos window for "0C 0A"
pairs
(correct) and not "0A 0C".


Whooopps

....and check the content of the file using DEBUG in a Dos window for "0D 0A"
pairs
(correct) and not "0A 0D".

Alan Lloyd
[email]alanglloyd (AT) aol (DOT) com[/email]

Back to top
Tom de Neef
Guest





PostPosted: Sun Dec 14, 2003 9:25 pm    Post subject: Re: XP Carriage return Reply with quote

"Hans J. Klarskov Mortensen" <km (AT) vordingbg-gym (DOT) dk> wrote

Quote:
A wierd problem: On one machine running Win XP the memo-controls will
not accept a CR/LF entered from the keybord. Lines added
programatically by eg

with memo1.lines. do begin
add('Blalalald');
....
add('More blablabla');

appear as one long line and instead of CR/LF I get black squares. It
works perfectly on WinMe/98 - and one other XP-machine. I use Delphi 5
pro. No problem with TRichEdit controls. It sounds stupid, I know -
but it is nevertheless a problem.
Any help would be greatly appreciated.

Hans J. Klarskov Mortensen

What's in the black squares? Can you retrieve the byte values ?
Tom




Back to top
Hans J. Klarskov Mortense
Guest





PostPosted: Mon Dec 15, 2003 3:42 pm    Post subject: Re: XP Carriage return Reply with quote

"Tom de Neef" <tdeneef (AT) qolor (DOT) nl> wrote

Quote:
"Hans J. Klarskov Mortensen" <km (AT) vordingbg-gym (DOT) dk> wrote in message
news:7eadf3c9.0312131346.49e1cfde (AT) posting (DOT) google.com...
A wierd problem: On one machine running Win XP the memo-controls will
not accept a CR/LF entered from the keybord. Lines added
programatically by eg

with memo1.lines. do begin
add('Blalalald');
....
add('More blablabla');

appear as one long line and instead of CR/LF I get black squares. It
works perfectly on WinMe/98 - and one other XP-machine. I use Delphi 5
pro. No problem with TRichEdit controls. It sounds stupid, I know -
but it is nevertheless a problem.
Any help would be greatly appreciated.

Hans J. Klarskov Mortensen

What's in the black squares? Can you retrieve the byte values ?
Tom


As far as I can see the "squares" are in fact OD OAs! However, I have
decided to skip the memo control altogether. In the end it turned out
to be easier than debugging this phenomenon on somebody else's
machine. But the problem has not disappeared - only been
worked-around.
Thanks for your interest!

Hans J. Klarskov Mortensen

Back to top
Hans J. Klarskov Mortense
Guest





PostPosted: Mon Dec 15, 2003 4:11 pm    Post subject: Re: XP Carriage return Reply with quote

[email]alanglloyd (AT) aol (DOT) com[/email] (AlanGLLoyd) wrote in message news:<20031214064434.00545.00002920 (AT) mb-m02 (DOT) aol.com>...
Quote:
In article <7eadf3c9.0312131346.49e1cfde (AT) posting (DOT) google.com>,
[email]km (AT) vordingbg-gym (DOT) dk[/email] (Hans J. Klarskov Mortensen) writes:

A wierd problem: On one machine running Win XP the memo-controls will
not accept a CR/LF entered from the keybord. Lines added
programatically by eg


Have you tried another keyboard - sounds like it may be sending LF/CR.

Actually I have.
Oddly enough it not only solved the problem with text entered via the
keybord, it also solved the problem with odd characters entered
programatically. I have no idea whatsoever as to the cause of this -
especially since it seems that it was 0D 0As! But then again, nobody
has promised us that computing is a rational undertaking. Thanks.

Hans J. Klarskov Mortensen

Back to top
Bruce Roberts
Guest





PostPosted: Mon Dec 15, 2003 5:07 pm    Post subject: Re: XP Carriage return Reply with quote


"Hans J. Klarskov Mortensen" <km (AT) vordingbg-gym (DOT) dk> wrote


Quote:
Actually I have.
Oddly enough it not only solved the problem with text entered via the
keybord, it also solved the problem with odd characters entered
programatically. I have no idea whatsoever as to the cause of this -
especially since it seems that it was 0D 0As! But then again, nobody
has promised us that computing is a rational undertaking. Thanks.

When hardware goes bad there is no way to account for the results. I've seen
several keyboards act up in strange ways. Too bad they are not designed to
simply stop sending data when they fail.



Back to top
AlanGLLoyd
Guest





PostPosted: Mon Dec 15, 2003 7:17 pm    Post subject: Re: XP Carriage return Reply with quote

In article <7eadf3c9.0312150811.75debc73 (AT) posting (DOT) google.com>,
[email]km (AT) vordingbg-gym (DOT) dk[/email] (Hans J. Klarskov Mortensen) writes:

Quote:
Actually I have.
Oddly enough it not only solved the problem with text entered via the
keybord, it also solved the problem with odd characters entered
programatically. I have no idea whatsoever as to the cause of this -
especially since it seems that it was 0D 0As! But then again, nobody
has promised us that computing is a rational undertaking. Thanks.


Intuition and the aged crystal ball wins again <gg>

I wished you'd put the text in a file as I suggested so that one could be sure
what the keyboard was putting in - I'm always intensely curious about these
"odd" affairs and don't like irrational, un-explained, and un-scientific
experiences.

Maybe the keyboard had an odd descriptor for its plug-and-play, which caused
the wrong driver to be loaded by Win XP. Then when you changed the keyboard,
the correct driver was loaded.

Alan Lloyd
[email]alanglloyd (AT) aol (DOT) com[/email]

Back to top
Henry Bartlett
Guest





PostPosted: Mon Dec 15, 2003 10:03 pm    Post subject: Re: XP Carriage return Reply with quote

Replying to Hans J. Klarskov Mortensen since I cannot see his post on
this news server and I cannot post on the one I see it on.

Your problem sounds to me as though you are running out of memory on
this machine.

In Win 9X, you see these symptoms when the you are nearing the maximum
capacity of the memo.

What is your Memo's Capacity and how much text do you have in it?


--
Henry Bartlett



Back to top
Maarten Wiltink
Guest





PostPosted: Tue Dec 16, 2003 10:07 pm    Post subject: Re: XP Carriage return Reply with quote

"AlanGLLoyd" <alanglloyd (AT) aol (DOT) com> wrote

Quote:
In article <7eadf3c9.0312131346.49e1cfde (AT) posting (DOT) google.com>,
[email]km (AT) vordingbg-gym (DOT) dk[/email] (Hans J. Klarskov Mortensen) writes:

A wierd problem: On one machine running Win XP the memo-controls will
not accept a CR/LF entered from the keybord. Lines added
programatically by eg

Have you tried another keyboard - sounds like it may be sending LF/CR.
Alternatively copy (or stream, but _don't_ use Memo1.Lines.SaveToStream)
Memo1.Lines.Text to a file (after inputting a few lines with funny line
breaks) and check the content of the file using DEBUG in a Dos window
for "0C 0A" pairs (correct) and not "0A 0C".

That would be FF-CR. (Formfeed, not $ff.)

Groetjes,
Maarten Wiltink



Back to top
Bruce Roberts
Guest





PostPosted: Tue Dec 16, 2003 10:47 pm    Post subject: Re: XP Carriage return Reply with quote


"Maarten Wiltink" <maarten (AT) kittensandcats (DOT) net> wrote


Quote:
That would be FF-CR. (Formfeed, not $ff.)

These characters are defined in ASCII and were based on the teletype which
was often used at the time as a terminal/printer. Other ASCII characters <
$20 were designed for communications with serial (and other) devices.

LF - line feed - $0a - move print carriage up 1 line
CR - carriage return - $0d - move print head left to the beginning of the
line
FF - form feed - $0c - move print carriage up to top of next page




Back to top
Hans J. Klarskov Mortense
Guest





PostPosted: Wed Dec 17, 2003 8:19 am    Post subject: Re: XP Carriage return Reply with quote

Quote:
Your problem sounds to me as though you are running out of memory on
this machine.

In Win 9X, you see these symptoms when the you are nearing the maximum
capacity of the memo.

What is your Memo's Capacity and how much text do you have in it?

I do not think it is/was a memory problem. The memo capacity is
Delphi's default value, and the problem occurred with as little as 2
words in the memo - and it never exceeded some 1500 words.

Hans J. Klarskov Mortensen

Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> comp.lang.pascal.delphi.misc 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.