Subject RE: [IBO] Cursor Unknown
Author Alan McDonald
Thanks Marco, but no, I don't hide my forms, I create them if they are nil
and set them to nil on close.
My main form calls exit and on datamodule destroy which is pretty late in
the exit, I call disconnect... the while loop seems to work - it must be
asynchronously disconnecting while other things are going on. The loop
ensure that it all waits I suppose.


-----Original Message-----
From: Marco Menardi <mmenaz@...> [mailto:mmenaz@...]
Sent: Sunday, 2 March 2003 12:05 PM
Subject: Re: [IBO] Cursor Unknown

--- In, "Alan McDonald" <alan@m...> wrote:
> ah ha...
> drop a lookupcombo and exit your applciation while it is still the
drop down
> state... you get a cursor unkown..
> Does this mean that we all have to call closeup methods on any all
> lookupcombos on applicationexit ?
> Alan

mmm, I had problems like this:
For my forms, I set Action:=caFree to destroy (and not simply hide) them.
In this situation, with dataset in search mode and an item selected
from a IB_ComboBox, when I close the form an error occurs:
"Control 'cbxAccountType' has no parent window"

I sent a patch to Jason long time ago, but was never included. I would
be curios to know if it can solve your problem too, that could be
related. Would you please try this patch and let me know?

My problem seems due to the fact that assigning DataSource := nil in
the IB_ComboBox make the control try to retrieve ItemIndex, that needs
a window handle, but the window is already destroyed...
I've solved this problem with a simple patch, moving in
IB_ComboBox.Destroy the DataSource := nil after that the DataLink is
'defused', i.e.:
(file IBC_ComboBox.IMP)
// DataSource := nil; // --- old position
with DataLink do
Control := nil;
OnStateChanged := nil;
OnDataChange := nil;
OnUpdateData := nil;
DataSource := nil; // --- new position

To me seems not having side effects as far as I've tested it.

Thanks a lot
Marco Menardi

IB Objects - direct, complete, custom connectivity to Firebird or InterBase
without the need for BDE, ODBC or any other layer.
___________________________________________________________________________ - your IBO community resource for Tech Info papers,
keyword-searchable FAQ, community code contributions and more !

Your use of Yahoo! Groups is subject to