You can also do it like this to use a changeFunc instead of enterFunc. This does run NewFileSearch for every keypress, though, which obviously can feel a bit more laggy. What you could do here to minimize that lag is instead of having this function call self:BuildList(), it could create the list with all builds, loop through that list in this changeFunc, and build a filtered list that it assigns to self.list for the build list to use.
That latter bit could be a separate PR, but if you could do it here that'd be great. I do think using a changeFunc instead of enterFunc is more consistent with other lists, though.
self.controls.searchText = new("EditControl", {"TOP",self.anchor,"TOP"}, 0, 25, 640, 20, self.filterBuildList, "Search", "%c%(%)", 100, function(buf)
main.filterBuildList = buf
self:BuildList()
end)
Originally posted by @Wires77 in #2546 (comment)
You can also do it like this to use a
changeFuncinstead ofenterFunc. This does runNewFileSearchfor every keypress, though, which obviously can feel a bit more laggy. What you could do here to minimize that lag is instead of having this function callself:BuildList(), it could create the list with all builds, loop through that list in this changeFunc, and build a filtered list that it assigns toself.listfor the build list to use.That latter bit could be a separate PR, but if you could do it here that'd be great. I do think using a
changeFuncinstead ofenterFuncis more consistent with other lists, though.Originally posted by @Wires77 in #2546 (comment)