[fpc-pascal]About "callbacks method" of a class
milimeter at 163.com
Thu Nov 14 09:00:22 CET 2002
Actually it's the same problem, I tried to connect TSomeClass.FuncName with
a signal, which caused problem. Yesterday I thought perhaps I can make a
callbacks function to be a nested function, then it will be invisible to
other places. Now I know I was wrong. It seems there's no good way to
encapsulate a callback completely into a class.
Now I have write a
>> Why the
>> following code can compile but will run with "Access violation"?
>> procedure TSomeClass.FuncName(...);
>> procedure FuncNameEmbeded(...);
>> writeln(FValue);//Here FValue is a member (Integer) of TSomecalss
>Looks like good code.
>Can you send more (class definition and code, that calls FuncName)?
More information about the fpc-pascal