[Gambas-user] ComboBox limitation ?

Benoit Minisini gambas at ...1...
Wed Oct 18 15:16:14 CEST 2006


On Wednesday 18 October 2006 11:01, Gaël Le Hec'H wrote:
> is there a limit for the items in a combobox ?
> see project. on my machine at runtime I only see item 64 to 99 unless of
> 00 to 99 :(
> Have you got this pb ?

This is actually a limitation in the interpreter that cannot call a function 
with more than 64 arguments. Then it seems that there is a bug in the 
compiler: instead of raising an error (too many arguments), it wraps the 
number of arguments, it takes the 100 MOD 64 = 36 last arguments, and so your 
combo-box gets only the 64 to 99 entries.

A workaround for that is filling the combo-box by code: you create a text file 
with one entry by line, and you load it into the combo-box this way:

MyComboBox.List = Split(File.Load("MyFile.txt"), "\n")

Sorry for the inconvenience!

Regards,

-- 
Benoit Minisini





More information about the User mailing list