Am 23.04.2009 11:35 Uhr schrieb "MacArthur, Ian (SELEX GALILEO, UK)" unter
<[email protected]>:

>> In retrospect, I wonder if your code might be integrated into
>> Fl_Preferences. The Root enum currently has two values:
>> 
>> enum Root { SYSTEM=0, USER };
>> 
>> But if another one was added:
>> 
>> enum Root { SYSTEM=0, USER, APPLICATION };
>> 
>> then the class could make a Root node using the application
>> directory instead. I don't know about others, but I am always
>> weary of making modifications to the Windows registry using
>> SYSTEM, and prefer to keep data and preferences local to the
>> application itself... As I have discovered to my cost, using
>> the "." to get the current directory does not always work.
>> Just an idea.
> 
> 
> Sounds like a fair idea to me - but I don't know how feasible it is.
> Fl_Pref's is Matthias' baby, so maybe he could express a view on the
> goodness or otherwise of this idea?
> 
> Also, for what it is worth, if we do add this function, I'd prefer it
> was not hidden inside Fl_Pref's but was in the fl_functions or similar,
> so that it might be generally available (since I use it a lot anyway!)

Yes, it both sounds great to me. I suggest an additional function, maybe

const char *fl_application_path();

Which would return a pointer to a buffer that needs to be free'd (since we
need this path usually only once). And I love the idea of adding a new enum
member!

Matthias


_______________________________________________
fltk mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk

Reply via email to