On 09/11/2013 08:40 PM, Ricardo Aráoz wrote:
El 11/09/13 15:53, Paul McNett escribió:
On 9/11/13 11:31 AM, Ricardo Aráoz wrote:
I connect manually in order to be able to place the pref database
inside my app's
directory structure.
Is there another way of accomplishing this?
You can put it in \Users\<username>\AppData\Roaming\<your app name>
easily:
class App(dApp):
...
def initProperties(self):
...
self.PreferenceManager = dPref(key="your app name",
appName="your app name")
...
Putting it inside your app program directory probably is shooting
yourself in the
foot and there isn't a framework helper for doing so. This is
user-level preferences,
not program-level or system-level. For program-level preferences I
keep a _prefs
table in the app's shared database and then get/save from there using
my own custom
pref dialog (which also pulls some prefs from the dPref database).
Paul
I've tried this (see below), and yet the grid won't remember the
column widths. The window and other stuff are remembered.
I've also tried the code with the "import dabo.dPref as dPref" and
"app.PreferenceManager =....." commented out, i.e. with no code
referring to the Preferences, and it doesn't work either.
-------------------------------------
import dabo
from ui import WinProx
import dabo.dPref as dPref
dabo.ui.loadUI("wx")
app = dabo.dApp()
app.PreferenceManager = dPref(appName='WinProx',
key='WinProx')
app.MainFormClass = WinProx
app.start()
-------------------------------------
I always thought you just needed to do something like:
app.BasePrefKey = "PesED"
app.setAppInfo("appName", "PES Education")
app.setAppInfo("appShortName", "PES Education") ## appShortName
normally just removes all the spaces from appName
app.setAppInfo("Icon", "pes.ico")
Johnf
_______________________________________________
Post Messages to: Dabo-users@leafe.com
Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/dabo-users
Searchable Archives: http://leafe.com/archives/search/dabo-users
This message: http://leafe.com/archives/byMID/52314a4f.2040...@jfcomputer.com