From 47829df71489eed2d456595ab9ce9748ecaf38d9 Mon Sep 17 00:00:00 2001 From: Pietro Gagliardi Date: Sat, 8 Mar 2014 17:25:19 -0500 Subject: Added the Mac OS X implementation of Combobox/Listbox.Len(). --- listbox_darwin.go | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'listbox_darwin.go') diff --git a/listbox_darwin.go b/listbox_darwin.go index e663e78..9575af6 100644 --- a/listbox_darwin.go +++ b/listbox_darwin.go @@ -223,6 +223,7 @@ var ( _setHeaderView = sel_getUid("setHeaderView:") _selectedRowIndexes = sel_getUid("selectedRowIndexes") _count = sel_getUid("count") + _numberOfRows = sel_getUid("numberOfRows") ) func makeListbox(parentWindow C.id, alternate bool) C.id { @@ -294,3 +295,7 @@ func deleteListbox(listbox C.id, index int) { array := listboxArray(listbox) deleteListboxArray(array, index) } + +func listboxLen(listbox C.id) int { + return int(C.objc_msgSend_intret_noargs(listboxInScrollView(listbox), _numberOfRows)) +} -- cgit v1.2.3