Go to Post You don't need to prototype everything, just the stuff you want to work. - JVN [more]
Home
Go Back   Chief Delphi > Technical > Programming
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Closed Thread
 
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 01-03-2009, 11:34
ganjan ganjan is offline
Registered User
no team
 
Join Date: Mar 2009
Location: Norway
Posts: 1
ganjan is an unknown quantity at this point
Delphi 2009 Error: potential data loss from 'TCaption' to 'AnsiString'

Hi, Just starting learning Delphi. I am trying to learn how to send text strings over TCP. I made this really simple application that sends text strings from edit1 and the server application is suppose to add a new line in Memo1. Which it does, but only Chinese letters show up?!

ex:

127.0.0.1 Sends :
敨汬敯桔浥


I also get this Warning:

[DCC Warning] Client2.pas(38): W1058 Implicit string cast with potential data loss from 'TCaption' to 'AnsiString'

Client Code:

Code:
begin
  if ClientSocket1.Active = True then
   ClientSocket1.Socket.SendText(Edit1.Text);
end;
Server Code

Code:
procedure TForm1.ServerSocket1ClientRead(Sender: TObject;
  Socket: TCustomWinSocket);
begin
  Memo1.Lines.Add(Socket.ReceiveText);
end;
  #2   Spotlight this post!  
Unread 01-03-2009, 13:07
radau radau is offline
Registered User
no team
 
Join Date: Jan 2009
Location: CA
Posts: 9
radau is an unknown quantity at this point
Re: Delphi 2009 Error: potential data loss from 'TCaption' to 'AnsiString'

http://www.chiefdelphi.com/forums/sh...ad.php?t=29944
  #3   Spotlight this post!  
Unread 01-03-2009, 13:26
nathanww nathanww is offline
Hacker
FRC #1678 (Citrus Circuits)
Team Role: Programmer
 
Join Date: Dec 2008
Rookie Year: 2007
Location: Davis, CA
Posts: 224
nathanww is just really nicenathanww is just really nicenathanww is just really nicenathanww is just really nice
Re: Delphi 2009 Error: potential data loss from 'TCaption' to 'AnsiString'

Please read If you've come here for Delphi help...

I'm not saying that no one here can help you with this--but this forum is mostly about C,C++, and Labview, as applied to robotics.
__________________
Get yer robot source code here!
Closed Thread


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
paper: 2009 Motor Data kramarczyk Extra Discussion 7 18-01-2010 11:18
[TBA]: Team Data Refreshed for 2009 Greg Marra The Blue Alliance 6 01-03-2009 11:59
**FIRST EMAIL*/Opportunity to host a potential team from New Zealand at the Champions Mark McLeod FIRST E-Mail Blast Archive 18 24-04-2008 18:39
Delphi Swings to Loss, Mulls Bankrupcy sure_smile FIRST In the News... 8 10-08-2005 16:54
Potential confusion from this forum Ken Leung CD Forum Support 7 31-05-2001 23:57


All times are GMT -5. The time now is 01:13.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi