简体   繁体   中英

Lua create own loadstring() function

loadstring() and loadfile() Lua functions allow loading remote libraries and modules at runtime. As shown in this post it is very simple: How Do I Load Lua Module as a String Instead of a File?

Unfortunately Corona SDK has removed both these function. Here's a list of changes they have.

Is it possible to implement loadstring in lua or load it from a separate module? They seem to provide a solution here but I don't really understand it and I don't think it will work in Corona cause it requires dofile which is also disabled in Corona http://lua-users.org/lists/lua-l/2012-04/msg00875.html

loadstring() and dofile() are disabled per Apple's rules for allowing interpreted language apps to work on their devices. Apple will reject any app that has any dynamic programming features.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM