Board index » delphi » Strange Errors (and no Errors, too)

Strange Errors (and no Errors, too)

This should probably go to .ide or somewhere, but I'm don't want to
subscribe for one pondering.

Anyway, I ha da form with a bunch of TDBEdits and such.  I
decided to use non-DBaware edits, so I opened the form as text
and search/replaced TDBEdit -> TEdit.

Delphi gave me a whole bunch of not-found errors upon recompile.

AND, when I highlighted the offending components and removed
the "Name" properties (left them blank), Delphi did not complain
about it.  Putting the "Name" back, everything worked fine.

Okay, I can maybe understand why Delphi didn't like me switching
component types like that. But why didn't it complain about having
a bunch of components with no names?
Anyone ever see this before?

--
Daniel J. Wojcik
http://www.genjerdan.com/index.htm
--

 

Re:Strange Errors (and no Errors, too)


It's a neat feature from D1. When you drop a component on the form, Delphi
adds it to form declaration, so if component has no name, it exists in
resource only, but can't be referenced directly from code as it can't be
declared with name.
So, when you convert dbedit to edit, you get bunch of errors:
1. on load: missing properties
2. on save: "component XX declared as tdbedit, but should be TEdit. Correct
it?"
if you rename it while editing DFM as text, you'll later get "Declaration
<OldName> has no corresponding component, remove the declaration?".
So, old declaration is removed, but the new is not added, because it was
renamed around designer and Delphi won't complain about declaration
mismatches, as there's no declaration.

Form with noname components is not inheritable.

--
----------------------
Regards
Robert Cerny
Remove both qwe when replying
email: robert.qwe.ce...@neosys.xrs.qwe.si

No questions via email, unless explicitly invited.

Quote
GenJerDan wrote in message <3920f92c@dnews>...
>This should probably go to .ide or somewhere, but I'm don't want to
>subscribe for one pondering.

>Anyway, I ha da form with a bunch of TDBEdits and such.  I
>decided to use non-DBaware edits, so I opened the form as text
>and search/replaced TDBEdit -> TEdit.

>Delphi gave me a whole bunch of not-found errors upon recompile.

>AND, when I highlighted the offending components and removed
>the "Name" properties (left them blank), Delphi did not complain
>about it.  Putting the "Name" back, everything worked fine.

>Okay, I can maybe understand why Delphi didn't like me switching
>component types like that. But why didn't it complain about having
>a bunch of components with no names?
>Anyone ever see this before?

>--
>Daniel J. Wojcik
>http://www.genjerdan.com/index.htm
>--

Re:Strange Errors (and no Errors, too)


Quote
> On Tue, 16 May 2000 12:18:17 +0200, "Robert Cerny"
> <robert.qwe.ce...@neosys.xrs.qwe.si> wrote: It's a neat feature from
> D1.

Makes sense.

Except it never happened in D2, D3, D4.  This has been my
standard way of changing my mind, and I never had this behavor
before.

Oh, well.  Not a big deal...as long as I don't have 47,000
components to change.  :>)

--
Daniel J. Wojcik
http://www.genjerdan.com/index.htm
--

Re:Strange Errors (and no Errors, too)


Quote
GenJerDan wrote:
> Except it never happened in D2, D3, D4.  This has been my
> standard way of changing my mind, and I never had this behavor
> before.

Yes, my standard way too.  In BCB the IDE will spot the type-conflict
and offer to fix it for me, problem solved!

However, I noticed GExperts has a similar function.  Maybe this will be
the smarter way to go in the future?

AlisdairM

Re:Strange Errors (and no Errors, too)


I tried the GExperts version before I found I could just re-class things in
the editor. It didn't work too well at the time. I've found that if I only
change the types of the components, it is usually just a matter of saying
"Yes" a bunch of times when Delphi is trying to save the form and asks me
"Component xxx is declared as Txxx but is actually Tyyy. Correct the
declaration?". The names I don't change by editing the form, because it
causes quite a few problems. I don't remember what they were, but I know I
don't want to go back and try it...

brian

"AlisdairM" <"alisdair.meredith"@NO_SPAM_PLE...@benettonformula.com> wrote
in message news:3921336c@dnews...

Quote
> GenJerDan wrote:

> > Except it never happened in D2, D3, D4.  This has been my
> > standard way of changing my mind, and I never had this behavor
> > before.

> Yes, my standard way too.  In BCB the IDE will spot the type-conflict
> and offer to fix it for me, problem solved!

> However, I noticed GExperts has a similar function.  Maybe this will be
> the smarter way to go in the future?

> AlisdairM

Re:Strange Errors (and no Errors, too)


Didn't?
Maybe you didn't notice it. I just wanted to point out that this existed
from D1 and is still there. I'm doing this all the time (replacing component
classes), lately using GExperts.

BTW, GExperts is really excellect set of experts. Some wrote it destabilizes
IDE, but to my experience it most of times turns out as buggy own or third
party component.

--
----------------------
Regards
Robert Cerny
Remove both qwe when replying
email: robert.qwe.ce...@neosys.xrs.qwe.si

No questions via email, unless explicitly invited.

Quote

>Makes sense.

>Except it never happened in D2, D3, D4.  This has been my
>standard way of changing my mind, and I never had this behavor
>before.

>Oh, well.  Not a big deal...as long as I don't have 47,000
>components to change.  :>)

>--
>Daniel J. Wojcik
>http://www.genjerdan.com/index.htm
>--

Other Threads