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?

Comments

  1. David Heffernan It's not a bug, it's a feature! ;-)

    ReplyDelete
  2. Jacek Laskowski According to Emba it is a bug. If they hear about it they are likely to fix it. So, shhhh.

    ReplyDelete
  3. One way to have TApplication.UpdateVisible called is to do this in your form:

    Perform(CM_SHOWINGCHANGED, 0, 0);

    Whether there may be any undesirable side-effect, I don't know :-)

    ReplyDelete

Post a Comment