4
將IdUDPServer
添加到我的表單中並嘗試將一些代碼放入OnUDPRead
事件後,我無法在設計時向我的表單添加任何組件,也無法運行該應用程序。Delphi XE IDE代碼分析器錯誤?
this is the error i'm getting http://i54.tinypic.com/2j5jl0p.jpg
有沒有什麼辦法解決?
將IdUDPServer
添加到我的表單中並嘗試將一些代碼放入OnUDPRead
事件後,我無法在設計時向我的表單添加任何組件,也無法運行該應用程序。Delphi XE IDE代碼分析器錯誤?
this is the error i'm getting http://i54.tinypic.com/2j5jl0p.jpg
有沒有什麼辦法解決?
這個事件處理程序有兩個錯誤。要修復它們,您可以
TArray<System.Byte>
(在接口和實現)IdSocketHandle
到應用列表界面我還沒有進一步的研究,但這些更改後的代碼進行編譯。
所以完整的代碼想是
unit Unit12;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs,
IdSocketHandle, // <-- added
IdBaseComponent, IdComponent, IdUDPBase, IdUDPClient, IdUDPServer;
type
TForm12 = class(TForm)
IdUDPClient1: TIdUDPClient;
IdUDPServer1: TIdUDPServer;
procedure IdUDPServer1UDPRead(AThread: TIdUDPListenerThread;
AData: TArray<Byte>; ABinding: TIdSocketHandle);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form12: TForm12;
implementation
{$R *.dfm}
procedure TForm12.IdUDPServer1UDPRead(AThread: TIdUDPListenerThread;
AData: TArray<Byte>; ABinding: TIdSocketHandle);
begin
//
end;
上面的代碼編譯,但它不無法正常工作。我製作了一個簡單的應用程序,它使用了2個'IdUDPServer'合成器,一個用於廣播,另一個用於Listen,在Delphi 2010中按預期工作,但如果在DelphiXE中引入並構建不起作用,即使我用'TArray'替換'TBytes'與D2010一樣 –
2010-10-17 20:53:15
也許對Indy 10的更新版本有所幫助,'非官方'每日快照可在ftp://ftp.fulgan.com/ZIP獲得(當前:Indy10_4454.zip) – mjn 2010-10-18 14:30:25
我已經嘗試過'Indy10_4454.zip'和'Indy10Tiburon_4448.zip'沒有運氣,相同的行爲。 – 2010-10-18 22:37:16