| View previous topic :: View next topic |
| Author |
Message |
Massimo Bolzoni Guest
|
Posted: Mon May 22, 2006 2:14 pm Post subject: New Session |
|
|
Hi friends,
I need in ServerControllerBaseNewSession event to
establish which form must be displayed among three
available form, according to an integer code managed
by another part of the application; but I don't be able
to do this action. I made:
VMainForm := TMyForm.Create(nil);
but I always get an Access violation!
How can I do to get my form displayed without errors?
Thank you very much, Massimo. |
|
| Back to top |
|
 |
Olaf Monien (Atozed Softw Guest
|
Posted: Tue May 23, 2006 4:14 am Post subject: Re: New Session |
|
|
Forms must always be owned by WebApplication (ASession in the case of
OnNewSession Event)
Massimo Bolzoni wrote:
| Quote: | VMainForm := TMyForm.Create(nil);
but I always get an Access violation!
|
--
Regards,
Olaf Monien
Atozed Software
----------------------------------
Blog: blogs.atozed.com/olaf
Free CMS:www.atozed.com/iws |
|
| Back to top |
|
 |
Massimo Bolzoni Guest
|
Posted: Tue May 23, 2006 1:15 pm Post subject: Re: New Session |
|
|
"Olaf Monien (Atozed Software)" <olaf-no-spam-please (AT) atozed (DOT) com> wrote in
message news:447288b7 (AT) newsgroups (DOT) borland.com...
| Quote: | Forms must always be owned by WebApplication (ASession in the case of
OnNewSession Event)
Massimo Bolzoni wrote:
VMainForm := TMyForm.Create(nil);
but I always get an Access violation!
--
Regards,
Olaf Monien
Atozed Software
|
Thanks Olaf,
but I always gey an Access violation even if I put
VMainForm := TMyForm.Create(ASession);
I solved the problem in this way:
1) no VMainForm management in OnNewSession Event.
2) in main form unit I deleted TformMain.SetAsMainForm (initialization
section);
3) I add the initialization section in the other 3 forms:
initialization
if (code=CodeForThisForm) then
TMyForm.SetAsMainForm;
and so on for the other two forms. |
|
| Back to top |
|
 |
Olaf Monien (Atozed Softw Guest
|
Posted: Wed May 24, 2006 11:35 pm Post subject: Re: New Session |
|
|
Massimo Bolzoni wrote:
| Quote: |
"Olaf Monien (Atozed Software)" <olaf-no-spam-please (AT) atozed (DOT) com
wrote in message news:447288b7 (AT) newsgroups (DOT) borland.com...
Forms must always be owned by WebApplication (ASession in the case
of OnNewSession Event)
Massimo Bolzoni wrote:
VMainForm := TMyForm.Create(nil);
but I always get an Access violation!
-- Regards,
Olaf Monien
Atozed Software
Thanks Olaf,
but I always gey an Access violation even if I put
VMainForm := TMyForm.Create(ASession);
|
That means that something in your form does not get created properly.
| Quote: |
I solved the problem in this way:
1) no VMainForm management in OnNewSession Event.
2) in main form unit I deleted TformMain.SetAsMainForm
(initialization section); 3) I add the initialization section in the
other 3 forms: initialization
if (code=CodeForThisForm) then
TMyForm.SetAsMainForm;
and so on for the other two forms.
|
That does not work dynamically. Its called when the ISAPI/exe is loaded.
--
Regards,
Olaf Monien
Atozed Software
----------------------------------
Blog: blogs.atozed.com/olaf
Free CMS:www.atozed.com/iws |
|
| Back to top |
|
 |
|