Delphi-PRAXiS

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   Lazarus (IDE) (https://www.delphipraxis.net/81-lazarus-ide/)
-   -   Eigene nonvisual Component mit Collection nicht in OI... (https://www.delphipraxis.net/154112-eigene-nonvisual-component-mit-collection-nicht-oi.html)

webcss 28. Aug 2010 10:35

Eigene nonvisual Component mit Collection nicht in OI...
 
...(ObjectInspector) editierbar.

Hallo,
ich habe eine NonVisualComponent erstellt mit einer TOwnedCollection als published property.
Die Colletion wird zwar im OI angezeigt, wenn ich jedoch Einträge hinzufügen will, kommt die Meldung "Collection=nil".
Die Collection wird im Constructor meiner Komponente erzeugt.
Delphi-Quellcode:
constructor TMyComponent.Create(AOwner: TComponent);
begin
  inherited Create(AOwner);
  FMyCollection:= TMyCollection.Create(self);
end;
Was mache ich verkehrt?

himitsu 28. Aug 2010 10:45

AW: Eigene nonvisual Component mit Collection nicht in OI...
 
hat du das Override vergessen?
(der Constructor bei TComponent ist absichtlich Virtual)

webcss 28. Aug 2010 10:57

AW: Eigene nonvisual Component ...[SOLVED]
 
Zitat:

Zitat von himitsu (Beitrag 1045683)
hat du das Override vergessen?
(der Constructor bei TComponent ist absichtlich Virtual)

Danke! Das war's, ich Hornvieh :oops::lol:


Alle Zeitangaben in WEZ +1. Es ist jetzt 03:42 Uhr.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz