[fpc-devel] Message method with a string identifier

Don Whitbeck donwhit at zoominternet.net
Tue Jul 14 13:03:46 CEST 2009


//Defining msg
Type
   TMsg = record
        MsgStr: string[20];   //Doesn't work
	                              //MSGID: integer;  // Works
	Data: pointer;
    end;

TCustomSocket = Class(TObject)
...
 Procedure MsgHandler(Var Msg: TMsg); Message 'OnAccept';


 ASocket:=TCustomSocket.Create;
var
   msg: TMsg;
....
   msg.MsgStr := 'OnAccept';
  msg.Data := PS;     // Pointer to data
   ASocket.dispatchStr(msg);


Defining a message handler identified with an integer and calling with dispatch 
works.
For some reason I am not successful in defining a message handler identified 
with a string and calling it with dispatchstr.

On Tuesday 14 July 2009 02:59:52 am Michael Schnell wrote:
> Don Whitbeck wrote:
> > Message methods with a string identifier work fine.
> > Message methods with a string identifier appear not to work.
>
> ?????
> -Michael
> _______________________________________________
> fpc-devel maillist  -  fpc-devel at lists.freepascal.org
> http://lists.freepascal.org/mailman/listinfo/fpc-devel




More information about the fpc-devel mailing list