ListView sort problem

new topic     » topic index » view thread      » older message » newer message

Hi,
I'm trying to implement ListView column sorting in Arwen. The call 
back is called the predicted number of times, and the third parameter 
is as expected, however the first two parameters are ALWAYS both zero!
What is going on?

without warning
include arwen.ew
constant DEMO = create(Window,"ListViews in ARWEN", 0,
0,10,10,520,350,0)
constant LIST1 = create(ListView, {{"a",50,0},{"b",30,0}},	0,
DEMO,10, 25, 405, 160, LVS_REPORT)
void = insertLVItems(LIST1, {{"b",3},{"c",1},{"a",2}})

function LVsort(atom a, atom b, atom lParam)	
	?{a,b,lParam} --<<< ALWAYS {0,0,2} <<<<<<
	return rand(3)-2
end function

function handler_LISTS(integer id, integer msg, object wParam, object
lParam)
	if id = LIST1 then and msg = WM_COMMAND then
		if wParam = LVN_COLUMNCLICK then

void=sendMessage(LIST1,LVM_SORTITEMS,LIST1,call_back(routine_id("LVsort")))
		end if
	end if
	return 0

end function
setHandler( LIST1, routine_id("handler_LISTS") )
WinMain(DEMO, SW_NORMAL)


Pete

new topic     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu