Aug. 22nd, 2012

altaev: (Default)

Запись опубликована Виталий Алтаев. Please leave any comments there.

Simplest way to call function from loaded module is passing function name to the module: 123456789101112131415161718192021——— —main.lua ——— function myFunction()   print("hello from module!") end local interface = require("interface") interface.init(myfunction) ——— — interface.lua  — your module ——— module(…, package.seeall) function init(callFuncName)   if(callFuncName)then    callFuncName()   end end

Profile

altaev: (Default)
altaev

August 2016

S M T W T F S
 123456
78910111213
14151617181920
21222324 252627
28293031   

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated Nov. 1st, 2025 11:42 am
Powered by Dreamwidth Studios