Newsgroups : Borland : borland.public.delphi.rtl.win32 : 2005 Apr : Typcasting is not working (D6)

www.cryer.info
Managed Newsgroup Archive

Typcasting is not working (D6)

Subject:Typcasting is not working (D6)
Posted by:"Tanju zogur" (tanjuozg..@yahoo.com)
Date:Wed, 6 Apr 2005 00:10:28

Hi !1

When I typcast a function argument ,say it Obj , at function body this
object doesn't behave like tycasted object ,so I need to typcast it at
function at each call when needed .

//

var
Obj :TgraphicalObject;
NObject :TObject2D;

begin
NObject := (Obj as TObject2D); /// This code fails
// so I need to call (Obj as TObject2D) when I need the NObject

Replies:

www.cryer.info
Managed Newsgroup Archive