table size limited to 1000, empty search prettified

This commit is contained in:
Manuel Simon Hirsig
2016-02-08 17:57:45 +01:00
parent ed40fe78cd
commit ab11da7039
2 changed files with 24 additions and 2 deletions
+7 -2
View File
@@ -159,6 +159,10 @@ function private.get_form_filter()
end
function private.prettify_search(search)
if search == '' then
return NORMAL_FONT_COLOR_CODE..'No filter'..FONT_COLOR_CODE_CLOSE
end
local item_pattern = '([^/;]+)([^;]*)/exact'
while true do
local _, _, name, in_between = strfind(search, item_pattern)
@@ -847,8 +851,9 @@ function public.start_search(filter_string)
end
end,
on_read_auction = function(auction_info)
-- tinsert(scanned_records, private.create_auction_record(auction_info))
tinsert(scanned_records, auction_info)
if getn(scanned_records) < 1000 then -- TODO static popup, remove discard
tinsert(scanned_records, auction_info)
end
end,
on_complete = function()
private.results_listing:SetDatabase()
+17
View File
@@ -21,6 +21,23 @@ function m.key_count(table)
return count
end
do
local table = {}
function m.insert()
for i=1,1000000 do
tinsert(table, i)
end
end
function m.getn()
for i=1,100 do
snipe.log(getn(table))
end
end
end
--StaticPopupDialogs["CANCEL_AUCTION"] = {
-- text = TEXT(CANCEL_AUCTION_CONFIRMATION),
-- button1 = TEXT(ACCEPT),