Ok, so. Today I'm was coming with some challenging ideas.
Before make the test within MMF2 (via .net Script object), I make the code in Visual C# 2010 and it worked flawlessly !
So..
Therefore, in MMF2, my Code just don't work.
And I know (perhaps I know) where is it buggy.
It is in the Call of XULRunner engine.
Let's try, look at my code in .net Script object (C# mode) (his name in MMF2 is: ".netExtensionFramework", without the quotes marks):
I have also included a new reference (to : "C:\Composants CSharp\geckofx-11.dll") in reference tab -- Ah.. And it is the correct path, don't worry.
Code:
using System;
using System.IO;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Windows.Forms;
using System.Text;
// Gecko assembly (API GeckoFX 2) (Bitbucket Gecko)
using Gecko;
public class CSharpOverride
{
public static void InitializeGecko2(string ApplicationPath)
{
Gecko.Xpcom.Initialize(ApplicationPath + "_res\\BitbucketGeckoFX2\\xulrunner\\");
}
}
So, the VOID method called InitializeGecko2 is formed by an ApplicationPath string variable, passed by MMF2 at the CallEvent below:
At Frame start:
+ .netExtensionFramework : Call function: "CSharpOverride.InitializeGecko2" with parameters(Apppath$)
It simply no work, it is simply NOT called.
So, now, If I try this code:
Code:
using System;
using System.IO;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Windows.Forms;
using System.Text;
// Gecko assembly (API GeckoFX 2) (Bitbucket Gecko)
using Gecko;
public class CSharpOverride
{
public static void InitializeGecko2(string ApplicationPath)
{
MessageBox.Show("func_test: " + ApplicationPath + "_res\\BitbucketGeckoFX2\\xulrunner\\");
}
}
And then call by Event (at frame start):
At Frame start:
+ .netExtensionFramework : Call function: "CSharpOverride.InitializeGecko2" with parameters(Apppath$)
It is well called, and display to me a message box, which show: "func_test: C:\SpecialAppDevelopper\Multimedia Fusion 2\PersonalProjects\xultest\_res\BitbucketGeckoFX2\ xulrunner"
(Hum.. It seems this forum add a space between '\' and 'xulrunner', keep in mind there is no space in my code, even echoed.)
(Which is the folder where xulrunner is located).
So now, In my Visual C# 2010 test-project I made the thing working as it (reference to geckofx-11.dll added aswell):
Code:
using System;
using System.IO;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using Gecko;
namespace xultest
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
MessageBox.Show("Browser Launched");
string appPath = Path.GetDirectoryName(Application.ExecutablePath);
Gecko.Xpcom.Initialize(appPath + "\\xulrunner\\");
}
}
}
And then run the solution, I can see my XulRunner object loaded.
Now my ideas:

Originally Posted by
My ideas
Since the XulRunner engine must be initialized in a Form method...
How I can make the same initialization in that such location under .net Script object in MMF2 ?
This is certainly why it's no work, then How I can initialize the engine in such location...?
It's impossible? Even by simulate ???
For your information: Gecko is a wrapper of XulRunner which is an Engine of the Firefox browser.
Since I haven't MMF2Dev (and I don't want it, I just want make the things working, and if it is impossible, just gave up), I cannot have any other solution to get a Decent webbrowser embedded in MMF2's Applications.
So... Can you help (or trying) to help me? Thanks...
(I can submit the Visual C# 2010 full project if requested, It will be uploaded at rghost).