BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

invalid class type cast error at runtime

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Thirdparty Tools (IntraWeb)
View previous topic :: View next topic  
Author Message
Maurizio Ferreira
Guest





PostPosted: Wed Jun 29, 2005 10:14 am    Post subject: invalid class type cast error at runtime Reply with quote



I receive an invalid class typecast executing the following code :

procedure TTopFrame.AllineaFrames (InitPos : integer);
var P : tIwForm;
I : integer;
F : tDummyFrame;
begin
P := (Parent as TIWForm);
with P do
for I := 0 to ComponentCount -1 do begin
if Components[i] is tFrame then begin
F := (Components[i] as tDummyFrame); <----- here the error
if (F.Parent=p) and (F.Align = alNone) and F.Visible then begin
F.Left := InitPos;
F.IwFrameRegion.Width := Self.Width-F.Left;
InitPos := InitPos+F.Width;
end;
end
end;
end;

The actual frame type is an intraweb frame constructed by an external
package, so since I cannot specify the exact frame type in this
procedure, I've defined an empty dummy frame just to be able to
type cast the external frame to an intraweb frame,
and then access the internal IwFrameRegion property.

why the RUNTIME error message ?
what does it means ?
any suggestion ?
Regards
Maurizio




Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Thirdparty Tools (IntraWeb) All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.