Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
ruanhaishen
NLua
Commits
bf8c5fe6
Commit
bf8c5fe6
authored
Feb 27, 2013
by
Vinicius Jarina
Browse files
Fixed iOS tests (running with KeraLua on simulator)
parent
8c0092ef
Changes
14
Hide whitespace changes
Inline
Side-by-side
ConsoleTest/ConsoleTest.csproj
View file @
bf8c5fe6
...
@@ -39,6 +39,12 @@
...
@@ -39,6 +39,12 @@
<Reference
Include=
"System.Xml"
/>
<Reference
Include=
"System.Xml"
/>
</ItemGroup>
</ItemGroup>
<ItemGroup>
<ItemGroup>
<Compile
Include=
"..\tests\Entity.cs"
>
<Link>
Entity.cs
</Link>
</Compile>
<Compile
Include=
"..\tests\TestLua.cs"
>
<Link>
TestLua.cs
</Link>
</Compile>
<Compile
Include=
"Program.cs"
/>
<Compile
Include=
"Program.cs"
/>
<Compile
Include=
"Properties\AssemblyInfo.cs"
/>
<Compile
Include=
"Properties\AssemblyInfo.cs"
/>
</ItemGroup>
</ItemGroup>
...
...
ConsoleTest/Program.cs
View file @
bf8c5fe6
...
@@ -3,6 +3,7 @@ using System.Collections.Generic;
...
@@ -3,6 +3,7 @@ using System.Collections.Generic;
using
System.Linq
;
using
System.Linq
;
using
System.Text
;
using
System.Text
;
using
System.Threading.Tasks
;
using
System.Threading.Tasks
;
using
LuaInterface
;
namespace
ConsoleTest
namespace
ConsoleTest
{
{
...
@@ -10,16 +11,23 @@ namespace ConsoleTest
...
@@ -10,16 +11,23 @@ namespace ConsoleTest
{
{
static
void
Main
(
string
[]
args
)
static
void
Main
(
string
[]
args
)
{
{
using
(
var
lua
=
new
LuaInterface
.
Lua
())
{
lua
.
RegisterFunction
(
"p"
,
null
,
typeof
(
System
.
Console
).
GetMethod
(
"WriteLine"
,
new
Type
[]
{
typeof
(
String
)
}));
using
(
Lua
lua
=
new
Lua
())
{
/// Lua command that works (prints to console)
lua
.
DoString
(
"luanet.load_assembly('mscorlib')"
);
lua
.
DoString
(
"p('Foo')"
);
lua
.
DoString
(
"luanet.load_assembly('ConsoleTest')"
);
/// Yet this works...
lua
.
DoString
(
"TestClass=luanet.import_type('LuaInterfaceTest.Mock.TestClass')"
);
lua
.
DoString
(
"string.gsub('some string', '(%w+)', function(s) p(s) end)"
);
lua
.
DoString
(
"test=TestClass()"
);
/// This fails if you don't fix Lua5.1 lstrlib.c/add_value to treat LUA_TUSERDATA the same as LUA_FUNCTION
lua
.
DoString
(
"string.gsub('some string', '(%w+)', p)"
);
try
{
lua
.
DoString
(
"test:exceptionMethod()"
);
//failed
//Assert.True (false);
}
catch
(
Exception
)
{
//passed
//Assert.True (true);
}
}
}
}
}
}
}
}
}
KeraLua
@
31271cd6
Compare
2eb01c39
...
31271cd6
Subproject commit
2eb01c39e6baa79ec8d5fee8ffbe8611e993e4b
8
Subproject commit
31271cd6f1b77768e6f70b4848e22fbc96b1733
8
Core/LuaInterface/Lua.cs
View file @
bf8c5fe6
...
@@ -241,7 +241,7 @@ namespace LuaInterface
...
@@ -241,7 +241,7 @@ namespace LuaInterface
}
}
#if MONOTOUCH
#if MONOTOUCH
[
MonoTouch
.
MonoPInvokeCallback
(
typeof
(
Lua
.
lua_CFunction
))]
[
MonoTouch
.
MonoPInvokeCallback
(
typeof
(
Lua
Core
.
lua_CFunction
))]
#endif
#endif
[
System
.
Runtime
.
InteropServices
.
AllowReversePInvokeCalls
]
[
System
.
Runtime
.
InteropServices
.
AllowReversePInvokeCalls
]
static
int
PanicCallback
(
LuaCore
.
lua_State
luaState
)
static
int
PanicCallback
(
LuaCore
.
lua_State
luaState
)
...
@@ -872,7 +872,7 @@ namespace LuaInterface
...
@@ -872,7 +872,7 @@ namespace LuaInterface
/// <author>Reinhard Ostermeier</author>
/// <author>Reinhard Ostermeier</author>
///
///
#if MONOTOUCH
#if MONOTOUCH
[
MonoTouch
.
MonoPInvokeCallback
(
typeof
(
Lua
.
lua_Hook
))]
[
MonoTouch
.
MonoPInvokeCallback
(
typeof
(
Lua
Core
.
lua_Hook
))]
#endif
#endif
[
System
.
Runtime
.
InteropServices
.
AllowReversePInvokeCalls
]
[
System
.
Runtime
.
InteropServices
.
AllowReversePInvokeCalls
]
private
void
DebugHookCallback
(
LuaCore
.
lua_State
luaState
,
LuaCore
.
lua_Debug
luaDebug
)
private
void
DebugHookCallback
(
LuaCore
.
lua_State
luaState
,
LuaCore
.
lua_Debug
luaDebug
)
...
@@ -999,7 +999,7 @@ namespace LuaInterface
...
@@ -999,7 +999,7 @@ namespace LuaInterface
// We leave nothing on the stack when we are done
// We leave nothing on the stack when we are done
int
oldTop
=
LuaLib
.
lua_gettop
(
luaState
);
int
oldTop
=
LuaLib
.
lua_gettop
(
luaState
);
var
wrapper
=
new
LuaMethodWrapper
(
translator
,
target
,
function
.
DeclaringType
,
function
);
var
wrapper
=
new
LuaMethodWrapper
(
translator
,
target
,
function
.
DeclaringType
,
function
);
translator
.
push
(
luaState
,
new
LuaCore
.
lua_CFunction
(
wrapper
.
call
));
translator
.
push
(
luaState
,
new
LuaCore
.
lua_CFunction
(
wrapper
.
invokeFunction
));
this
[
path
]
=
translator
.
getObject
(
luaState
,
-
1
);
this
[
path
]
=
translator
.
getObject
(
luaState
,
-
1
);
var
f
=
GetFunction
(
path
);
var
f
=
GetFunction
(
path
);
LuaLib
.
lua_settop
(
luaState
,
oldTop
);
LuaLib
.
lua_settop
(
luaState
,
oldTop
);
...
...
Core/LuaInterface/LuaInterface.IOS.csproj
View file @
bf8c5fe6
...
@@ -36,14 +36,9 @@
...
@@ -36,14 +36,9 @@
<Reference
Include=
"System.Core"
/>
<Reference
Include=
"System.Core"
/>
<Reference
Include=
"System.Data"
/>
<Reference
Include=
"System.Data"
/>
<Reference
Include=
"System.Xml"
/>
<Reference
Include=
"System.Xml"
/>
<Reference
Include=
"monotouch"
/>
</ItemGroup>
</ItemGroup>
<Import
Project=
"$(MSBuildBinPath)\Microsoft.CSharp.targets"
/>
<Import
Project=
"$(MSBuildBinPath)\Microsoft.CSharp.targets"
/>
<ItemGroup>
<ProjectReference
Include=
"..\KopiLua\KopiLua.IOS.csproj"
>
<Project>
{44DA9778-C0B0-4C6F-8617-79BA2E0F1361}
</Project>
<Name>
KopiLua.IOS
</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<ItemGroup>
<Folder
Include=
"Config\"
/>
<Folder
Include=
"Config\"
/>
<Folder
Include=
"Event\"
/>
<Folder
Include=
"Event\"
/>
...
@@ -97,4 +92,10 @@
...
@@ -97,4 +92,10 @@
<Compile
Include=
"ObjectTranslator.cs"
/>
<Compile
Include=
"ObjectTranslator.cs"
/>
<Compile
Include=
"ProxyType.cs"
/>
<Compile
Include=
"ProxyType.cs"
/>
</ItemGroup>
</ItemGroup>
<ItemGroup>
<ProjectReference
Include=
"..\KeraLua\KeraLua.iOS.csproj"
>
<Project>
{3F57C208-AA13-4B67-B3E7-ED41307F00A0}
</Project>
<Name>
KeraLua.iOS
</Name>
</ProjectReference>
</ItemGroup>
</Project>
</Project>
\ No newline at end of file
Core/LuaInterface/Metatables.cs
View file @
bf8c5fe6
...
@@ -87,7 +87,7 @@ namespace LuaInterface
...
@@ -87,7 +87,7 @@ namespace LuaInterface
* __call metafunction of CLR delegates, retrieves and calls the delegate.
* __call metafunction of CLR delegates, retrieves and calls the delegate.
*/
*/
#if MONOTOUCH
#if MONOTOUCH
[
MonoTouch
.
MonoPInvokeCallback
(
typeof
(
Lua
.
lua_CFunction
))]
[
MonoTouch
.
MonoPInvokeCallback
(
typeof
(
Lua
Core
.
lua_CFunction
))]
#endif
#endif
[
System
.
Runtime
.
InteropServices
.
AllowReversePInvokeCalls
]
[
System
.
Runtime
.
InteropServices
.
AllowReversePInvokeCalls
]
private
int
runFunctionDelegate
(
LuaCore
.
lua_State
luaState
)
private
int
runFunctionDelegate
(
LuaCore
.
lua_State
luaState
)
...
@@ -101,7 +101,7 @@ namespace LuaInterface
...
@@ -101,7 +101,7 @@ namespace LuaInterface
* __gc metafunction of CLR objects.
* __gc metafunction of CLR objects.
*/
*/
#if MONOTOUCH
#if MONOTOUCH
[
MonoTouch
.
MonoPInvokeCallback
(
typeof
(
Lua
.
lua_CFunction
))]
[
MonoTouch
.
MonoPInvokeCallback
(
typeof
(
Lua
Core
.
lua_CFunction
))]
#endif
#endif
[
System
.
Runtime
.
InteropServices
.
AllowReversePInvokeCalls
]
[
System
.
Runtime
.
InteropServices
.
AllowReversePInvokeCalls
]
private
int
collectObject
(
LuaCore
.
lua_State
luaState
)
private
int
collectObject
(
LuaCore
.
lua_State
luaState
)
...
@@ -121,7 +121,7 @@ namespace LuaInterface
...
@@ -121,7 +121,7 @@ namespace LuaInterface
* __tostring metafunction of CLR objects.
* __tostring metafunction of CLR objects.
*/
*/
#if MONOTOUCH
#if MONOTOUCH
[
MonoTouch
.
MonoPInvokeCallback
(
typeof
(
Lua
.
lua_CFunction
))]
[
MonoTouch
.
MonoPInvokeCallback
(
typeof
(
Lua
Core
.
lua_CFunction
))]
#endif
#endif
[
System
.
Runtime
.
InteropServices
.
AllowReversePInvokeCalls
]
[
System
.
Runtime
.
InteropServices
.
AllowReversePInvokeCalls
]
private
int
toString
(
LuaCore
.
lua_State
luaState
)
private
int
toString
(
LuaCore
.
lua_State
luaState
)
...
@@ -169,7 +169,7 @@ namespace LuaInterface
...
@@ -169,7 +169,7 @@ namespace LuaInterface
* If the member does not exist returns nil.
* If the member does not exist returns nil.
*/
*/
#if MONOTOUCH
#if MONOTOUCH
[
MonoTouch
.
MonoPInvokeCallback
(
typeof
(
Lua
.
lua_CFunction
))]
[
MonoTouch
.
MonoPInvokeCallback
(
typeof
(
Lua
Core
.
lua_CFunction
))]
#endif
#endif
[
System
.
Runtime
.
InteropServices
.
AllowReversePInvokeCalls
]
[
System
.
Runtime
.
InteropServices
.
AllowReversePInvokeCalls
]
private
int
getMethod
(
LuaCore
.
lua_State
luaState
)
private
int
getMethod
(
LuaCore
.
lua_State
luaState
)
...
@@ -264,7 +264,7 @@ namespace LuaInterface
...
@@ -264,7 +264,7 @@ namespace LuaInterface
* Adds a prefix to the method name to call the base version of the method.
* Adds a prefix to the method name to call the base version of the method.
*/
*/
#if MONOTOUCH
#if MONOTOUCH
[
MonoTouch
.
MonoPInvokeCallback
(
typeof
(
Lua
.
lua_CFunction
))]
[
MonoTouch
.
MonoPInvokeCallback
(
typeof
(
Lua
Core
.
lua_CFunction
))]
#endif
#endif
[
System
.
Runtime
.
InteropServices
.
AllowReversePInvokeCalls
]
[
System
.
Runtime
.
InteropServices
.
AllowReversePInvokeCalls
]
private
int
getBaseMethod
(
LuaCore
.
lua_State
luaState
)
private
int
getBaseMethod
(
LuaCore
.
lua_State
luaState
)
...
@@ -408,7 +408,7 @@ namespace LuaInterface
...
@@ -408,7 +408,7 @@ namespace LuaInterface
translator
.
pushType
(
luaState
,
nestedType
);
translator
.
pushType
(
luaState
,
nestedType
);
}
else
{
}
else
{
// Member type must be 'method'
// Member type must be 'method'
var
wrapper
=
new
LuaCore
.
lua_CFunction
((
new
LuaMethodWrapper
(
translator
,
objType
,
methodName
,
bindingType
)).
call
);
var
wrapper
=
new
LuaCore
.
lua_CFunction
((
new
LuaMethodWrapper
(
translator
,
objType
,
methodName
,
bindingType
)).
invokeFunction
);
if
(
cachedMember
.
IsNull
())
if
(
cachedMember
.
IsNull
())
setMemberCache
(
memberCache
,
objType
,
methodName
,
wrapper
);
setMemberCache
(
memberCache
,
objType
,
methodName
,
wrapper
);
...
@@ -465,7 +465,7 @@ namespace LuaInterface
...
@@ -465,7 +465,7 @@ namespace LuaInterface
* and error if the assignment is invalid.
* and error if the assignment is invalid.
*/
*/
#if MONOTOUCH
#if MONOTOUCH
[
MonoTouch
.
MonoPInvokeCallback
(
typeof
(
Lua
.
lua_CFunction
))]
[
MonoTouch
.
MonoPInvokeCallback
(
typeof
(
Lua
Core
.
lua_CFunction
))]
#endif
#endif
[
System
.
Runtime
.
InteropServices
.
AllowReversePInvokeCalls
]
[
System
.
Runtime
.
InteropServices
.
AllowReversePInvokeCalls
]
private
int
setFieldOrProperty
(
LuaCore
.
lua_State
luaState
)
private
int
setFieldOrProperty
(
LuaCore
.
lua_State
luaState
)
...
@@ -632,7 +632,7 @@ namespace LuaInterface
...
@@ -632,7 +632,7 @@ namespace LuaInterface
* __index metafunction of type references, works on static members.
* __index metafunction of type references, works on static members.
*/
*/
#if MONOTOUCH
#if MONOTOUCH
[
MonoTouch
.
MonoPInvokeCallback
(
typeof
(
Lua
.
lua_CFunction
))]
[
MonoTouch
.
MonoPInvokeCallback
(
typeof
(
Lua
Core
.
lua_CFunction
))]
#endif
#endif
[
System
.
Runtime
.
InteropServices
.
AllowReversePInvokeCalls
]
[
System
.
Runtime
.
InteropServices
.
AllowReversePInvokeCalls
]
private
int
getClassMethod
(
LuaCore
.
lua_State
luaState
)
private
int
getClassMethod
(
LuaCore
.
lua_State
luaState
)
...
@@ -667,7 +667,7 @@ namespace LuaInterface
...
@@ -667,7 +667,7 @@ namespace LuaInterface
* __newindex function of type references, works on static members.
* __newindex function of type references, works on static members.
*/
*/
#if MONOTOUCH
#if MONOTOUCH
[
MonoTouch
.
MonoPInvokeCallback
(
typeof
(
Lua
.
lua_CFunction
))]
[
MonoTouch
.
MonoPInvokeCallback
(
typeof
(
Lua
Core
.
lua_CFunction
))]
#endif
#endif
[
System
.
Runtime
.
InteropServices
.
AllowReversePInvokeCalls
]
[
System
.
Runtime
.
InteropServices
.
AllowReversePInvokeCalls
]
private
int
setClassFieldOrProperty
(
LuaCore
.
lua_State
luaState
)
private
int
setClassFieldOrProperty
(
LuaCore
.
lua_State
luaState
)
...
@@ -691,7 +691,7 @@ namespace LuaInterface
...
@@ -691,7 +691,7 @@ namespace LuaInterface
* generates an exception.
* generates an exception.
*/
*/
#if MONOTOUCH
#if MONOTOUCH
[
MonoTouch
.
MonoPInvokeCallback
(
typeof
(
Lua
.
lua_CFunction
))]
[
MonoTouch
.
MonoPInvokeCallback
(
typeof
(
Lua
Core
.
lua_CFunction
))]
#endif
#endif
[
System
.
Runtime
.
InteropServices
.
AllowReversePInvokeCalls
]
[
System
.
Runtime
.
InteropServices
.
AllowReversePInvokeCalls
]
private
int
callConstructor
(
LuaCore
.
lua_State
luaState
)
private
int
callConstructor
(
LuaCore
.
lua_State
luaState
)
...
...
Core/LuaInterface/Method/LuaMethodWrapper.cs
View file @
bf8c5fe6
...
@@ -45,6 +45,7 @@ namespace LuaInterface.Method
...
@@ -45,6 +45,7 @@ namespace LuaInterface.Method
*/
*/
class
LuaMethodWrapper
class
LuaMethodWrapper
{
{
internal
LuaCore
.
lua_CFunction
invokeFunction
;
private
ObjectTranslator
_Translator
;
private
ObjectTranslator
_Translator
;
private
MethodBase
_Method
;
private
MethodBase
_Method
;
private
MethodCache
_LastCalledMethod
=
new
MethodCache
();
private
MethodCache
_LastCalledMethod
=
new
MethodCache
();
...
@@ -59,6 +60,7 @@ namespace LuaInterface.Method
...
@@ -59,6 +60,7 @@ namespace LuaInterface.Method
*/
*/
public
LuaMethodWrapper
(
ObjectTranslator
translator
,
object
target
,
IReflect
targetType
,
MethodBase
method
)
public
LuaMethodWrapper
(
ObjectTranslator
translator
,
object
target
,
IReflect
targetType
,
MethodBase
method
)
{
{
invokeFunction
=
new
LuaCore
.
lua_CFunction
(
this
.
call
);
_Translator
=
translator
;
_Translator
=
translator
;
_Target
=
target
;
_Target
=
target
;
...
@@ -79,6 +81,8 @@ namespace LuaInterface.Method
...
@@ -79,6 +81,8 @@ namespace LuaInterface.Method
*/
*/
public
LuaMethodWrapper
(
ObjectTranslator
translator
,
IReflect
targetType
,
string
methodName
,
BindingFlags
bindingType
)
public
LuaMethodWrapper
(
ObjectTranslator
translator
,
IReflect
targetType
,
string
methodName
,
BindingFlags
bindingType
)
{
{
invokeFunction
=
new
LuaCore
.
lua_CFunction
(
this
.
call
);
_Translator
=
translator
;
_Translator
=
translator
;
_MethodName
=
methodName
;
_MethodName
=
methodName
;
...
@@ -105,10 +109,10 @@ namespace LuaInterface.Method
...
@@ -105,10 +109,10 @@ namespace LuaInterface.Method
* and returns values in it.
* and returns values in it.
*/
*/
#if MONOTOUCH
#if MONOTOUCH
[
MonoTouch
.
MonoPInvokeCallback
(
typeof
(
Lua
.
lua_CFunction
))]
[
MonoTouch
.
MonoPInvokeCallback
(
typeof
(
Lua
Core
.
lua_CFunction
))]
#endif
#endif
[
System
.
Runtime
.
InteropServices
.
AllowReversePInvokeCalls
]
[
System
.
Runtime
.
InteropServices
.
AllowReversePInvokeCalls
]
public
int
call
(
LuaCore
.
lua_State
luaState
)
int
call
(
LuaCore
.
lua_State
luaState
)
{
{
var
methodToCall
=
_Method
;
var
methodToCall
=
_Method
;
object
targetObject
=
_Target
;
object
targetObject
=
_Target
;
...
...
Core/LuaInterface/ObjectTranslator.cs
View file @
bf8c5fe6
...
@@ -233,7 +233,7 @@ namespace LuaInterface
...
@@ -233,7 +233,7 @@ namespace LuaInterface
* if the assembly is not found.
* if the assembly is not found.
*/
*/
#if MONOTOUCH
#if MONOTOUCH
[
MonoTouch
.
MonoPInvokeCallback
(
typeof
(
Lua
.
lua_CFunction
))]
[
MonoTouch
.
MonoPInvokeCallback
(
typeof
(
Lua
Core
.
lua_CFunction
))]
#endif
#endif
[
System
.
Runtime
.
InteropServices
.
AllowReversePInvokeCalls
]
[
System
.
Runtime
.
InteropServices
.
AllowReversePInvokeCalls
]
private
int
loadAssembly
(
LuaCore
.
lua_State
luaState
)
private
int
loadAssembly
(
LuaCore
.
lua_State
luaState
)
...
@@ -276,7 +276,7 @@ namespace LuaInterface
...
@@ -276,7 +276,7 @@ namespace LuaInterface
* type is not found.
* type is not found.
*/
*/
#if MONOTOUCH
#if MONOTOUCH
[
MonoTouch
.
MonoPInvokeCallback
(
typeof
(
Lua
.
lua_CFunction
))]
[
MonoTouch
.
MonoPInvokeCallback
(
typeof
(
Lua
Core
.
lua_CFunction
))]
#endif
#endif
[
System
.
Runtime
.
InteropServices
.
AllowReversePInvokeCalls
]
[
System
.
Runtime
.
InteropServices
.
AllowReversePInvokeCalls
]
private
int
importType
(
LuaCore
.
lua_State
luaState
)
private
int
importType
(
LuaCore
.
lua_State
luaState
)
...
@@ -298,7 +298,7 @@ namespace LuaInterface
...
@@ -298,7 +298,7 @@ namespace LuaInterface
* type passed as second argument in the stack.
* type passed as second argument in the stack.
*/
*/
#if MONOTOUCH
#if MONOTOUCH
[
MonoTouch
.
MonoPInvokeCallback
(
typeof
(
Lua
.
lua_CFunction
))]
[
MonoTouch
.
MonoPInvokeCallback
(
typeof
(
Lua
Core
.
lua_CFunction
))]
#endif
#endif
[
System
.
Runtime
.
InteropServices
.
AllowReversePInvokeCalls
]
[
System
.
Runtime
.
InteropServices
.
AllowReversePInvokeCalls
]
private
int
registerTable
(
LuaCore
.
lua_State
luaState
)
private
int
registerTable
(
LuaCore
.
lua_State
luaState
)
...
@@ -344,7 +344,7 @@ namespace LuaInterface
...
@@ -344,7 +344,7 @@ namespace LuaInterface
* base field, freeing the created object for garbage-collection
* base field, freeing the created object for garbage-collection
*/
*/
#if MONOTOUCH
#if MONOTOUCH
[
MonoTouch
.
MonoPInvokeCallback
(
typeof
(
Lua
.
lua_CFunction
))]
[
MonoTouch
.
MonoPInvokeCallback
(
typeof
(
Lua
Core
.
lua_CFunction
))]
#endif
#endif
[
System
.
Runtime
.
InteropServices
.
AllowReversePInvokeCalls
]
[
System
.
Runtime
.
InteropServices
.
AllowReversePInvokeCalls
]
private
int
unregisterTable
(
LuaCore
.
lua_State
luaState
)
private
int
unregisterTable
(
LuaCore
.
lua_State
luaState
)
...
@@ -383,7 +383,7 @@ namespace LuaInterface
...
@@ -383,7 +383,7 @@ namespace LuaInterface
* if no matching method is not found.
* if no matching method is not found.
*/
*/
#if MONOTOUCH
#if MONOTOUCH
[
MonoTouch
.
MonoPInvokeCallback
(
typeof
(
Lua
.
lua_CFunction
))]
[
MonoTouch
.
MonoPInvokeCallback
(
typeof
(
Lua
Core
.
lua_CFunction
))]
#endif
#endif
[
System
.
Runtime
.
InteropServices
.
AllowReversePInvokeCalls
]
[
System
.
Runtime
.
InteropServices
.
AllowReversePInvokeCalls
]
private
int
getMethodSignature
(
LuaCore
.
lua_State
luaState
)
private
int
getMethodSignature
(
LuaCore
.
lua_State
luaState
)
...
@@ -417,7 +417,7 @@ namespace LuaInterface
...
@@ -417,7 +417,7 @@ namespace LuaInterface
//CP: Added ignore case
//CP: Added ignore case
var
method
=
klass
.
GetMethod
(
methodName
,
BindingFlags
.
Public
|
BindingFlags
.
Static
|
var
method
=
klass
.
GetMethod
(
methodName
,
BindingFlags
.
Public
|
BindingFlags
.
Static
|
BindingFlags
.
Instance
|
BindingFlags
.
FlattenHierarchy
|
BindingFlags
.
IgnoreCase
,
null
,
signature
,
null
);
BindingFlags
.
Instance
|
BindingFlags
.
FlattenHierarchy
|
BindingFlags
.
IgnoreCase
,
null
,
signature
,
null
);
pushFunction
(
luaState
,
new
LuaCore
.
lua_CFunction
((
new
LuaMethodWrapper
(
this
,
target
,
klass
,
method
)).
call
));
pushFunction
(
luaState
,
new
LuaCore
.
lua_CFunction
((
new
LuaMethodWrapper
(
this
,
target
,
klass
,
method
)).
invokeFunction
));
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
throwError
(
luaState
,
e
);
throwError
(
luaState
,
e
);
LuaLib
.
lua_pushnil
(
luaState
);
LuaLib
.
lua_pushnil
(
luaState
);
...
@@ -431,7 +431,7 @@ namespace LuaInterface
...
@@ -431,7 +431,7 @@ namespace LuaInterface
* if no matching constructor is found.
* if no matching constructor is found.
*/
*/
#if MONOTOUCH
#if MONOTOUCH
[
MonoTouch
.
MonoPInvokeCallback
(
typeof
(
Lua
.
lua_CFunction
))]
[
MonoTouch
.
MonoPInvokeCallback
(
typeof
(
Lua
Core
.
lua_CFunction
))]
#endif
#endif
[
System
.
Runtime
.
InteropServices
.
AllowReversePInvokeCalls
]
[
System
.
Runtime
.
InteropServices
.
AllowReversePInvokeCalls
]
private
int
getConstructorSignature
(
LuaCore
.
lua_State
luaState
)
private
int
getConstructorSignature
(
LuaCore
.
lua_State
luaState
)
...
@@ -452,7 +452,7 @@ namespace LuaInterface
...
@@ -452,7 +452,7 @@ namespace LuaInterface
try
{
try
{
ConstructorInfo
constructor
=
klass
.
UnderlyingSystemType
.
GetConstructor
(
signature
);
ConstructorInfo
constructor
=
klass
.
UnderlyingSystemType
.
GetConstructor
(
signature
);
pushFunction
(
luaState
,
new
LuaCore
.
lua_CFunction
((
new
LuaMethodWrapper
(
this
,
null
,
klass
,
constructor
)).
call
));
pushFunction
(
luaState
,
new
LuaCore
.
lua_CFunction
((
new
LuaMethodWrapper
(
this
,
null
,
klass
,
constructor
)).
invokeFunction
));
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
throwError
(
luaState
,
e
);
throwError
(
luaState
,
e
);
LuaLib
.
lua_pushnil
(
luaState
);
LuaLib
.
lua_pushnil
(
luaState
);
...
...
LuaInterface.IOS.sln
View file @
bf8c5fe6
...
@@ -5,7 +5,9 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LuaInterface.IOS", "Core\Lu
...
@@ -5,7 +5,9 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LuaInterface.IOS", "Core\Lu
EndProject
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "KopiLua.IOS", "Core\KopiLua\KopiLua.IOS.csproj", "{44DA9778-C0B0-4C6F-8617-79BA2E0F1361}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "KopiLua.IOS", "Core\KopiLua\KopiLua.IOS.csproj", "{44DA9778-C0B0-4C6F-8617-79BA2E0F1361}"
EndProject
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LuaInterfaceTest", "ios\LuaInterfaceTest\LuaInterfaceTest.csproj", "{60D0D65D-F831-4AC4-A4F5-6C143299B0F3}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "KeraLua.iOS", "Core\KeraLua\KeraLua.iOS.csproj", "{3F57C208-AA13-4B67-B3E7-ED41307F00A0}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LuaInterfaceTest", "ios\LuaInterfaceTestsiOS\LuaInterfaceTest.csproj", "{2DC0E43A-21B8-41FF-8793-60AB50350977}"
EndProject
EndProject
Global
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
GlobalSection(SolutionConfigurationPlatforms) = preSolution
...
@@ -19,6 +21,38 @@ Global
...
@@ -19,6 +21,38 @@ Global
AppStore|iPhone = AppStore|iPhone
AppStore|iPhone = AppStore|iPhone
EndGlobalSection
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{2DC0E43A-21B8-41FF-8793-60AB50350977}.Ad-Hoc|iPhone.ActiveCfg = Ad-Hoc|iPhone
{2DC0E43A-21B8-41FF-8793-60AB50350977}.Ad-Hoc|iPhone.Build.0 = Ad-Hoc|iPhone
{2DC0E43A-21B8-41FF-8793-60AB50350977}.AppStore|iPhone.ActiveCfg = AppStore|iPhone
{2DC0E43A-21B8-41FF-8793-60AB50350977}.AppStore|iPhone.Build.0 = AppStore|iPhone
{2DC0E43A-21B8-41FF-8793-60AB50350977}.Debug|Any CPU.ActiveCfg = Debug|iPhoneSimulator
{2DC0E43A-21B8-41FF-8793-60AB50350977}.Debug|Any CPU.Build.0 = Debug|iPhoneSimulator
{2DC0E43A-21B8-41FF-8793-60AB50350977}.Debug|iPhone.ActiveCfg = Debug|iPhone
{2DC0E43A-21B8-41FF-8793-60AB50350977}.Debug|iPhone.Build.0 = Debug|iPhone
{2DC0E43A-21B8-41FF-8793-60AB50350977}.Debug|iPhoneSimulator.ActiveCfg = Debug|iPhoneSimulator
{2DC0E43A-21B8-41FF-8793-60AB50350977}.Debug|iPhoneSimulator.Build.0 = Debug|iPhoneSimulator
{2DC0E43A-21B8-41FF-8793-60AB50350977}.Release|Any CPU.ActiveCfg = Release|iPhoneSimulator
{2DC0E43A-21B8-41FF-8793-60AB50350977}.Release|Any CPU.Build.0 = Release|iPhoneSimulator
{2DC0E43A-21B8-41FF-8793-60AB50350977}.Release|iPhone.ActiveCfg = Release|iPhone
{2DC0E43A-21B8-41FF-8793-60AB50350977}.Release|iPhone.Build.0 = Release|iPhone
{2DC0E43A-21B8-41FF-8793-60AB50350977}.Release|iPhoneSimulator.ActiveCfg = Release|iPhoneSimulator
{2DC0E43A-21B8-41FF-8793-60AB50350977}.Release|iPhoneSimulator.Build.0 = Release|iPhoneSimulator
{3F57C208-AA13-4B67-B3E7-ED41307F00A0}.Ad-Hoc|iPhone.ActiveCfg = Release|Any CPU
{3F57C208-AA13-4B67-B3E7-ED41307F00A0}.Ad-Hoc|iPhone.Build.0 = Release|Any CPU
{3F57C208-AA13-4B67-B3E7-ED41307F00A0}.AppStore|iPhone.ActiveCfg = Release|Any CPU
{3F57C208-AA13-4B67-B3E7-ED41307F00A0}.AppStore|iPhone.Build.0 = Release|Any CPU
{3F57C208-AA13-4B67-B3E7-ED41307F00A0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{3F57C208-AA13-4B67-B3E7-ED41307F00A0}.Debug|Any CPU.Build.0 = Debug|Any CPU
{3F57C208-AA13-4B67-B3E7-ED41307F00A0}.Debug|iPhone.ActiveCfg = Debug|Any CPU
{3F57C208-AA13-4B67-B3E7-ED41307F00A0}.Debug|iPhone.Build.0 = Debug|Any CPU
{3F57C208-AA13-4B67-B3E7-ED41307F00A0}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU
{3F57C208-AA13-4B67-B3E7-ED41307F00A0}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU
{3F57C208-AA13-4B67-B3E7-ED41307F00A0}.Release|Any CPU.ActiveCfg = Release|Any CPU
{3F57C208-AA13-4B67-B3E7-ED41307F00A0}.Release|Any CPU.Build.0 = Release|Any CPU
{3F57C208-AA13-4B67-B3E7-ED41307F00A0}.Release|iPhone.ActiveCfg = Release|Any CPU
{3F57C208-AA13-4B67-B3E7-ED41307F00A0}.Release|iPhone.Build.0 = Release|Any CPU
{3F57C208-AA13-4B67-B3E7-ED41307F00A0}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU
{3F57C208-AA13-4B67-B3E7-ED41307F00A0}.Release|iPhoneSimulator.Build.0 = Release|Any CPU
{44DA9778-C0B0-4C6F-8617-79BA2E0F1361}.Ad-Hoc|iPhone.ActiveCfg = Debug|Any CPU
{44DA9778-C0B0-4C6F-8617-79BA2E0F1361}.Ad-Hoc|iPhone.ActiveCfg = Debug|Any CPU
{44DA9778-C0B0-4C6F-8617-79BA2E0F1361}.Ad-Hoc|iPhone.Build.0 = Debug|Any CPU
{44DA9778-C0B0-4C6F-8617-79BA2E0F1361}.Ad-Hoc|iPhone.Build.0 = Debug|Any CPU
{44DA9778-C0B0-4C6F-8617-79BA2E0F1361}.AppStore|iPhone.ActiveCfg = Debug|Any CPU
{44DA9778-C0B0-4C6F-8617-79BA2E0F1361}.AppStore|iPhone.ActiveCfg = Debug|Any CPU
...
@@ -35,22 +69,6 @@ Global
...
@@ -35,22 +69,6 @@ Global
{44DA9778-C0B0-4C6F-8617-79BA2E0F1361}.Release|iPhone.Build.0 = Release|Any CPU
{44DA9778-C0B0-4C6F-8617-79BA2E0F1361}.Release|iPhone.Build.0 = Release|Any CPU
{44DA9778-C0B0-4C6F-8617-79BA2E0F1361}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU
{44DA9778-C0B0-4C6F-8617-79BA2E0F1361}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU
{44DA9778-C0B0-4C6F-8617-79BA2E0F1361}.Release|iPhoneSimulator.Build.0 = Release|Any CPU
{44DA9778-C0B0-4C6F-8617-79BA2E0F1361}.Release|iPhoneSimulator.Build.0 = Release|Any CPU
{60D0D65D-F831-4AC4-A4F5-6C143299B0F3}.Ad-Hoc|iPhone.ActiveCfg = Ad-Hoc|iPhone
{60D0D65D-F831-4AC4-A4F5-6C143299B0F3}.Ad-Hoc|iPhone.Build.0 = Ad-Hoc|iPhone
{60D0D65D-F831-4AC4-A4F5-6C143299B0F3}.AppStore|iPhone.ActiveCfg = AppStore|iPhone
{60D0D65D-F831-4AC4-A4F5-6C143299B0F3}.AppStore|iPhone.Build.0 = AppStore|iPhone
{60D0D65D-F831-4AC4-A4F5-6C143299B0F3}.Debug|Any CPU.ActiveCfg = Debug|iPhoneSimulator
{60D0D65D-F831-4AC4-A4F5-6C143299B0F3}.Debug|Any CPU.Build.0 = Debug|iPhoneSimulator
{60D0D65D-F831-4AC4-A4F5-6C143299B0F3}.Debug|iPhone.ActiveCfg = Debug|iPhone
{60D0D65D-F831-4AC4-A4F5-6C143299B0F3}.Debug|iPhone.Build.0 = Debug|iPhone
{60D0D65D-F831-4AC4-A4F5-6C143299B0F3}.Debug|iPhoneSimulator.ActiveCfg = Debug|iPhoneSimulator
{60D0D65D-F831-4AC4-A4F5-6C143299B0F3}.Debug|iPhoneSimulator.Build.0 = Debug|iPhoneSimulator
{60D0D65D-F831-4AC4-A4F5-6C143299B0F3}.Release|Any CPU.ActiveCfg = Release|iPhoneSimulator
{60D0D65D-F831-4AC4-A4F5-6C143299B0F3}.Release|Any CPU.Build.0 = Release|iPhoneSimulator
{60D0D65D-F831-4AC4-A4F5-6C143299B0F3}.Release|iPhone.ActiveCfg = Release|iPhone
{60D0D65D-F831-4AC4-A4F5-6C143299B0F3}.Release|iPhone.Build.0 = Release|iPhone
{60D0D65D-F831-4AC4-A4F5-6C143299B0F3}.Release|iPhoneSimulator.ActiveCfg = Release|iPhoneSimulator
{60D0D65D-F831-4AC4-A4F5-6C143299B0F3}.Release|iPhoneSimulator.Build.0 = Release|iPhoneSimulator
{7064B157-DD57-4828-94C5-CA149B25CB40}.Ad-Hoc|iPhone.ActiveCfg = Debug|Any CPU
{7064B157-DD57-4828-94C5-CA149B25CB40}.Ad-Hoc|iPhone.ActiveCfg = Debug|Any CPU
{7064B157-DD57-4828-94C5-CA149B25CB40}.Ad-Hoc|iPhone.Build.0 = Debug|Any CPU
{7064B157-DD57-4828-94C5-CA149B25CB40}.Ad-Hoc|iPhone.Build.0 = Debug|Any CPU
{7064B157-DD57-4828-94C5-CA149B25CB40}.AppStore|iPhone.ActiveCfg = Debug|Any CPU
{7064B157-DD57-4828-94C5-CA149B25CB40}.AppStore|iPhone.ActiveCfg = Debug|Any CPU
...
@@ -69,6 +87,6 @@ Global
...
@@ -69,6 +87,6 @@ Global
{7064B157-DD57-4828-94C5-CA149B25CB40}.Release|iPhoneSimulator.Build.0 = Release|Any CPU
{7064B157-DD57-4828-94C5-CA149B25CB40}.Release|iPhoneSimulator.Build.0 = Release|Any CPU
EndGlobalSection
EndGlobalSection
GlobalSection(MonoDevelopProperties) = preSolution
GlobalSection(MonoDevelopProperties) = preSolution
StartupItem = ios\LuaInterfaceTest\LuaInterfaceTest.csproj
StartupItem = ios\LuaInterfaceTest
siOS
\LuaInterfaceTest.csproj
EndGlobalSection
EndGlobalSection
EndGlobal
EndGlobal
ios/LuaInterfaceTest/Info.plist
→
ios/LuaInterfaceTest
siOS
/Info.plist
View file @
bf8c5fe6
...
@@ -2,6 +2,12 @@
...
@@ -2,6 +2,12 @@
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist
version=
"1.0"
>
<plist
version=
"1.0"
>
<dict>
<dict>
<key>
CFBundleDisplayName
</key>
<string>
LuaInterfaceTest
</string>
<key>
CFBundleIdentifier
</key>
<string>
com.codefoco.luainterfacetest
</string>
<key>
MinimumOSVersion
</key>
<string>
3.2
</string>
<key>
UIDeviceFamily
</key>
<key>
UIDeviceFamily
</key>
<array>
<array>
<integer>
1
</integer>
<integer>
1
</integer>
...
@@ -20,7 +26,5 @@
...
@@ -20,7 +26,5 @@
<string>
UIInterfaceOrientationLandscapeLeft
</string>
<string>
UIInterfaceOrientationLandscapeLeft
</string>
<string>
UIInterfaceOrientationLandscapeRight
</string>
<string>
UIInterfaceOrientationLandscapeRight
</string>
</array>
</array>
<key>
MinimumOSVersion
</key>
<string>
3.2
</string>
</dict>
</dict>
</plist>
</plist>
ios/LuaInterfaceTest/LuaInterfaceTest.csproj
→
ios/LuaInterfaceTest
siOS
/LuaInterfaceTest.csproj
View file @
bf8c5fe6
...
@@ -5,10 +5,10 @@
...
@@ -5,10 +5,10 @@
<Platform
Condition=
" '$(Platform)' == '' "
>
iPhoneSimulator
</Platform>
<Platform
Condition=
" '$(Platform)' == '' "
>
iPhoneSimulator
</Platform>
<ProductVersion>
10.0.0
</ProductVersion>
<ProductVersion>
10.0.0
</ProductVersion>
<SchemaVersion>
2.0
</SchemaVersion>
<SchemaVersion>
2.0
</SchemaVersion>
<ProjectGuid>
{
60D0D65D-F831-4AC4-A4F5-6C143299B0F3
}
</ProjectGuid>
<ProjectGuid>
{
2DC0E43A-21B8-41FF-8793-60AB50350977
}
</ProjectGuid>
<ProjectTypeGuids>
{6BC8ED88-2882-458C-8E55-DFD12B67127B};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}
</ProjectTypeGuids>
<ProjectTypeGuids>
{6BC8ED88-2882-458C-8E55-DFD12B67127B};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}
</ProjectTypeGuids>
<OutputType>
Exe
</OutputType>
<OutputType>
Exe
</OutputType>
<RootNamespace>
LuaInterface
.
Test
</RootNamespace>
<RootNamespace>
LuaInterfaceTest
</RootNamespace>
<IPhoneResourcePrefix>
Resources
</IPhoneResourcePrefix>
<IPhoneResourcePrefix>
Resources
</IPhoneResourcePrefix>
<AssemblyName>
LuaInterfaceTest
</AssemblyName>
<AssemblyName>
LuaInterfaceTest
</AssemblyName>
</PropertyGroup>
</PropertyGroup>
...
@@ -21,8 +21,9 @@
...
@@ -21,8 +21,9 @@
<ErrorReport>
prompt
</ErrorReport>
<ErrorReport>
prompt
</ErrorReport>
<WarningLevel>
4
</WarningLevel>
<WarningLevel>
4
</WarningLevel>
<ConsolePause>
False
</ConsolePause>
<ConsolePause>
False
</ConsolePause>
<MtouchLink>
Full
</MtouchLink>
<MtouchDebug>
True
</MtouchDebug>
<MtouchDebug>
True
</MtouchDebug>
<MtouchProfiling>
True
</MtouchProfiling>
<MtouchLink>
None
</MtouchLink>
<MtouchI18n
/>
<MtouchI18n
/>
<MtouchArch>
ARMv7
</MtouchArch>
<MtouchArch>
ARMv7
</MtouchArch>
</PropertyGroup>
</PropertyGroup>
...
@@ -33,7 +34,7 @@
...
@@ -33,7 +34,7 @@
<ErrorReport>
prompt
</ErrorReport>
<ErrorReport>
prompt
</ErrorReport>
<WarningLevel>
4
</WarningLevel>
<WarningLevel>
4
</WarningLevel>
<ConsolePause>
False
</ConsolePause>
<ConsolePause>
False
</ConsolePause>
<MtouchLink>
Full
</MtouchLink>
<MtouchLink>
None
</MtouchLink>
<MtouchI18n
/>
<MtouchI18n
/>
<MtouchArch>
ARMv7
</MtouchArch>
<MtouchArch>
ARMv7
</MtouchArch>
</PropertyGroup>
</PropertyGroup>
...
@@ -46,8 +47,11 @@
...
@@ -46,8 +47,11 @@
<ErrorReport>
prompt
</ErrorReport>
<ErrorReport>
prompt
</ErrorReport>
<WarningLevel>
4
</WarningLevel>
<WarningLevel>
4
</WarningLevel>
<ConsolePause>
False
</ConsolePause>
<ConsolePause>
False
</ConsolePause>
<MtouchDebug>
True
</MtouchDebug>
<CodesignKey>
iPhone Developer
</CodesignKey>
<CodesignKey>
iPhone Developer
</CodesignKey>
<MtouchDebug>
True
</MtouchDebug>
<MtouchProfiling>
True
</MtouchProfiling>
<MtouchI18n
/>
<MtouchArch>
ARMv7
</MtouchArch>
</PropertyGroup>
</PropertyGroup>
<PropertyGroup
Condition=
" '$(Configuration)|$(Platform)' == 'Release|iPhone' "
>
<PropertyGroup
Condition=
" '$(Configuration)|$(Platform)' == 'Release|iPhone' "
>
<DebugType>
none
</DebugType>
<DebugType>
none
</DebugType>
...
@@ -57,6 +61,10 @@
...
@@ -57,6 +61,10 @@
<WarningLevel>
4
</WarningLevel>
<WarningLevel>
4
</WarningLevel>
<ConsolePause>
False
</ConsolePause>
<ConsolePause>
False
</ConsolePause>
<CodesignKey>
iPhone Developer
</CodesignKey>
<CodesignKey>
iPhone Developer
</CodesignKey>
<IpaPackageName
/>
<MtouchI18n
/>
<MtouchArch>
ARMv7
</MtouchArch>
<MtouchLink>
Full
</MtouchLink>
</PropertyGroup>
</PropertyGroup>
<PropertyGroup
Condition=
" '$(Configuration)|$(Platform)' == 'Ad-Hoc|iPhone' "
>
<PropertyGroup
Condition=
" '$(Configuration)|$(Platform)' == 'Ad-Hoc|iPhone' "
>
<DebugType>
none
</DebugType>
<DebugType>
none
</DebugType>
...
@@ -111,10 +119,6 @@
...
@@ -111,10 +119,6 @@
<Project>
{7064B157-DD57-4828-94C5-CA149B25CB40}
</Project>
<Project>
{7064B157-DD57-4828-94C5-CA149B25CB40}
</Project>
<Name>
LuaInterface.IOS
</Name>
<Name>
LuaInterface.IOS
</Name>
</ProjectReference>
</ProjectReference>
<ProjectReference
Include=
"..\..\Core\KopiLua\KopiLua.IOS.csproj"
>
<Project>
{44DA9778-C0B0-4C6F-8617-79BA2E0F1361}
</Project>
<Name>
KopiLua.IOS
</Name>
</ProjectReference>
</ItemGroup>
</ItemGroup>
<ItemGroup>
<ItemGroup>
<BundleResource
Include=
"..\..\tests\test.lua"
>
<BundleResource
Include=
"..\..\tests\test.lua"
>
...
...
ios/LuaInterfaceTest/Main.cs
→
ios/LuaInterfaceTest
siOS
/Main.cs
View file @
bf8c5fe6
...
@@ -5,7 +5,7 @@ using System.Linq;
...
@@ -5,7 +5,7 @@ using System.Linq;
using
MonoTouch.Foundation
;
using
MonoTouch.Foundation
;
using
MonoTouch.UIKit
;
using
MonoTouch.UIKit
;
namespace
LuaInterfaceTest
namespace
LuaInterfaceTest
siOS
{
{
public
class
Application
public
class
Application
{
{
...
...
ios/LuaInterfaceTest/UnitTestAppDelegate.cs
→
ios/LuaInterfaceTest
siOS
/UnitTestAppDelegate.cs
View file @
bf8c5fe6
...
@@ -6,7 +6,7 @@ using MonoTouch.Foundation;
...
@@ -6,7 +6,7 @@ using MonoTouch.Foundation;
using
MonoTouch.UIKit
;
using
MonoTouch.UIKit
;
using
MonoTouch.NUnit.UI
;
using
MonoTouch.NUnit.UI
;
namespace
LuaInterfaceTest
namespace
LuaInterfaceTest
siOS
{
{
// The UIApplicationDelegate for the application. This class is responsible for launching the
// The UIApplicationDelegate for the application. This class is responsible for launching the
// User Interface of the application, as well as listening (and optionally responding) to
// User Interface of the application, as well as listening (and optionally responding) to
...
...
tests/LuaTests.cs
View file @
bf8c5fe6
...
@@ -298,7 +298,7 @@ namespace LuaInterfaceTest
...
@@ -298,7 +298,7 @@ namespace LuaInterfaceTest
//includes the bad code!
//includes the bad code!
lua
.
DoString
(
"function OnClick(sender, eventArgs)\r\n"
+
lua
.
DoString
(
"function OnClick(sender, eventArgs)\r\n"
+
"--Multiply expects 2 floats, but instead receives 2 strings\r\n"
+
"--Multiply expects 2 floats, but instead receives 2 strings\r\n"
+
"Multiply(asd,
w
e)\r\n"
+
"Multiply(asd, e
s
)\r\n"
+
"end"
);
"end"
);
//create the lua event handler code for the entity
//create the lua event handler code for the entity
//good code
//good code
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment