|
On 05/03/17 01:38 PM, Dirk Laurie wrote:
I meant calling one of those "static file functions" with a custom "virtual" file that writes to a table instead of writing to an actual file.2017-03-05 16:56 GMT+02:00 Soni L. <fakedme@gmail.com>:Have you ever tried: ... function myfile:write(...) local x = #self... No ... but I habitually put in my programs local append = function(tbl,obj,...) if ... then obj = obj:format(...) end table.insert(tbl,obj) end
Also, file:write() takes a varargs. -- Disclaimer: these emails may be made public at any given time, with or without reason. If you don't agree with this, DO NOT REPLY.