[fltk/fltk] New method to return Fl_Preferences location without invoking constructor (#227)
zcream
Apr 30, 2021
I am trying to keep a default prefs file as a string within my app (this is necessary as I am using prefs to store encrypted data), and when the user runs the app, I would like to detect if a file was created, and if not, copy over the contained file.
For this, I need to know the prefs path before invoking the Fl_Preferences constructor as the constructor itself creates an empty file.
So far, from Fl_Preferences.cxx, I found that the "system_driver" "preference_rootnode" method creates the filename.
Fl::system_driver()->preference_rootnode(prefs, root, vendor, application);
This is a virtual function that is defined based on the platform, hence I cannot simply copy the code from inside it.
Could I request the developers to expose a method from within Fl_Preferences that will simply return the generated filename if and were to be passed as the constructor arguments ?
Comments are owned by the poster. All other content is copyright 1998-2025 by Bill Spitzak and others. This project is hosted by The FLTK Team. Please report site problems to 'erco@seriss.com'.