Jump to content
Sign in to follow this  
Stano

Custom component - delete connected component - Abstract error

Recommended Posts

Hi,

MyDBNavigator.DataSource - connect MyDataSource
Delete directly from MyDataSource form
I get an abstract error. The DFM file is fine. MyDataSource is not there. Nothing can be done.
I know the error is with me. I don't know where and how to look for it.

This points to problems with DesignEditors. I don't see a way to do anything about it.
=======
[23B7D1D7]{dcldb280.bpl} Vcl.Design.QuickDataSourceEditors.TValue.AsType<System.Classes.TComponent> (Line 2675, "System.Rtti.pas" + 2) + $12
[23B7CF05]{dcldb280.bpl} Vcl.Design.QuickDataSourceEditors.TQuickDataSourceSelectionEditor.BuildContextMenu (Line 61, "Vcl.Design.QuickDataSourceEditors.pas" + 15) + $3F
=======
[5B181456]{rtl280.bpl  } System.SysUtils.AbstractErrorHandler (Line 24239, "System.SysUtils.pas" + 0) + $12
[5B13C3C0]{rtl280.bpl  } System.@AbstractError (Line 11379, "System.pas" + 2) + $0
[5B239B59]{rtl280.bpl  } System.Classes.FindRootDesigner (Line 6097, "System.Classes.pas" + 1) + $B
[5A84FB90]{designide280.bpl} DesignEditors.TComponentProperty.AllEqual (Line 1842, "DesignEditors.pas" + 7) + $6
=======
This applies to all connected components. It's very annoying. See the blank line in the attachment. There I have deleted another component as DataSource.

2023 02 22 19 27 09 Pokusy_-_Delphi_11_-_MainForm_[Built].png

Share this post


Link to post

 none code for help us?

 

abstract error, stay to "needs implement a proc/func" inherited from "ancestral", but in your class "does not exists yet"!  it needs be implement in your custom component class

Edited by programmerdelphi2k

Share this post


Link to post

That is the answer I have already received. According to the picture and the error listing, the problem is elsewhere. I used the standard DBNavigator as a sample. I didn't write it quite right. AV is only sometimes. I apologize.
DBNavigator is derived from TCustomPanel. That doesn't play any role here.
I don't have any such code. I am attaching the whole unit.

jstFDNavigator.pas

Share this post


Link to post

I seem to have found it

procedure TjstFDNavigator.Notification(AComponent: TComponent; Operation: TOperation);
begin
  inherited Notification(AComponent, Operation);

  if (Operation = opRemove) and (AComponent = DataSource) then
    DataSource := nil;
end;

 

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×