|
ExtjsFreedom | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
Object | +--String
| Method Summary | |
String
|
toggle(<String> value, <String> other)
Utility function that allows you to easily switch a string between two alternating values. |
| Method Detail |
String toggle(<String> value, <String> other)
// alternate sort directions
sort = sort.toggle('ASC', 'DESC');
// instead of conditional logic:
sort = (sort == 'ASC' ? 'DESC' : 'ASC');
value - The value to compare to the current string
other - The new value to use if the string already equals the first value passed in
|
ExtjsFreedom | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||