Print Page | Close Window

ApplicationServices not instantiating (D2010)

Printed From: TMS Software
Category: VCL Components
Forum Name: VCL Plugin
Forum Discription:
Printed Date: 28 May 2020 at 2:43am

Topic: ApplicationServices not instantiating (D2010)
Posted By: Ilola Jouni
Subject: ApplicationServices not instantiating (D2010)
Date Posted: 14 Jul 2010 at 4:22pm
Hi all!

Does anyone have an idea why my ApplicationServices variable is not getting instantiated when I try to create a simple Hello World type test?
The demos from the distribution work so I don't think it's an installation problem.
I'm getting frustrated as I cannot see any (significant) difference between the demo project and mine.


Posted By: Bruno Fierens
Date Posted: 14 Jul 2010 at 5:19pm
Not sure what is causing this. Do you setup package dependencies properly ?
If a problem persists, most likely, the fastest way to trace this is by sending some sample source project that has the problem by direct email.

Posted By: Ilola Jouni
Date Posted: 15 Jul 2010 at 11:05am
Thanks for your reply.

It seems to me one reason could be the upfintf package (which contains the ApplicationService variable) is not consistently seem by the application and the plugin.
One reason may be differing search paths (I haven't verified this yet).
Since the demo projects work there should be some viosible differences between project options.

I'll go through the project settings and get back with the sample project if the problem still persists.


Posted By: Ilola Jouni
Date Posted: 15 Jul 2010 at 11:38am
Ok. I finally saw where I had a difference.
I was loading the plugins in an overridden TForm.Loaded method.
The demo was doing this in TForm.FormShow.

I changed mine to do the same and presto! It seems I need to go back and review when different things get initialized. Apparently the applictionservices variable gets initialized AFTER loaded but BEFORE FormShow.
This was a silly oversight on my part. Live and learn, eh?


Posted By: Bruno Fierens
Date Posted: 15 Jul 2010 at 1:05pm
Ok, thanks for informing the issue was found & solved.

Print Page | Close Window