In case of case, break code
There really needs to be an "ignore case" argument (boolean) to enable/disable case sensitivity for find functions, notably the findByValue and findAllByValue functions for Collections. If one is attempting to find an item in a collection, case really should not matter, or at the very least, it should be up to the developer whether it matters or not. In the following example code, notice that if the case of the item to be found doesn't exactly match the contents of the collection, the find fails.
Example code:
var boolean foundItLower = false;
var boolean foundItUpper = false;
var int lowerindex;
var int upperindex;
var Collection myColl = new Collection(string);
myColl.add("One");
myColl.add("Two");
myColl.add("Three");
myColl.findByValue("One",<not set>,<not set>,upperIndex);
myColl.findByValue("one",<not set>,<not set>,lowerIndex);
foundItLower = lowerIndex >= 0;
foundItUpper = upperIndex >= 0;
dialog.message("lowerIndex: " + lowerIndex + "; upperIndex: " + upperIndex);
dialog.message("foundItLower: " + foundItLower + "; foundItUpper: " + foundItUpper);
One word: Aaargh! (This is not a line of code...)
Example code:
var boolean foundItLower = false;
var boolean foundItUpper = false;
var int lowerindex;
var int upperindex;
var Collection myColl = new Collection(string);
myColl.add("One");
myColl.add("Two");
myColl.add("Three");
myColl.findByValue("One",<not set>,<not set>,upperIndex);
myColl.findByValue("one",<not set>,<not set>,lowerIndex);
foundItLower = lowerIndex >= 0;
foundItUpper = upperIndex >= 0;
dialog.message("lowerIndex: " + lowerIndex + "; upperIndex: " + upperIndex);
dialog.message("foundItLower: " + foundItLower + "; foundItUpper: " + foundItUpper);
One word: Aaargh! (This is not a line of code...)
1
person has this problem
I have this problem, too!
Tell me when someone solves it.
The more people who report this problem, the more it gets noticed.
The more people who report this problem, the more it gets noticed.
Create a customer community for your own organization
Plans starting at $19/month
Loading Profile...

