This content has been marked as final. Show 11 replies
three items here Gerry: in the conditional use the 'length' property - rather than 'index' (which is not a property of the array class ;), additionally the 'break' in the first part of the condition will only effect a loop, and there is not one present at this point so you can remove it.
also in the loop, the condition is not necessary, the loop will terminate on it's own upon reaching the final index of the array.
Thanks for responding!
Here is the code I used following your indications.
But it doesn't work.
Even labels_array greater than 200 items don't trigger the first conditional...
When I write labels_array.length, I suppose length refers to the number of items in the array. Right ?
length never refers in this case to the number of characters. Right ?
I don't understand why "Too large number of friends to display." doesn't appear when an array larger than 200 items is loaded.
There must be something wrong somewhere...
right 'length' refers to the number of elements in the array and 'not' the number of characters.
let me ask quick - if the list is 'less than 200' does the CB propagate correctly?
Oh yeah !!!
It displays fine and speedy.
ok - great! so I thinking try removing the data parameter in the addItem method call under the condition - although this shouldn't matter, and it 'should' accept an empty string. also throw a quick trace in there to see if the condition is being met:
I'm also wondering if the 'label' param string has a character limit - maybe try it with something smaller.
trace statement doesn't display the expected information
and, no, thre's no character limit to this string...
I definitely think that the conditional is somehow wrong or misplaced (?)...
ok - with the 'list' containing more than 200 - place a trace just before the condition
what do we get?
I GOT IT !!!
What do you think ?
Look at the code below...
well... ... ... sorry buddy - but that's not going to help you - it will only 'check' the condition 'once' at the start of the program, and 'not' after the load has completed - thus if you have more than 200 the CB will still ... ... wait a sec how is 'myFriendsList' working outside the load handler???? isn't that the item being loaded????
This chunk of code is part of a "big" function which is called each time the user search for a friend from a given school in a given year.
After finding (or not) this friend, the Combo Box "CBFRIENDS" displays all the friends of this found friend who were in the same school the very same year.
Then, the user choose in this CB a friend which is searched by the "big" function and so on...
I have tested this under all conditions and it perfectly works.
PS: Have also a look to another post I did this morning related to ComboBox Items Limit...