Re: Component



I am trying to do just that. I create the component at runtime and I can
debug it, though I can't see it. My componente it's a descendent from
TLabel. I load a new application and on it's OnCreate event I create an
instance of my component that just scrolls its caption froma right to left
and viceversa. I can folllow execution af my routine which appears to work,
but can't see the ScrollLabel on the form, though I gave the instance the
Top and Left properties coordinates.

That's why I tried to install it and found out that as soon as I drop the
component on the form just doesn't execute. I just get the error message I
described. I don't have any On Paint nor other routines tied to events apart
from an OnTimer event. I cancelled it to try, but that didn't resolve the
problem... I am stuck !

"Rob Kennedy" <me3@xxxxxxxxxxx> ha scritto nel messaggio
news:520c44F1l3iunU1@xxxxxxxxxxxxxxxxxxxxx
Vertuas wrote:
Running delphi inside its own debugger is new to me.

How do I do that??

In your main Delphi instance -- the one you're using to develop the
package -- open the "Run Parameters" dialog and set the EXE to be Delphi
itself. Then "run" the package. Delphi will start the given EXE (which
just happens to be itself, in this case) and when your package is
loaded, you can debug it.

This is also the technique you use to debug a DLL. The target EXE
probably won't be Delphi in that case, though.

It helps to have two screens. That way, you can more easily keep track
of which instance of Delphi is which.

I only do this when I'm desperate. For debugging normal run-time
behavior of a component, just write a normal program and create the
component at run time. That is, don't have the package installed in
Delphi, and don't place the component using the Form Designer. Just
create the component from within your form's OnCreate handler, or in a
button's OnClick handler. This will only let you debug the run-time
behavior, but it's easier than trying to manage two simultaneous
instances of Delphi.

--
Rob


.