Picking Global Variables From A List!
by ??? - AISSSoft@aol.com and Robert Vivrette - RobertV@csi.com
From Delphi 3 and up it is a good idea to put all the global variables
that you will use in your program (ex isfilesave:Boolean,Username:String)
into a record. This is because a lot of times one cannot remember the names
of the globals he has declered and the only way to remember the name is
to scroll back to the pas where you declared the variable. However
in D3 if you add the variables to a easylly rememberd record. delphi will
pop up a listbox with all the
records available to that record and all you have to do is scroll up
and down to find the variable that you want!
Editors Note: This is a pretty cool trick... All you need to do is to declare a record type in a globally accessed unit like this:
But wait, there is more! If you are using the global variable on the right side of an assignment statement, the list will automatically restrict the list to variables that are type compatible. For example, if you were assigning to a labels caption, only the string variables (Username & DBName) would be in the list.
Keep in mind that this feature will work only with Delphi 3 and 4.