From c993c6b8e8ce63a098d56f88b22060b1ea5a9373 Mon Sep 17 00:00:00 2001 From: Pietro Gagliardi Date: Mon, 28 Apr 2014 23:17:53 -0400 Subject: Changed a TODO in listbox_darwin.go that, when my Mac OS X setup chooses to cooperate, will let me make the inefficient code in question efficient. --- listbox_darwin.go | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'listbox_darwin.go') diff --git a/listbox_darwin.go b/listbox_darwin.go index 7d10a5f..5a1042d 100644 --- a/listbox_darwin.go +++ b/listbox_darwin.go @@ -261,9 +261,7 @@ func insertListboxBefore(listbox C.id, what string, before int, alternate bool) insertListboxArrayBefore(array, what, before) } -// TODO this is inefficient! -// C.NSIndexSetEntries() makes two arrays of size count: one NSUInteger array and one C.uintptr_t array for returning; this makes a third of type []int for using -// if only NSUInteger was usable (see bleh_darwin.m) +// TODO change to use [indices firstIndex] and [indices indexGreaterThanIndex:], as suggested http://stackoverflow.com/questions/3773180/how-to-get-indexes-from-nsindexset-into-an-nsarray-in-cocoa func selectedListboxIndices(listbox C.id) (list []int) { var cindices []C.uintptr_t -- cgit v1.2.3