TitleClick is killing sorting
Posted: Mon May 17, 2021 10:36 am
This have been mentioned in other threads, but I feared it might be overlooked behing a misleading title
Anyway, here is a small test script for the issue.
With this script the sorting of the first column does not work.
But comment or remove the line MOAI.Notify("lv", "TitleClick", True) and the sorting will work.
Anyway, here is a small test script for the issue.
With this script the sorting of the first column does not work.
But comment or remove the line MOAI.Notify("lv", "TitleClick", True) and the sorting will work.
Code: Select all
@REQUIRE "RapaGUI"
moai.CreateApp([[
<?xml version="1.0" encoding="iso-8859-1"?>
<application>
<window title="Test program">
<vgroup>
<listview id="lv" notify="active">
<column title="Last name" editable="true" sortable="true"/>
<column title="First name" editable="true"/>
</listview>
</vgroup>
</window>
</application>
]])
moai.DoMethod("lv", "insert", "bottom", "Peterson", "Bob")
moai.DoMethod("lv", "insert", "bottom", "Johnson", "Yusef")
moai.Notify("lv", "TitleClick", True)
Repeat
WaitEvent
Forever