VDatabase In an RB Module
Alex Lindsay
alindsay at mac.com
Sat Oct 1 06:59:23 CDT 2005
This is what I do. I actually have categories of preferences so I can
read/write a set of preferences at one time. I use a dictionary as the
main container that passes the preferences back and forth to the
database module. This allows me to load all the preferences for a
window, for instance, into a dictionary that is a property of the
window, then all RB code just accesses the dictionary. Works well
enough that I haven't had any issues.
Thank you,
Alex Lindsay
On Sep 29, 2005, at 1:35 PM, jda wrote:
>> Some of it is pretty straight forward.
>>
>> [1] Create the module.
>> [2] Set up the properties of the database and table(s).
>
> My advice is to create a record with generic properties:
>
> integerField
> booleanField
> textField
> etc. (more than one of the same type if needed).
>
> Have one field called 'propertyName' (or whatever).
>
> Then create a record for each property you want to install and use the
> appropriate field to store the value. For example, to store a boolean
> for showing/hiding a palette, you might create a record where
>
> propertyName = 'showPallete'
>
> and
>
> booleanField = true/false
>
> When you want to fetch the preference value, do an sql search for a
> record WHERE propertyName = 'showPalette' and retrieve booleanField.
>
> This way you can add or remove preferences without having to change
> the schema for the db (which only causes headaches when you upgrade
> your product).
>
> Jon
> _______________________________________________
> Valentina mailing list
> Valentina at lists.macserve.net
> http://lists.macserve.net/mailman/listinfo/valentina
>
More information about the Valentina
mailing list