 |
BorlandTalk.com Borland discussion newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
Maurizio Ferreira Guest
|
Posted: Wed Jun 29, 2005 10:14 am Post subject: invalid class type cast error at runtime |
|
|
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 |
|
 |
|
|
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
|
|