Autor Beitrag
Karlson
ontopic starontopic starontopic starontopic starontopic starofftopic starofftopic starofftopic star
Beiträge: 2088



BeitragVerfasst: Mo 29.11.04 19:57 
Moin,

Ich stehe gerade vor einem Problem, und habe keine Ahnung warum es auftritt :shock:

Ich möchte mir ein Function schreiben, dir mir zurückgibt wieviel Panels auf der form sind.
Doch komischerweise wird 'componentcount' innerhalb der Function als undefinierter bezeichner angezeigt!
Was mach ich denn falsch, und warum klappt das nicht??
raziel
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 2453

Arch Linux
JS (WebStorm), C#, C++/CLI, C++ (VS2013)
BeitragVerfasst: Mo 29.11.04 19:59 
Ist die Funktion innerhalb der Form deklariert? Ansonsten musst Du Delphi explizit die Form mitteilen, deren Anzahl der Komponente du ermitteln willst.

_________________
JSXGraph
Motzi
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 2931

XP Prof, Vista Business
D6, D2k5-D2k7 je Prof
BeitragVerfasst: Mo 29.11.04 19:59 
ComponentCount ist eine Eigenschaft von TComponent.. ;)
Also entweder du machst aus deiner Funktion eine Methode oder aber du musst konkret angeben von welchem Objekt du den Wert von ComponentCount haben willst..

_________________
gringo pussy cats - eef i see you i will pull your tail out by eets roots!
Karlson Threadstarter
ontopic starontopic starontopic starontopic starontopic starofftopic starofftopic starofftopic star
Beiträge: 2088



BeitragVerfasst: Mo 29.11.04 20:14 
Aaaah :!:

Alles klar, klappt nun. Danke euch beiden!