16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
|
MenuItem *otherItem;
if (![otherObject isKindOfClass:MenuItem.class])
@throw [OFInvalidArgumentException exception];
int x, y;
@try {
x = (int)_text.longLongValue;
} @catch (OFInvalidFormatException *e) {
x = 0;
}
@try {
y = (int)otherItem.text.longLongValue;
} @catch (OFInvalidFormatException *e) {
y = 0;
}
if (x > y)
return OFOrderedAscending;
if (x < y)
|
|
>
|
|
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
|
MenuItem *otherItem;
if (![otherObject isKindOfClass:MenuItem.class])
@throw [OFInvalidArgumentException exception];
int x, y;
@try {
x = _text.intValue;
} @catch (OFInvalidFormatException *e) {
x = 0;
}
@try {
y = otherItem.text.intValue;
} @catch (OFInvalidFormatException *e) {
y = 0;
}
if (x > y)
return OFOrderedAscending;
if (x < y)
|