Jump to content
Sign in to follow this  
waardd

Is there a array limit?

Recommended Posts

waardd

Hi there,

Im stumbling upon a problem.

I have a file with several arrayentrys wich i load in to my arry with a function. But when i read thge array with the combobox it displays only a part of the lines?

I have a total of 677 lines and the last entry in my combo is line 524

File to read:

[sERVERLIJST]

key1=aardslang rbf (A)|AIX|A|rbf|aardslang.mydomain

.

.

.

key677=xat1 ssox (O)|AIX|O|ssox|xat1.mydomain

My functions to load array and send array to combo are:

Func _populateARRAY()
    ; Get the entries
    Local $srvREAD = IniReadSection("c:\mvdd\settings\serverlijst.ini", "SERVERLIJST")
    ; Size the Global array correctly
    Global $ASservers[$srvREAD[0][0] + 1][6]
    ; Declare this Local array outside the loop
    Local $srvREAD2
    For $i = 1 To $srvREAD[0][0]
        ; Split the delimited string into an array
        $srvREAD2 = StringSplit($srvREAD[$i][1], "|")
        ; Now add the elements to the Global array
        For $j = 1 To $srvREAD2[0]
            $ASservers[$i][$j] = $srvREAD2[$j]
        Next
    Next

EndFunc   ;==>_populateARRAY

Func _FillCombo()
$sServer_Data = ""
For $i = 1 To UBound($ASservers) - 1
    $sServer_Data &= "|" & $ASservers[$i][1]
Next

GUICtrlSetData($Cmb_Servers, $sServer_Data)
EndFunc

My combois formatted as:

$Cmb_Servers = GUICtrlCreateCombo("Cmb_Servers", 90, 15, 160, 25, BitOR($CBS_DROPDOWNLIST,$WS_VSCROLL, $CBS_SORT))

Share this post


Link to post
Share on other sites
water

You might have been hit by the 32k limit of InIReadSection: "Only the first 32767 chars are read for legacy reasons."

Insert

_ArrayDisplay($srvRead)
after
Local $srvREAD = IniReadSection("c:mvddsettingsserverlijst.ini", "SERVERLIJST")
and see what you get.

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2018-10-19 - Version 1.4.10.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (2018-10-31 - Version 1.3.4.1) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
PowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & Support
Excel - Example Scripts - Wiki
Word - Wiki
 
Tutorials:

ADO - Wiki

 

Share this post


Link to post
Share on other sites
waardd

What i get is the first 524 lines of my list.

If i'm correct its 33274 characters in total (including the keynn=).... so it could be that it is running into a limitation...

Damn......

Any suggestions?

Share this post


Link to post
Share on other sites
hannes08

Use _FileReadToArray in combination with StringSplit.

Or a simple FileReadLine


Regards,Hannes[spoiler]If you can't convince them, confuse them![/spoiler]

Share this post


Link to post
Share on other sites
water

Give a try. It handles INI files without the 32K limitation.

Edited by water
  • Like 1

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2018-10-19 - Version 1.4.10.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (2018-10-31 - Version 1.3.4.1) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
PowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & Support
Excel - Example Scripts - Wiki
Word - Wiki
 
Tutorials:

ADO - Wiki

 

Share this post


Link to post
Share on other sites
waardd

Thanks to Water!!! That UDF did the trick. It read the complete file!!! Tnx

Share this post


Link to post
Share on other sites
water
:D

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2018-10-19 - Version 1.4.10.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (2018-10-31 - Version 1.3.4.1) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
PowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & Support
Excel - Example Scripts - Wiki
Word - Wiki
 
Tutorials:

ADO - Wiki

 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×