Board index » delphi » Creating form using another form as owner

Creating form using another form as owner

I keep geeting an exception that indicates that an "invalid floating point
operation has occured" on the create. Here is the code.

  FormStatus := TFormStatus.create ( Owner )  ;

Is the line that raises exception.

Owner is passed in from another unit as a TComponent...here is the calling
procedure.

Print_CTS_Status_Screen( TComponent(frmScreen) , ora_session,
lbl_Agency.caption, lbl_ssn.caption, var_screen_date,
lbl_client_name.Caption ) ;

Where TComponent(frmScreen) is the "Owner" in the above code.

If I call:   FormStatus := TFormStatus.create ( frmScreen )  ; before the
PRINT_CTS_STATUS_SCREEN call I don't get an exception.

HELP!

Thanks.

 

Re:Creating form using another form as owner


Bill,

that exception is probably coming from something in the OnCreate handler for
TFormStatus. Do you have any fp operations there?

--
Regards
Ralph (TeamB)
--

Quote
Bill Swift wrote in message <7bhmo1$...@forums.borland.com>...

|I keep geeting an exception that indicates that an "invalid floating point
|operation has occured" on the create. Here is the code.
|
|
|
|  FormStatus := TFormStatus.create ( Owner )  ;
|
|Is the line that raises exception.
|
|
|Owner is passed in from another unit as a TComponent...here is the calling
|procedure.

Re:Creating form using another form as owner


Try Application as an Owner... that might help.

--
Martijn Tonies

<- remove some characters from my email adress to reply ->
m.ton...@somecharacters.upscene.demon.nl
http://www.upscene.demon.nl

Bill Swift heeft geschreven in bericht <7bhmo1$...@forums.borland.com>...

Quote
>I keep geeting an exception that indicates that an "invalid floating point
>operation has occured" on the create. Here is the code.

>  FormStatus := TFormStatus.create ( Owner )  ;

>Is the line that raises exception.

>Owner is passed in from another unit as a TComponent...here is the calling
>procedure.

>Print_CTS_Status_Screen( TComponent(frmScreen) , ora_session,
>lbl_Agency.caption, lbl_ssn.caption, var_screen_date,
>lbl_client_name.Caption ) ;

>Where TComponent(frmScreen) is the "Owner" in the above code.

>If I call:   FormStatus := TFormStatus.create ( frmScreen )  ; before the
>PRINT_CTS_STATUS_SCREEN call I don't get an exception.

>HELP!

>Thanks.

Re:Creating form using another form as owner


No. The funny thing is there is no OnCreate code that I have put in.

When I have a debug set on this line of code and hit f7 it goes to first
line in a finally clause, not to another event handler.

Quote
Ralph Friedman (TeamB) wrote in message <7bj0ln$1...@forums.borland.com>...
>Bill,

>that exception is probably coming from something in the OnCreate handler
for
>TFormStatus. Do you have any fp operations there?

>--
>Regards
>Ralph (TeamB)
>--

Other Threads