Hmm... Actually, that could work out, if I understand it correctly. I've never had occasion to use wx.App before
So every class that is part of an application shares a wx.App object? And as such, I can have references to wx.GetApp().objPrefs that all point to the same Prefs object, regardless of which class is referring to it?
I'm gonna try it out while I wait with bated breath for a response.
Thanks!
···
-----Original Message-----
From: Henning.Ramm@mediapro-gmbh.de
[mailto:Henning.Ramm@mediapro-gmbh.de]
Sent: Thursday, June 30, 2005 1:04 PM
To: wxPython-users@lists.wxwidgets.org
Subject: RE: [wxPython-users] Using "preferences">I'm trying to conceive a way to pass preference data between various
>classes. I have an app that during early development had most "user
>preference"-type data hard-coded. I have just made a
>Preferences dialog
>in which I have the user to enter his specific info, but I
can't quite
>figure out how to propogate that data outside to the ~10
classes in as
>many files that might need that information. Maybe it's a lack of
>coffee, or the looming long weekend...In my apps I've a nested config dictionary as property of the
app object (child of wx.App).
The other classes don't even need to store a reference to the
app class, for they can get it via wx.GetApp().
My app class searches and reads a XML config file at startup.
At the moment there's no user access other than editing the
XML file directly, but that should be no big problem.Or did I misunderstand your problem?
Best regards,
Henning Hraban Ramm
Südkurier Medienhaus / MediaPro
Support/Admin/Development Dept.---------------------------------------------------------------------
To unsubscribe, e-mail: wxPython-users-unsubscribe@lists.wxwidgets.org
For additional commands, e-mail:
wxPython-users-help@lists.wxwidgets.org