Re: [fltk.general] Fl_Preferences (bug)

2011-12-09 Thread Matthias Melcher
On 09.12.2011, at 10:13, Richard Sanders wrote: > On Thu, 08 Dec 2011 13:23:12 -0800, Matthias Melcher > wrote: > > [snip] >> I find the documentation precise and correct, but then again, I am not a >> native English speaker. Maybe you have a better suggestion what the text >> should be. > >

Re: [fltk.general] Fl_Preferences (bug)

2011-12-09 Thread Richard Sanders
On Thu, 08 Dec 2011 13:23:12 -0800, Matthias Melcher wrote: [snip] >I find the documentation precise and correct, but then again, I am not a >native English speaker. Maybe you have a better suggestion what the text >should be. To quote the docs (copy/paste) int entries () Returns

Re: [fltk.general] Fl_Preferences (bug)

2011-12-08 Thread Matthias Melcher
On 08.12.2011, at 21:20, Richard Sanders wrote: > On Thu, 08 Dec 2011 08:26:54 -0800, Matthias Melcher > wrote: > >> On 30.11.2011, at 23:43, Richard Sanders wrote: >> >>> for(loop = 0; loop < entries; ++loop) >>> { >>> sprintf(name, "%d", loop); >>> if(!preference->entryExists(name)) >>>

Re: [fltk.general] Fl_Preferences (bug)

2011-12-08 Thread Richard Sanders
On Thu, 08 Dec 2011 08:26:54 -0800, Matthias Melcher wrote: > >On 30.11.2011, at 23:43, Richard Sanders wrote: > >> for(loop = 0; loop < entries; ++loop) >> { >> sprintf(name, "%d", loop); >>if(!preference->entryExists(name)) >> exit(2); // should not get to this but loop will have a v

Re: [fltk.general] Fl_Preferences (bug)

2011-12-08 Thread Matthias Melcher
On 30.11.2011, at 23:43, Richard Sanders wrote: > for(loop = 0; loop < entries; ++loop) > { > sprintf(name, "%d", loop); >if(!preference->entryExists(name)) > exit(2); // should not get to this but loop will have a value of > 15 at this point Well, you are looking for an entry that is

Re: [fltk.general] Fl_Preferences (bug)

2011-12-04 Thread Richard Sanders
On Fri, 02 Dec 2011 01:24:46 -0800, "MacArthur, Ian (SELEX GALILEO, UK)" wrote: >Although the prefs files are flat ASCII text, they are "conceptually" >opaque, so editing them by hand and adding comments might be a fragile >and unsupported activity. And the docs say, "Preferences are stored in t

Re: [fltk.general] Fl_Preferences (bug)

2011-12-02 Thread MacArthur, Ian (SELEX GALILEO, UK)
> >Richard, > > > >Can you show us a minimal worked example, please - I'm not sure I'm > >grasping what you are doing with the entries() method... > > > >Something complete enough to compile, if possible, as that > makes it more > >likely someone will have time to investigate! > > Here is a smal

Re: [fltk.general] Fl_Preferences (bug)

2011-11-30 Thread Richard Sanders
>Richard, > >Can you show us a minimal worked example, please - I'm not sure I'm >grasping what you are doing with the entries() method... > >Something complete enough to compile, if possible, as that makes it more >likely someone will have time to investigate! Here is a small program and perfs fi

Re: [fltk.general] Fl_Preferences (bug)

2011-11-30 Thread MacArthur, Ian (SELEX GALILEO, UK)
> preference->entries() returns the number of line with text on them. > Comment lines are included in the count not just name value pairs as > documented. > > Version 1.3 > > I am using a perfs file as a language file where each entry has a > number for its name. > > eg. > > ; button menu on t

[fltk.general] Fl_Preferences (bug)

2011-11-30 Thread Richard Sanders
preference->entries() returns the number of line with text on them. Comment lines are included in the count not just name value pairs as documented. Version 1.3 I am using a perfs file as a language file where each entry has a number for its name. eg. ; button menu on the left 0:Chord, Arc and