Prefs

This forum is for programmers who have questions about the source code.
Post Reply
User avatar
drtech
Posts: 1649
Joined: Wed Jun 20, 2007 8:44 am
Location: Springfield, MO
Contact:

Prefs

Post by drtech » Fri Oct 01, 2010 6:11 pm

What is the proper way to now get and set preferences in the database as an outside developer?

It seems that now the PrefName is required to be passed instead of a regular string now. How can I make another pref if they are all in an enumeration (which as far as I can tell is impossible to add to at runtime with my plugin?)

ie

checkApptExclamation.Checked=PrefC.GetBool(PrefName.ApptExclamationShowForUnsentIns);

If I remember right, I used to do it like
checkApptExclamation.Checked=PrefC.GetBool("MyOwnPreference");
David Fuchs
Dentist - Springfield, MO
Smile Dental http://www.887-smile.com

User avatar
jordansparks
Site Admin
Posts: 5744
Joined: Sun Jun 17, 2007 3:59 pm
Location: Salem, Oregon
Contact:

Re: Prefs

Post by jordansparks » Fri Oct 01, 2010 7:47 pm

Still supported. See line 137. It's up to you to convert the string to whatever type you need.
Jordan Sparks, DMD
http://www.opendental.com

Post Reply