Solved

inherit from Object that inherit from TService

Posted on 2002-07-07
5
289 Views
Last Modified: 2010-04-04
hi
i build a service shell that launch, close and detect when the application was closed (by process list), This shell inherit from TService (Service application wizard).
In my project i use this for 2 application can i do this generic?
i have the following code:

TGenericServiceShell = class(TService)
.
.
and
TMyService = class(TGenericServiceShell)

MyService unit was created by using ‘Service application’ wizard,  I changed the inheritance from TService to TgenericServiceShell, and then when closing the project and load it again i get an error about name missing, the service main form replaced with another one and the service doesn't work.

Thanks,
udi
0
Comment
Question by:udic
  • 3
  • 2
5 Comments
 
LVL 8

Expert Comment

by:TOndrej
ID: 7137391
You are trying to use form inheritance (because TService comes with a data module).
In that case, make sure the following is true:

The ancestor unit is part of your project.
The descendant's .dfm begins with 'inherited' keyword instead of 'object'.

You can achieve this at design time with File\New\Other... in your project tab, select ancestor, Inherit.

HTH
TOndrej
0
 

Author Comment

by:udic
ID: 7137806
i didn't success.how can i do this?
0
 
LVL 8

Accepted Solution

by:
TOndrej earned 75 total points
ID: 7138073
What's the problem? Is anything in my previous post unclear? Feel free to ask.
0
 

Author Comment

by:udic
ID: 7138159
sorry
Thank you i success, its work great

thanks alot
udi
0
 
LVL 8

Expert Comment

by:TOndrej
ID: 7138183
I'm glad that it helped you.
0

Featured Post

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

816 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now