Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

inherit from Object that inherit from TService

Posted on 2002-07-07
5
Medium Priority
?
295 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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 300 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

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Question has a verified solution.

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

Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
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…
Are you ready to place your question in front of subject-matter experts for more timely responses? With the release of Priority Question, Premium Members, Team Accounts and Qualified Experts can now identify the emergent level of their issue, signal…
Please read the paragraph below before following the instructions in the video — there are important caveats in the paragraph that I did not mention in the video. If your PaperPort 12 or PaperPort 14 is failing to start, or crashing, or hanging, …
Suggested Courses

610 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