This is what I wrote, but the set after filtering has the same number of items than before.
set setDesKeys to current application's NSSet's setWithArray:{"cdeinoprty","abehiilmorsttty","abceiirt","eepprsst","celov","aa","a","ab"}
set myPredicate to current application's NSPredicate's predicateWithFormat:"length > 4"
setDesKeys's filteredSetUsingPredicate:myPredicate
I tried also to define the predicate as below, with the same result :
set myPredicate to current application's NSPredicate's predicateWithFormat:"self.length > 4"
set setDesKeys to current application's NSMutableSet's setWithArray:{"cdeinoprty","abehiilmorsttty","abceiirt","eepprsst","celov","aa","a","ab"}
set myPredicate to current application's NSPredicate's predicateWithFormat:"length > 4"
setDesKeys's filterUsingPredicate:myPredicate