Stephen Ball – I got asked today about having a global value that you can share between objects of specific types but was closed away to other objects, so they didn’t want to have a global variable. Two nice language feature in Delphi allows you to do exactly what they were trying to do, and they are Class Variables and strict private declarations. In this quick blog post we will look at this in action. A Class Variable simply means you have a value that is managed by the class type rather than an instance of a class. This means that each time you reference it from ANY object of that type, you get the ...
Visits by Source
Users who voted for this posting