Pythoness Software Home
Buy Online
Overview Home
How It Works
Form Information
MRU Lists
Component Properties
Generic Settings
Advanced Settings
|
PSetting Overview & Usage: Generic Settings
Sometimes the information you want to save is not necessarily related to
a component or a property. Maybe you need to save the date and time that a
particular operation was completed. Perhaps you need to save some licensing
information internally. This is the purpose of PSetting's Generic Settings.
All generic settings are named using a unique name of your choice. You can
create as many or as few as you need for your application.
Borrowing from a great concept. Delphi's TField components
simplify accessing database fields and do a lot of work internally to convert
between data types. Generic settings in PSetting have borrowed from the TField
concept to simplify your programming also. Assume that you want to save the
date and time that your user licensed your application. All you need to do is
create a generic setting called License Date using the PSetting component editor.
Then in your application, include the following line of code to save the date and time:
PFormSettings['License Date'].AsDateTime := Now;
Later you may check the value of the License Date using:
aValue := PFormSettings['License Date'].AsDateTime;
PSetting supports the following methods and properties for saving and restoring
values using generic settings:
- AsBoolean
- AsDateTime
- AsFloat
- AsInteger
- AsString
- AsVariant
- GetAsStrings/SetAsStrings


|
To continue reading the PSetting Overview & Usage
articles, use the buttons at the right to move to the previous article or the
next article, respectively. |
|
|
|
|