<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Komponentenentwicklung -&amp;gt; Problem bei Eigenschaften]]></title><description><![CDATA[<p>Hi!!</p>
<p>Ich leite gerade eine Komponente von TComboBox ab. Ich versuche eine einfach StringList als Eigenschaft zu integrieren. Leider bekomme ich einen komischen Fehler <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f609.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--winking_face"
      title=";)"
      alt="😉"
    /></p>
<p>Header:</p>
<pre><code class="language-cpp">//---------------------------------------------------------------------------

#ifndef ONMComboBoxH
#define ONMComboBoxH
//---------------------------------------------------------------------------
#include &lt;SysUtils.hpp&gt;
#include &lt;Classes.hpp&gt;
#include &lt;Controls.hpp&gt;
#include &lt;StdCtrls.hpp&gt;
#include &lt;String.h&gt;
//---------------------------------------------------------------------------
class PACKAGE TONMComboBox : public TComboBox
{
private:
	TStringList* FAllItems;
	void __fastcall SetAllItems(TStringList* value);
protected:
public:
	__fastcall TONMComboBox(TComponent* Owner);
__published:
	__property TStringList* AllItems = {read=AllItems, write=SetAllItems};
};
//---------------------------------------------------------------------------
#endif
</code></pre>
<p>C++:</p>
<pre><code class="language-cpp">//---------------------------------------------------------------------------

#include &lt;vcl.h&gt;

#pragma hdrstop

#include &quot;ONMComboBox.h&quot;
#pragma package(smart_init)
//---------------------------------------------------------------------------
// Mit ValidCtrCheck wird sichergestellt, dass die erzeugten Komponenten
// keine rein virtuellen Funktionen besitzen.
//

static inline void ValidCtrCheck(TONMComboBox *)
{
	new TONMComboBox(NULL);
}
//---------------------------------------------------------------------------
__fastcall TONMComboBox::TONMComboBox(TComponent* Owner)
	: TComboBox(Owner)
{
}
//---------------------------------------------------------------------------
namespace Onmcombobox
{
	void __fastcall PACKAGE Register()
	{
		TComponentClass classes[1] = {__classid(TONMComboBox)};
		RegisterComponents(&quot;Standard&quot;, classes, 0);
	}
}
//---------------------------------------------------------------------------
</code></pre>
<p>Bin dankbar für jede Hilfe!!! <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f642.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--slightly_smiling_face"
      title=":)"
      alt="🙂"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/topic/188606/komponentenentwicklung-gt-problem-bei-eigenschaften</link><generator>RSS for Node</generator><lastBuildDate>Mon, 17 Aug 2026 01:09:43 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/188606.rss" rel="self" type="application/rss+xml"/><pubDate>Thu, 02 Aug 2007 10:21:31 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Komponentenentwicklung -&amp;gt; Problem bei Eigenschaften on Thu, 02 Aug 2007 10:21:31 GMT]]></title><description><![CDATA[<p>Hi!!</p>
<p>Ich leite gerade eine Komponente von TComboBox ab. Ich versuche eine einfach StringList als Eigenschaft zu integrieren. Leider bekomme ich einen komischen Fehler <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f609.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--winking_face"
      title=";)"
      alt="😉"
    /></p>
<p>Header:</p>
<pre><code class="language-cpp">//---------------------------------------------------------------------------

#ifndef ONMComboBoxH
#define ONMComboBoxH
//---------------------------------------------------------------------------
#include &lt;SysUtils.hpp&gt;
#include &lt;Classes.hpp&gt;
#include &lt;Controls.hpp&gt;
#include &lt;StdCtrls.hpp&gt;
#include &lt;String.h&gt;
//---------------------------------------------------------------------------
class PACKAGE TONMComboBox : public TComboBox
{
private:
	TStringList* FAllItems;
	void __fastcall SetAllItems(TStringList* value);
protected:
public:
	__fastcall TONMComboBox(TComponent* Owner);
__published:
	__property TStringList* AllItems = {read=AllItems, write=SetAllItems};
};
//---------------------------------------------------------------------------
#endif
</code></pre>
<p>C++:</p>
<pre><code class="language-cpp">//---------------------------------------------------------------------------

#include &lt;vcl.h&gt;

#pragma hdrstop

#include &quot;ONMComboBox.h&quot;
#pragma package(smart_init)
//---------------------------------------------------------------------------
// Mit ValidCtrCheck wird sichergestellt, dass die erzeugten Komponenten
// keine rein virtuellen Funktionen besitzen.
//

static inline void ValidCtrCheck(TONMComboBox *)
{
	new TONMComboBox(NULL);
}
//---------------------------------------------------------------------------
__fastcall TONMComboBox::TONMComboBox(TComponent* Owner)
	: TComboBox(Owner)
{
}
//---------------------------------------------------------------------------
namespace Onmcombobox
{
	void __fastcall PACKAGE Register()
	{
		TComponentClass classes[1] = {__classid(TONMComboBox)};
		RegisterComponents(&quot;Standard&quot;, classes, 0);
	}
}
//---------------------------------------------------------------------------
</code></pre>
<p>Bin dankbar für jede Hilfe!!! <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f642.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--slightly_smiling_face"
      title=":)"
      alt="🙂"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/post/1337166</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1337166</guid><dc:creator><![CDATA[Marcus76]]></dc:creator><pubDate>Thu, 02 Aug 2007 10:21:31 GMT</pubDate></item><item><title><![CDATA[Reply to Komponentenentwicklung -&amp;gt; Problem bei Eigenschaften on Thu, 02 Aug 2007 10:27:03 GMT]]></title><description><![CDATA[<p>Die Fehlermeldung wäre noch nützlich glaube ich <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f644.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--face_with_rolling_eyes"
      title=":rolling_eyes:"
      alt="🙄"
    /></p>
<blockquote>
<p>[Linker Fehler] Error: Ungelöste externe '__fastcall TONMComboBox::SetAllItems(Classes::TStringList *)' referenziert von C:\DOKUMENTE UND EINSTELLUNGEN\MS\DESKTOP\TONMCOMBOBOX\DEBUG_BUILD\ONMCOMBOBOX.OBJ</p>
</blockquote>
]]></description><link>https://www.c-plusplus.net/forum/post/1337167</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1337167</guid><dc:creator><![CDATA[Marcus76]]></dc:creator><pubDate>Thu, 02 Aug 2007 10:27:03 GMT</pubDate></item><item><title><![CDATA[Reply to Komponentenentwicklung -&amp;gt; Problem bei Eigenschaften on Thu, 02 Aug 2007 10:31:19 GMT]]></title><description><![CDATA[<p>Hallo</p>
<p>Was ist daran unverständlich? Ich kann in deinem Codeauszug keine Implementation für <em>TONMComboBox::SetAllItems</em> finden, und der Compiler auch nicht.</p>
<p>bis bald<br />
akari</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1337168</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1337168</guid><dc:creator><![CDATA[akari]]></dc:creator><pubDate>Thu, 02 Aug 2007 10:31:19 GMT</pubDate></item><item><title><![CDATA[Reply to Komponentenentwicklung -&amp;gt; Problem bei Eigenschaften on Thu, 02 Aug 2007 10:45:43 GMT]]></title><description><![CDATA[<p>Hi,</p>
<p>ok, das habe ich vergessen. Jetzt siehts so aus, lässt sich auch installieren, aber wenn ich dann die Komponente auf einem Form platziere bekomme ich wieder einen Fehler.</p>
<pre><code class="language-cpp">//---------------------------------------------------------------------------

#ifndef ONMComboBoxH
#define ONMComboBoxH
//---------------------------------------------------------------------------
#include &lt;SysUtils.hpp&gt;
#include &lt;Classes.hpp&gt;
#include &lt;Controls.hpp&gt;
#include &lt;StdCtrls.hpp&gt;
#include &lt;String.h&gt;
//---------------------------------------------------------------------------
class PACKAGE TONMComboBox : public TComboBox
{
private:
	TStringList* FAllItems;
	void __fastcall SetAllItems(TStringList* Items){ FAllItems=Items;};
protected:
public:
	__fastcall TONMComboBox(TComponent* Owner);
__published:
	__property TStringList* AllItems = {read=AllItems, write=SetAllItems};
};
//---------------------------------------------------------------------------
#endif
</code></pre>
<p>Fehler:</p>
<blockquote>
<p>+ $0[51F06822]{rtl100.bpl } System.System.TObject.InheritsFrom (Line 9250, &quot;system.pas&quot; + 2) + $0<br />
+ $0[51F06B47]{rtl100.bpl } System.System.@HandleAnyException (Line 9980, &quot;system.pas&quot; + 13) + $0<br />
+ $41[7C913786]{ntdll.dll } RtlConvertUlongToLargeInteger + $41</p>
</blockquote>
]]></description><link>https://www.c-plusplus.net/forum/post/1337174</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1337174</guid><dc:creator><![CDATA[Marcus76]]></dc:creator><pubDate>Thu, 02 Aug 2007 10:45:43 GMT</pubDate></item><item><title><![CDATA[Reply to Komponentenentwicklung -&amp;gt; Problem bei Eigenschaften on Fri, 03 Aug 2007 07:19:45 GMT]]></title><description><![CDATA[<p>*push*</p>
<p>Hat denn niemand Ahnung von Komponentenentwicklung? Das Problem ist ja, dass er ja alles erfolgreich kompiliert aber beim zugreifen auf die Eigenschaft ( schon im WYSIWYG-Editor ) kommt der Fehler ganz komisch <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f609.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--winking_face"
      title=";)"
      alt="😉"
    /> ^^</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1337811</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1337811</guid><dc:creator><![CDATA[Marcus76]]></dc:creator><pubDate>Fri, 03 Aug 2007 07:19:45 GMT</pubDate></item><item><title><![CDATA[Reply to Komponentenentwicklung -&amp;gt; Problem bei Eigenschaften on Fri, 03 Aug 2007 07:34:41 GMT]]></title><description><![CDATA[<p>Hallo</p>
<p>Ich glaube nicht das es gut ist einen Setter für eine TStringList anzugeben. Ein Getter sollte reichen da TStrings ja bereits alle notwenigen Bearbeitungsfunktionen hat. Du erstellst also im Konstruktor der neuen Komponente die TStringList und löscht sie im Destruktor. Über die Property kann nun die StringList bearbeitet werden.<br />
Und ich würde auch für den Typ der Property selber nur TStrings nehmen, so wie es auch TListBox macht.</p>
<p>bis bald<br />
akari</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1337820</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1337820</guid><dc:creator><![CDATA[akari]]></dc:creator><pubDate>Fri, 03 Aug 2007 07:34:41 GMT</pubDate></item><item><title><![CDATA[Reply to Komponentenentwicklung -&amp;gt; Problem bei Eigenschaften on Fri, 03 Aug 2007 08:16:48 GMT]]></title><description><![CDATA[<p>Danke!! Hast mir sehr geholfen, hab mal wieder zu kompliziert gedacht! ^^ <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f60b.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--face_savoring_food"
      title=":yum:"
      alt="😋"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/post/1337860</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1337860</guid><dc:creator><![CDATA[Marcus76]]></dc:creator><pubDate>Fri, 03 Aug 2007 08:16:48 GMT</pubDate></item></channel></rss>