My question is pretty simple. I have a TList (called queue
) containing objects of class CNotif
and want to use the method is_alive
on those objects.
The problem is, when I use queue.Items[0].is_alive()
, I get an error message saying Error: Illegal qualifier
.
I'm also confused with the way I can instantiate objects in this TList (and how the way the compiler "knows" that the objects stored are of this type ...)
What I do now is: queue.Add(CNotif.create(timer, title, text, badge))
but I don't think it's supposed to be done that way.
Thank you in advance !
T
, likeTLama
is type ofLama
, so for your case it would beTCNotif
;-) – BaeyerT
ypes, including classes, records, enumerations etc. Let's say for everything you have in thetype
section of your code. – BaeyerTNotif
if I'm not mistaken - if theC
was your prefix intended. But everything after theT
is all up to you anyway, so technically there's no right or wrong way to name types. Things will still work without theT
but in Delphi, types are expected to begin withT
. – Appose