install package -> device not functioning !!!

I'm developing a component package (Delphi 4). All is going well and I managed to install it in the IDE and use the components in a test app. Editing the components and re-building + re-installing also works fine.

This morning I started Delphi and got the following message:

can't load package xxx.bpl  
a device attached to your system is not functioning

(xxx = name of package)
I get the same message if I try re-install it after re-building.

According to the device manager of my computer, all devices work alright. I don't see any malfunctioning of my computer. Resources are not abundant, but nothing critical, as far as I can see.

What is wrong?

Wim
cadenzaAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

LischkeCommented:
Hi cadenza,

I too had a hard time with this kind of error message. I don't know if it applies here, but I have developed a control with Delphi 3.02 and every time another programmer which only had 3.0 or 3.01 installed got the said message.

The reason was that the control made calls to functions in packages which weren't there in earlier versions. Could that be the same reason in your case? My solution was to uncheck the "Build with runtime packages" check box in the package options. This compiled all necessary code directly into the control and it doesn't need to rely on existing dpls/bpls anymore.

Ciao, Mike
0
cadenzaAuthor Commented:
Hi Mike,

1) at the moment I am the only one who is working on this. The package has not yet seen any other hardware. All the time I have used 4.03.

2) runtime packages were unchecked. Checking/unchecking makes no difference for this problem

The fact that you had the same message under different circumstances and the mismatch between your real problem and the message confirm my earlier thoughts: this probably is a 'catch all' message and tells nothing about the real problem.

thanks for your feed back !

Wim
0
LischkeCommented:
I agree. The message had really nothing to do with the true problem and I assume this is here also the case...

Try making full rebuild of all custom packages and try creating stuff from the package in question at runtime. Does it come up with the same or an other error?

Ciao, Mike
0
Cloud Class® Course: Microsoft Windows 7 Basic

This introductory course to Windows 7 environment will teach you about working with the Windows operating system. You will learn about basic functions including start menu; the desktop; managing files, folders, and libraries.

cadenzaAuthor Commented:
Hi Mike,

in the mean time I did some further experiments. The package contains 4 components. The problem is connected to only one of them. If I delete it from the package, all goes well. The component in question works alright if created 'manually' at runtime. I tried to corner the problem by commenting out pieces of code, but have not been able to find anything. The only thing so far was that if I comment everything out except something like:

TMyClass = class(ParentClass)
private
end;

the package containing this 'component' installs without problem. boohooo :(  

I'll go on trying, but if you have (or someone else has) a solution or any idea that shortens this waste of time, I will be glad to give the points.

Wim
0
LischkeCommented:
Little tip: watch out for code which uses quite new stuff like special ComCtrl features, COM, TOM and such...

Ciao, Mike
0
cadenzaAuthor Commented:
Hi again,

I found a solution. The component which caused the problem is a descendant of TCustomGrid. I override the (protected) DrawCell method. Since I do a lot with colour palettes and mapping of data that is not there during designtime, I test on designtime and if so, I call the inherited DrawCell and exit the method:

if csDesigning in ComponentState then begin
  inherited DrawCell(..arguments..);
  exit;
end;

if I comment out the line where the inherited method is called, everything goes fine and I can install the component.

If you know why, I would be glad to know.

Cheers,

Wim
0
LischkeCommented:
:-) You should have posted the code you are executing now only at runtime. If it is too much then send it to public@lischke-online.de, otherwise post it here.

Ciao, Mike
0
cadenzaAuthor Commented:
Well, actually I think the lines that really do matter were the lines I already posted.

WOAHH !!!

While typing in the rest of my answer (explaining why I am puzzled) I found the answer:

TCustomGrid.DrawCell is abstract!! Descendant classes must override it (which I did, ofcourse), but can not call the parent method. Stupid: My first go at this component was to inherit from TDrawGrid, which does have an implemented DrawCell. When switching to TCustomGrid I forgot about this detail. (strange the compiler does not catch this...)

Well Mike, thanks for listening. If you had not been there, asking questions, I would never have discovered this. Thanks again + the points are yours.

Cheers,

Wim
0
LischkeCommented:
:-)) Yes, that's the way it is. I often found a problem by simply describing it to another guy...

Ciao, Mike
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
maverick65Commented:
*** PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER ! ***

No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in Community Support that this question is:

<Recommendation>
   PAQ'd and pts removed
</Recommendation>

If anyone participating in the question disagrees with the recommendation,
please leave a comment for the mods within the next 7 days.

*** PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER ! ***

maverick
0
cadenzaAuthor Commented:
I discovered that, other than my intentions, I still had not accepted Mike's comment as an answer. Sorry for that. I added interest as compensation :0)

cheerio,
Wim

0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Delphi

From novice to tech pro — start learning today.