Hi Al, hi list, On 20.04.2017 18:40, Al Thomas wrote:
I would create a single configuration object that implements multiple interfaces. The interfaces allow settings to be grouped. So the single object is passed around, but a specific interface is given as the type for the argument to a service object constructor. This also makes it easier to test a service object because you need to pass a dummy configuration that only matches the interface and not the whole configuration object.
I prepared that config.vala [1]. In general it looks like, that: public string home = Environment.get_home_dir (); public string publican_home {get {_pathhome = home + (string)Path.DIR_SEPARATOR + "/publisher-projects"; return _pathhome;}} can't used because of it itn't instancable. But how can i work with such pathes instead? Also i added a metod which imports the settings from the gsettings schema and connects this to its properties from the interface. Is the implementation usable in that case? It would be great, that the gsettings and the defined pathes are useable inside each other class. Greetings Sascha [1] https://github.com/saigkill/gnome-publisher/blob/master/src/config.vala -- Sascha Manns Maifeldstraße 10 56727 Mayen P: +49-2651-4014045 W: http://saigkill.tuxfamily.org
Attachment:
signature.asc
Description: OpenPGP digital signature