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 Sector
1:Triangle one
2:Triangle two
3:Dovetail
4:Bolt circle
5:Thread measurement
6:Dividing head
7:Tap drill
8:Regular Polygon (hexagons etc.)
9:Set metric as default
10:Set inch as default
11:About
12:Quit

; the window title
13:Metal Shop Calculator (metric mode)
14:Metal Shop Calculator (inch mode)

The erroneous result returned by preference->entries() make a work
around necessary, it is not elegant and detracts from the robustness I
had initially intended.

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

Reply via email to