Declaring publicly accessible variables in code

How do you declare variables I code as if you where adding them as a ‘Property’. This is just how I want to organise my properties, using code that is. Is this possible? Also how do I group properties if I was to add them for them as a ‘Property’? If I knew of this functionality I wouldn’t even be asking this question.

Thanks

No. Properties are only defined at the user interface level. Also, you cannot group Properties.

One way that you could kinda do this is to create a globally accessible dictionary for each “group” with the names of your properties (as strings) being the keys, and the values being variants.

The problem with this approach is that you would lose all type safety and compiler checking that you would have with normally-defined properties. It could lead to a bunch of annoying problems that would be caught at runtime, not when compiling.

All in all, I would suggest trying to get used to the way that virtually everybody works in a strongly-typed language…

You could always create modules and store the properties in there… Create a module for each “group” and then when you add the properties to the module, set the scope to “Protected” that way you will need to type in the full path to the property (and this allows you to have the same property name in different groups)…