Yes, you are right.
Due to the problem that I couldn't store a class function in a var of
type function of object (I reported earlier) I found a workaround:
var
MyVar: function: boolean of object;
...
MyVar:=@TSomeClass(nil).MyClassFunc;
and that's why Self is nil. But I can do
My
CA Gorski wrote on Tue, 07 Aug 2012:
I tried that already, but at least in my case Self is Nil inside the
class function.
Compiler (fpc 2.6.1 ) bug?
It does not return nil for me:
***
{$mode objfpc}
type
TSomething = class
class function GetMyClass: TClass;
end;
class function TS
I tried that already, but at least in my case Self is Nil inside the
class function.
Compiler (fpc 2.6.1 ) bug?
On 07.08.2012 11:22, Jonas Maebe wrote:
CA Gorski wrote on Tue, 07 Aug 2012:
How can I get the actual class a class function is called in?
Via "self".
Jonas
_
CA Gorski wrote on Tue, 07 Aug 2012:
How can I get the actual class a class function is called in?
Via "self".
Jonas
___
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal