Fuse 0.29.0 (build 8396)
Build started: FullCompile
Configuring (0.7s)
Compiling syntax tree
C:\Users\jcbar\Desktop\affibox\Fuse\NativeTest\MyLogModule.uno(27.3): E3102: There is nothing named 'mplayAndroidLog' accessible in this scope. Did you perhaps misspell 'playAndroidLog' (as in 'MyLogModule.playAndroidLog(Fuse.Scripting.Context,object[])')? Could you be missing a package reference?
C:\Users\jcbar\Desktop\affibox\Fuse\NativeTest\MyLogModule.uno(27,4,27,19): Error E3102: There is nothing named 'mplayAndroidLog' accessible in this scope. Did you perhaps misspell 'playAndroidLog' (as in 'MyLogModule.playAndroidLog(Fuse.Scripting.Context,object[])')? Could you be missing a package reference?
(1.2s)
Build completed in 1.84 seconds
1 error
Build ended
fuse: Failed to compile project
Press any key to exit.
here is my UNO file:
using Uno;
using Uno.Collections;
using Fuse;
using Fuse.Scripting;
using Fuse.Reactive;
using Uno.UX;
using Uno.Compiler.ExportTargetInterop;
[UXGlobalModule]
public class MyLogModule : NativeModule
{
static readonly MyLogModule _instance;
public MyLogModule()
{
// Make sure we're only initializing the module once
if(_instance != null) return;
_instance = this;
Resource.SetGlobalKey(_instance, "MyLogModule");
AddMember(new NativeFunction("Log", (NativeCallback)Log));
}
object playAndroidLog(Context c, object[] args)
{
mplayAndroidLog(); //<---- If I call this I get the SCOPE error
//playAndroidLog(); //<---- If I change the name here and on the foreign function I get another error saying that it has no valid parameters, which I think its trying to call itself
return null;
}
[Foreign(Language.Java)]
static extern(Android) void mplayAndroidLog()
@{
android.util.Log.d("ForeignCodeExample", "MANDINGO");
@}
static object Log(Context c, object[] args)
{
foreach (var arg in args){
debug_log arg;
}
return null;
}
}