[Vala] sorting arraylist



Hi,

is this deprecated? if so, what should I use, or shoudl I write sort of my own

sort_with_data((CompareDataFunc) sort_func_items);


and why this cannot be in object as method?

int sort_func_items(Item item1, Item item2) {

        if (item1._date < item2._date) {
                return 1;
        }
        else if (item1._date == item2._date) {
                return 0;
        }
        return -1;
    }



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]