How to get pointer to private method of TApplication?
How to get pointer to private method of TApplication?
So far I'm using such a trick:
lPointer := @TSomeClass.PrivateMethod;
And it works (e.g. for Firedac classes), but for TApplication methods I get compile error e.g.:
[dcc32 Error] E2361 Cannot access private symbol TApplication.UpdateVisible
Why?
So far I'm using such a trick:
lPointer := @TSomeClass.PrivateMethod;
And it works (e.g. for Firedac classes), but for TApplication methods I get compile error e.g.:
[dcc32 Error] E2361 Cannot access private symbol TApplication.UpdateVisible
Why?
David Heffernan It's not a bug, it's a feature! ;-)
ReplyDeleteJacek Laskowski According to Emba it is a bug. If they hear about it they are likely to fix it. So, shhhh.
ReplyDeleteOne way to have TApplication.UpdateVisible called is to do this in your form:
ReplyDeletePerform(CM_SHOWINGCHANGED, 0, 0);
Whether there may be any undesirable side-effect, I don't know :-)