Commit bf8c5fe6 authored by Vinicius Jarina's avatar Vinicius Jarina
Browse files

Fixed iOS tests (running with KeraLua on simulator)

parent 8c0092ef
......@@ -39,6 +39,12 @@
<Reference Include="System.Xml" />
</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="Properties\AssemblyInfo.cs" />
</ItemGroup>
......
......@@ -3,6 +3,7 @@ using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using LuaInterface;
namespace ConsoleTest
{
......@@ -10,16 +11,23 @@ namespace ConsoleTest
{
static void Main (string [] args)
{
using (var lua = new LuaInterface.Lua ()) {
lua.RegisterFunction ("p", null, typeof (System.Console).GetMethod ("WriteLine", new Type [] { typeof (String) }));
/// Lua command that works (prints to console)
lua.DoString ("p('Foo')");
/// Yet this works...
lua.DoString ("string.gsub('some string', '(%w+)', function(s) p(s) end)");
/// 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)");
using (Lua lua = new Lua ()) {
lua.DoString ("luanet.load_assembly('mscorlib')");
lua.DoString ("luanet.load_assembly('ConsoleTest')");
lua.DoString ("TestClass=luanet.import_type('LuaInterfaceTest.Mock.TestClass')");
lua.DoString ("test=TestClass()");
try {
lua.DoString ("test:exceptionMethod()");
//failed
//Assert.True (false);
} catch (Exception) {
//passed
//Assert.True (true);
}
}
}
}
}
Subproject commit 2eb01c39e6baa79ec8d5fee8ffbe8611e993e4b8
Subproject commit 31271cd6f1b77768e6f70b4848e22fbc96b17338
......@@ -241,7 +241,7 @@ namespace LuaInterface
}
#if MONOTOUCH
[MonoTouch.MonoPInvokeCallback (typeof (Lua.lua_CFunction))]
[MonoTouch.MonoPInvokeCallback (typeof (LuaCore.lua_CFunction))]
#endif
[System.Runtime.InteropServices.AllowReversePInvokeCalls]
static int PanicCallback (LuaCore.lua_State luaState)
......@@ -872,7 +872,7 @@ namespace LuaInterface
/// <author>Reinhard Ostermeier</author>
///
#if MONOTOUCH
[MonoTouch.MonoPInvokeCallback (typeof (Lua.lua_Hook))]
[MonoTouch.MonoPInvokeCallback (typeof (LuaCore.lua_Hook))]
#endif
[System.Runtime.InteropServices.AllowReversePInvokeCalls]
private void DebugHookCallback (LuaCore.lua_State luaState, LuaCore.lua_Debug luaDebug)
......@@ -999,7 +999,7 @@ namespace LuaInterface
// We leave nothing on the stack when we are done
int oldTop = LuaLib.lua_gettop (luaState);
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);
var f = GetFunction (path);
LuaLib.lua_settop (luaState, oldTop);
......
......@@ -36,14 +36,9 @@
<Reference Include="System.Core" />
<Reference Include="System.Data" />
<Reference Include="System.Xml" />
<Reference Include="monotouch" />
</ItemGroup>
<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>
<Folder Include="Config\" />
<Folder Include="Event\" />
......@@ -97,4 +92,10 @@
<Compile Include="ObjectTranslator.cs" />
<Compile Include="ProxyType.cs" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\KeraLua\KeraLua.iOS.csproj">
<Project>{3F57C208-AA13-4B67-B3E7-ED41307F00A0}</Project>
<Name>KeraLua.iOS</Name>
</ProjectReference>
</ItemGroup>
</Project>
\ No newline at end of file
......@@ -87,7 +87,7 @@ namespace LuaInterface
* __call metafunction of CLR delegates, retrieves and calls the delegate.
*/
#if MONOTOUCH
[MonoTouch.MonoPInvokeCallback (typeof (Lua.lua_CFunction))]
[MonoTouch.MonoPInvokeCallback (typeof (LuaCore.lua_CFunction))]
#endif
[System.Runtime.InteropServices.AllowReversePInvokeCalls]
private int runFunctionDelegate (LuaCore.lua_State luaState)
......@@ -101,7 +101,7 @@ namespace LuaInterface
* __gc metafunction of CLR objects.
*/
#if MONOTOUCH
[MonoTouch.MonoPInvokeCallback (typeof (Lua.lua_CFunction))]
[MonoTouch.MonoPInvokeCallback (typeof (LuaCore.lua_CFunction))]
#endif
[System.Runtime.InteropServices.AllowReversePInvokeCalls]
private int collectObject (LuaCore.lua_State luaState)
......@@ -121,7 +121,7 @@ namespace LuaInterface
* __tostring metafunction of CLR objects.
*/
#if MONOTOUCH
[MonoTouch.MonoPInvokeCallback (typeof (Lua.lua_CFunction))]
[MonoTouch.MonoPInvokeCallback (typeof (LuaCore.lua_CFunction))]
#endif
[System.Runtime.InteropServices.AllowReversePInvokeCalls]
private int toString (LuaCore.lua_State luaState)
......@@ -169,7 +169,7 @@ namespace LuaInterface
* If the member does not exist returns nil.
*/
#if MONOTOUCH
[MonoTouch.MonoPInvokeCallback (typeof (Lua.lua_CFunction))]
[MonoTouch.MonoPInvokeCallback (typeof (LuaCore.lua_CFunction))]
#endif
[System.Runtime.InteropServices.AllowReversePInvokeCalls]
private int getMethod (LuaCore.lua_State luaState)
......@@ -264,7 +264,7 @@ namespace LuaInterface
* Adds a prefix to the method name to call the base version of the method.
*/
#if MONOTOUCH
[MonoTouch.MonoPInvokeCallback (typeof (Lua.lua_CFunction))]
[MonoTouch.MonoPInvokeCallback (typeof (LuaCore.lua_CFunction))]
#endif
[System.Runtime.InteropServices.AllowReversePInvokeCalls]
private int getBaseMethod (LuaCore.lua_State luaState)
......@@ -408,7 +408,7 @@ namespace LuaInterface
translator.pushType (luaState, nestedType);
} else {
// 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 ())
setMemberCache (memberCache, objType, methodName, wrapper);
......@@ -465,7 +465,7 @@ namespace LuaInterface
* and error if the assignment is invalid.
*/
#if MONOTOUCH
[MonoTouch.MonoPInvokeCallback (typeof (Lua.lua_CFunction))]
[MonoTouch.MonoPInvokeCallback (typeof (LuaCore.lua_CFunction))]
#endif
[System.Runtime.InteropServices.AllowReversePInvokeCalls]
private int setFieldOrProperty (LuaCore.lua_State luaState)
......@@ -632,7 +632,7 @@ namespace LuaInterface
* __index metafunction of type references, works on static members.
*/
#if MONOTOUCH
[MonoTouch.MonoPInvokeCallback (typeof (Lua.lua_CFunction))]
[MonoTouch.MonoPInvokeCallback (typeof (LuaCore.lua_CFunction))]
#endif
[System.Runtime.InteropServices.AllowReversePInvokeCalls]
private int getClassMethod (LuaCore.lua_State luaState)
......@@ -667,7 +667,7 @@ namespace LuaInterface
* __newindex function of type references, works on static members.
*/
#if MONOTOUCH
[MonoTouch.MonoPInvokeCallback (typeof (Lua.lua_CFunction))]
[MonoTouch.MonoPInvokeCallback (typeof (LuaCore.lua_CFunction))]
#endif
[System.Runtime.InteropServices.AllowReversePInvokeCalls]
private int setClassFieldOrProperty (LuaCore.lua_State luaState)
......@@ -691,7 +691,7 @@ namespace LuaInterface
* generates an exception.
*/
#if MONOTOUCH
[MonoTouch.MonoPInvokeCallback (typeof (Lua.lua_CFunction))]
[MonoTouch.MonoPInvokeCallback (typeof (LuaCore.lua_CFunction))]
#endif
[System.Runtime.InteropServices.AllowReversePInvokeCalls]
private int callConstructor (LuaCore.lua_State luaState)
......
......@@ -45,6 +45,7 @@ namespace LuaInterface.Method
*/
class LuaMethodWrapper
{
internal LuaCore.lua_CFunction invokeFunction;
private ObjectTranslator _Translator;
private MethodBase _Method;
private MethodCache _LastCalledMethod = new MethodCache ();
......@@ -59,6 +60,7 @@ namespace LuaInterface.Method
*/
public LuaMethodWrapper (ObjectTranslator translator, object target, IReflect targetType, MethodBase method)
{
invokeFunction = new LuaCore.lua_CFunction (this.call);
_Translator = translator;
_Target = target;
......@@ -79,6 +81,8 @@ namespace LuaInterface.Method
*/
public LuaMethodWrapper (ObjectTranslator translator, IReflect targetType, string methodName, BindingFlags bindingType)
{
invokeFunction = new LuaCore.lua_CFunction (this.call);
_Translator = translator;
_MethodName = methodName;
......@@ -105,10 +109,10 @@ namespace LuaInterface.Method
* and returns values in it.
*/
#if MONOTOUCH
[MonoTouch.MonoPInvokeCallback (typeof (Lua.lua_CFunction))]
[MonoTouch.MonoPInvokeCallback (typeof (LuaCore.lua_CFunction))]
#endif
[System.Runtime.InteropServices.AllowReversePInvokeCalls]
public int call (LuaCore.lua_State luaState)
int call (LuaCore.lua_State luaState)
{
var methodToCall = _Method;
object targetObject = _Target;
......
......@@ -233,7 +233,7 @@ namespace LuaInterface
* if the assembly is not found.
*/
#if MONOTOUCH
[MonoTouch.MonoPInvokeCallback (typeof (Lua.lua_CFunction))]
[MonoTouch.MonoPInvokeCallback (typeof (LuaCore.lua_CFunction))]
#endif
[System.Runtime.InteropServices.AllowReversePInvokeCalls]
private int loadAssembly (LuaCore.lua_State luaState)
......@@ -276,7 +276,7 @@ namespace LuaInterface
* type is not found.
*/
#if MONOTOUCH
[MonoTouch.MonoPInvokeCallback (typeof (Lua.lua_CFunction))]
[MonoTouch.MonoPInvokeCallback (typeof (LuaCore.lua_CFunction))]
#endif
[System.Runtime.InteropServices.AllowReversePInvokeCalls]
private int importType (LuaCore.lua_State luaState)
......@@ -298,7 +298,7 @@ namespace LuaInterface
* type passed as second argument in the stack.
*/
#if MONOTOUCH
[MonoTouch.MonoPInvokeCallback (typeof (Lua.lua_CFunction))]
[MonoTouch.MonoPInvokeCallback (typeof (LuaCore.lua_CFunction))]
#endif
[System.Runtime.InteropServices.AllowReversePInvokeCalls]
private int registerTable (LuaCore.lua_State luaState)
......@@ -344,7 +344,7 @@ namespace LuaInterface
* base field, freeing the created object for garbage-collection
*/
#if MONOTOUCH
[MonoTouch.MonoPInvokeCallback (typeof (Lua.lua_CFunction))]
[MonoTouch.MonoPInvokeCallback (typeof (LuaCore.lua_CFunction))]
#endif
[System.Runtime.InteropServices.AllowReversePInvokeCalls]
private int unregisterTable (LuaCore.lua_State luaState)
......@@ -383,7 +383,7 @@ namespace LuaInterface
* if no matching method is not found.
*/
#if MONOTOUCH
[MonoTouch.MonoPInvokeCallback (typeof (Lua.lua_CFunction))]
[MonoTouch.MonoPInvokeCallback (typeof (LuaCore.lua_CFunction))]
#endif
[System.Runtime.InteropServices.AllowReversePInvokeCalls]
private int getMethodSignature (LuaCore.lua_State luaState)
......@@ -417,7 +417,7 @@ namespace LuaInterface
//CP: Added ignore case
var method = klass.GetMethod (methodName, BindingFlags.Public | BindingFlags.Static |
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) {
throwError (luaState, e);
LuaLib.lua_pushnil (luaState);
......@@ -431,7 +431,7 @@ namespace LuaInterface
* if no matching constructor is found.
*/
#if MONOTOUCH
[MonoTouch.MonoPInvokeCallback (typeof (Lua.lua_CFunction))]
[MonoTouch.MonoPInvokeCallback (typeof (LuaCore.lua_CFunction))]
#endif
[System.Runtime.InteropServices.AllowReversePInvokeCalls]
private int getConstructorSignature (LuaCore.lua_State luaState)
......@@ -452,7 +452,7 @@ namespace LuaInterface
try {
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) {
throwError (luaState, e);
LuaLib.lua_pushnil (luaState);
......
......@@ -5,7 +5,9 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LuaInterface.IOS", "Core\Lu
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "KopiLua.IOS", "Core\KopiLua\KopiLua.IOS.csproj", "{44DA9778-C0B0-4C6F-8617-79BA2E0F1361}"
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
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
......@@ -19,6 +21,38 @@ Global
AppStore|iPhone = AppStore|iPhone
EndGlobalSection
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.Build.0 = Debug|Any CPU
{44DA9778-C0B0-4C6F-8617-79BA2E0F1361}.AppStore|iPhone.ActiveCfg = Debug|Any CPU
......@@ -35,22 +69,6 @@ Global
{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.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.Build.0 = Debug|Any CPU
{7064B157-DD57-4828-94C5-CA149B25CB40}.AppStore|iPhone.ActiveCfg = Debug|Any CPU
......@@ -69,6 +87,6 @@ Global
{7064B157-DD57-4828-94C5-CA149B25CB40}.Release|iPhoneSimulator.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(MonoDevelopProperties) = preSolution
StartupItem = ios\LuaInterfaceTest\LuaInterfaceTest.csproj
StartupItem = ios\LuaInterfaceTestsiOS\LuaInterfaceTest.csproj
EndGlobalSection
EndGlobal
......@@ -2,6 +2,12 @@
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<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>
<array>
<integer>1</integer>
......@@ -20,7 +26,5 @@
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
<key>MinimumOSVersion</key>
<string>3.2</string>
</dict>
</plist>
......@@ -5,10 +5,10 @@
<Platform Condition=" '$(Platform)' == '' ">iPhoneSimulator</Platform>
<ProductVersion>10.0.0</ProductVersion>
<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>
<OutputType>Exe</OutputType>
<RootNamespace>LuaInterface.Test</RootNamespace>
<RootNamespace>LuaInterfaceTest</RootNamespace>
<IPhoneResourcePrefix>Resources</IPhoneResourcePrefix>
<AssemblyName>LuaInterfaceTest</AssemblyName>
</PropertyGroup>
......@@ -21,8 +21,9 @@
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<ConsolePause>False</ConsolePause>
<MtouchLink>Full</MtouchLink>
<MtouchDebug>True</MtouchDebug>
<MtouchProfiling>True</MtouchProfiling>
<MtouchLink>None</MtouchLink>
<MtouchI18n />
<MtouchArch>ARMv7</MtouchArch>
</PropertyGroup>
......@@ -33,7 +34,7 @@
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<ConsolePause>False</ConsolePause>
<MtouchLink>Full</MtouchLink>
<MtouchLink>None</MtouchLink>
<MtouchI18n />
<MtouchArch>ARMv7</MtouchArch>
</PropertyGroup>
......@@ -46,8 +47,11 @@
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<ConsolePause>False</ConsolePause>
<MtouchDebug>True</MtouchDebug>
<CodesignKey>iPhone Developer</CodesignKey>
<MtouchDebug>True</MtouchDebug>
<MtouchProfiling>True</MtouchProfiling>
<MtouchI18n />
<MtouchArch>ARMv7</MtouchArch>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|iPhone' ">
<DebugType>none</DebugType>
......@@ -57,6 +61,10 @@
<WarningLevel>4</WarningLevel>
<ConsolePause>False</ConsolePause>
<CodesignKey>iPhone Developer</CodesignKey>
<IpaPackageName />
<MtouchI18n />
<MtouchArch>ARMv7</MtouchArch>
<MtouchLink>Full</MtouchLink>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Ad-Hoc|iPhone' ">
<DebugType>none</DebugType>
......@@ -111,10 +119,6 @@
<Project>{7064B157-DD57-4828-94C5-CA149B25CB40}</Project>
<Name>LuaInterface.IOS</Name>
</ProjectReference>
<ProjectReference Include="..\..\Core\KopiLua\KopiLua.IOS.csproj">
<Project>{44DA9778-C0B0-4C6F-8617-79BA2E0F1361}</Project>
<Name>KopiLua.IOS</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<BundleResource Include="..\..\tests\test.lua">
......
......@@ -5,7 +5,7 @@ using System.Linq;
using MonoTouch.Foundation;
using MonoTouch.UIKit;
namespace LuaInterfaceTest
namespace LuaInterfaceTestsiOS
{
public class Application
{
......
......@@ -6,7 +6,7 @@ using MonoTouch.Foundation;
using MonoTouch.UIKit;
using MonoTouch.NUnit.UI;
namespace LuaInterfaceTest
namespace LuaInterfaceTestsiOS
{
// 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
......
......@@ -298,7 +298,7 @@ namespace LuaInterfaceTest
//includes the bad code!
lua.DoString ("function OnClick(sender, eventArgs)\r\n" +
"--Multiply expects 2 floats, but instead receives 2 strings\r\n" +
"Multiply(asd, we)\r\n" +
"Multiply(asd, es)\r\n" +
"end");
//create the lua event handler code for the entity
//good code
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment