![]() |
|
|
Регистрация Восстановить пароль |
Регистрация | Задать вопрос |
Заплачу за решение |
Новые сообщения |
Сообщения за день |
Расширенный поиск |
Правила |
Всё прочитано |
![]() |
|
Опции темы | Поиск в этой теме |
![]() |
#1 |
Пользователь
Регистрация: 27.12.2007
Сообщений: 34
|
![]()
Уважаемые программисты помогите чайнику!
uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, sTooledit, StdCtrls, Mask, sMaskEdit, sCustomComboEdit, sCurrEdit, sComboBoxes, sButton, sHintManager, sSkinProvider, sSkinManager, ExtCtrls, sSplitter, sPanel, sMemo, ComCtrls, ToolWin, sToolBar, sStatusBar, sComboBox, sFontCtrls, sLabel, ExtActns, ActnList, StdActns, XPStyleActnCtrls, ActnMan, RzCmboBx, TntStdCtrls, TntComCtrls, RzStatus, RzDBStat, RzPanel, IdUDPClient, IdBaseComponent, IdComponent, IdUDPBase, IdUDPServer, IdServerIOHandler, IdServerIOHandlerSocket, IdIOHandlerSocket, IdIOHandler, IdIOHandlerStream, IdTCPConnection, IdTCPClient, acMagn, Menus, IdSocketHandle; type TForm1 = class(TForm) sSkinManager1: TsSkinManager; sHintManager1: TsHintManager; sSplitter1: TsSplitter; TntMemo1: TTntMemo; TntMemo2: TTntMemo; sToolBar2: TsToolBar; RzFontComboBox1: TRzFontComboBox; ToolButton3: TToolButton; TntComboBox1: TTntComboBox; ToolButton4: TToolButton; RzStatusBar1: TRzStatusBar; RzClockStatus1: TRzClockStatus; Panel1: TPanel; TntButton1: TTntButton; RzPanel1: TRzPanel; sSplitter2: TsSplitter; sSplitter3: TsSplitter; sSplitter4: TsSplitter; sSplitter5: TsSplitter; IdUDPClient1: TIdUDPClient; IdUDPServer1: TIdUDPServer; procedure IdUDPServer1UDPRead(Sender: TObject; AData: TBytes; ABinding: TIdSocketHandle); procedure TntButton1Click(Sender: TObject); procedure TntComboBox1Change(Sender: TObject); procedure RzFontComboBox1Change(Sender: TObject); private { Private declarations } public { Public declarations } end; var Form1: TForm1; implementation {$R *.dfm} procedure TForm1.IdUDPServer1UDPRead(Sender: TObject; AData: TBytes; ABinding: TIdSocketHandle); var sfs:TStringStream; s:string; begin sfs:=TStringStream.Create(''); sfs.CopyFrom(AData,AData.Size); TntMemo1.Lines.Add(ABinding.PeerIP+ ' '+sfs.DataString); ABinding.SendTo(ABinding.PeerIP, ABinding.PeerPort s[1], Length(s)); sfs.Free end; procedure TForm1.RzFontComboBox1Change(Sender : TObject); begin TntMemo2.Font.Name:=RzFontComboBox1 .SelectedFont.Name; end; procedure TForm1.TntButton1Click(Sender: TObject); begin IdUDPClient1.Send(TntMemo2.Text); end; procedure TForm1.TntComboBox1Change(Sender: TObject); begin TntMemo2.Font.Size:=StrToInt(TntCom boBox1.Text); end; Текст ошибки: [Pascal Error] Unit1.pas(40): E2003 Undeclared identifier: 'TBytes' [Pascal Error] Unit1.pas(63): E2029 ')' expected but identifier 'Size' found [Pascal Error] Unit1.pas(64): E2066 Missing operator or semicolon [Pascal Error] Unit1.pas(65): E2010 Incompatible types: 'TBytes' and 'Char' [Pascal Error] Unit1.pas(65): E2010 Incompatible types: 'TIdIPVersion' and 'Integer' [Pascal Fatal Error] Project1.dpr(5): F2063 Could not compile used unit 'Unit1.pas' Последний раз редактировалось D@rk M@k; 28.12.2007 в 16:04. |
![]() |
![]() |
![]() |
#2 |
Старожил
Регистрация: 13.12.2006
Сообщений: 3,859
|
![]()
[Pascal Error] Unit1.pas(40): E2003 Undeclared identifier: 'TBytes'
[Pascal Error] Unit1.pas(41): E2003 Undeclared identifier: 'TIdSocketHandle' F1 !!!
ICQ не для вопросов, а для предложений. Для вопросов используйте форум
IRC канал клуба программистов|Мои статьи |
![]() |
![]() |
![]() |
#3 |
Старожил
Регистрация: 13.12.2006
Сообщений: 3,859
|
![]()
File
IdGlobal Declaration TBytes = array of Byte; Summary Array of byte data type for Windows and Linix. Description TBytes is an array of Byte data type used in declaring the TIdBytes data type used in the Indy library. TBytes is defined for the Windows and Linux platforms. See Also TIdBytes Class Hierarchy TIdCollectionItem TIdSocketHandle File IdSocketHandle Declaration TIdSocketHandle = class(TIdCollectionItem) Summary Represents a socket binding added to the TIdSocketHandles collection. Description TIdSocketHandle is a TCollectionItem descendant that represents a socket handle or binding added to the TIdSocketHandles collection. TIdSocketHandle provides properties and method needed to identify the socket handle allocated by the IP protocol stack, and to use perform functions like opening, closing, binding, sending and receiving using the socket descriptor. TIdSocketHandle is used in Indy to encapsulate the low-level connection and methods used to access the protocol stack in a Binding for TCP-based clients, IOHandlers, and client connections to a server. неужели эту великую клавишу на клавиатуре вы тоже сломали ?
ICQ не для вопросов, а для предложений. Для вопросов используйте форум
IRC канал клуба программистов|Мои статьи |
![]() |
![]() |
![]() |
![]() |
||||
Тема | Автор | Раздел | Ответов | Последнее сообщение |
IdUdpServer | CrazyProgramer | Работа с сетью в Delphi | 9 | 21.07.2008 16:36 |
Не знаю что за ошибка | Droid | Общие вопросы Delphi | 9 | 24.05.2008 22:18 |
Ошибка в IdUDPServer | Иллидан | Работа с сетью в Delphi | 1 | 24.02.2008 19:03 |
знаю только С++ | nurka | Общие вопросы C/C++ | 11 | 15.09.2007 23:53 |
idudpserver+mssql+adodataset | vodila | БД в Delphi | 1 | 11.08.2007 09:56 |