PlanetSquires Forums

Support Forums => WinFBX - Windows Framework for FreeBASIC => Topic started by: SeaVipe on February 23, 2021, 06:29:54 PM

Title: CInifile Documentation
Post by: SeaVipe on February 23, 2021, 06:29:54 PM

Hi Josť, a typo in the documentation for CInifile
Code: [Select]
DIM cIni AS CInifile = "Test.ini"
DIM csa AS CSafeArray = GetKeyNames("Startup")
FOR i AS LONG = csa.LBound TO csa.UBound
   print csa.GetString(i)            ' <-- S/B GetStr()
NEXT
Title: Re: CInifile Documentation
Post by: Josť Roca on February 24, 2021, 10:35:23 AM
The correct name is GetString. I only see GetStr in the comments of the source code. Is taht what you mean?
Title: Re: CInifile Documentation
Post by: SeaVipe on February 24, 2021, 01:26:48 PM
Sorry Josť, I wasn't very clear. I should have written the 'Example' in cInifile documentation for 'GetSectionNames'.
Quote
This line in the example code "print csa.GetString(i)" throws error 18: Element not defined, GetString in 'print csa.GetString(i)'
Change GetString to GetStr and the code compiles and works correctly.
Use 'GetStr' for CSafeArray and 'GetString' for CIninfile.
Title: Re: CInifile Documentation
Post by: Bumblebee on February 24, 2021, 01:29:03 PM
Should also be:
DIM csa AS CSafeArray = cIni.GetKeyNames("Startup")
Title: Re: CInifile Documentation
Post by: Josť Roca on February 24, 2021, 01:59:12 PM
Ok. I have modified it. Thanks for reporting it.