Lajos Juhász 293 Posted Wednesday at 10:29 AM 9 minutes ago, A.M. Hoornweg said: Static class methods are unable to access any members or methods that require a "self" parameter. As a result it can not be assigned to an event. Share this post Link to post
A.M. Hoornweg 144 Posted Wednesday at 10:55 AM 24 minutes ago, Lajos Juhász said: As a result it can not be assigned to an event. Exactly. Share this post Link to post
Remy Lebeau 1391 Posted Wednesday at 05:47 PM 10 hours ago, dummzeuch said: Alternatively one could create a plain procedure with the right signature, assign that to the code pointer of a TMethod record, leave the data pointer unassigned or set it to nil, and assign that record to the event using appropriate type casting. That's the way I usually do it when I need an event handler without an object instance. Share this post Link to post