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 

New Session

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





PostPosted: Mon May 22, 2006 2:14 pm    Post subject: New Session Reply with quote



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





PostPosted: Tue May 23, 2006 4:14 am    Post subject: Re: New Session Reply with quote



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





PostPosted: Tue May 23, 2006 1:15 pm    Post subject: Re: New Session Reply with quote



"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





PostPosted: Wed May 24, 2006 11:35 pm    Post subject: Re: New Session Reply with quote

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
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.