What is the error that you are getting? ----- Original Message ----- From: "Alistair George" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Monday, June 21, 2004 6:50 AM Subject: [DUG] Problem with 'as' casting
> Hi all. The operation is a user clicks a field which should turn into an > edit, then a popup event where a couple of options on the highlighted text, > one of them as shown here. However it is erroring on the first occurence of > seltext. Anyone know why? Thanks, Al+ > procedure Tmainform.AddtoFavourites1Click(Sender: TObject); > var TempStr: string; > begin > //Test for valid edit mode, if not, close PopUp > if not (ActiveControl is TCustomEdit) then > begin > PostMessage(Handle, WM_LBUTTONDOWN, MK_LBUTTON, 0); > PostMessage(Handle, WM_LBUTTONUP, MK_LBUTTON, 0); > exit; > end; > with Activecontrol as TCustomEdit do > begin > if Length(SelText) > 0 then > begin > TempStr := ParseMailAdds(SelText); > > ...................... > > _______________________________________________ > Delphi mailing list > [EMAIL PROTECTED] > http://ns3.123.co.nz/mailman/listinfo/delphi > _______________________________________________ Delphi mailing list [EMAIL PROTECTED] http://ns3.123.co.nz/mailman/listinfo/delphi
