Hi,
I have compiled Mono# from SVN to get access to GIO#. For the most part it works, I have no problem with the code:
base_dir = FileFactory.NewForPath(v);
However if I change it to
base_dir = FileFactory.NewForCommandlineArgs(v);I would like to change this so that one can enter a URI or a Path on the command line.
I recieve the following exception:
Unhandled Exception: System.EntryPointNotFoundException: g_file_new_for_commandline_args
at (wrapper managed-to-native) GLib.FileFactory:g_file_new_for_commandline_args (string) at GLib.FileFactory.NewForCommandlineArgs (System.String args) [0x00000]
at DbModAddMovie.MainClass+<Main>c__AnonStorey0.<>m__0 (System.String v) [0x00000] at NDesk.Options.OptionSet+<>c__CompilerGenerated0.<Add>c__4[OptionValueCollection] (NDesk.Options.OptionValueCollection v) [0x00000]
at (wrapper static-rgctx-invoke) NDesk.Options.OptionSet/<>c__CompilerGenerated0:static_rgctx_invoke_void__this___OptionValueCollection (NDesk.Options.OptionValueCollection)
at NDesk.Options.OptionSet+ActionOption.OnParseComplete (NDesk.Options.OptionContext c) [0x00000] at NDesk.Options.Option.Invoke (NDesk.Options.OptionContext c) [0x00000]
at NDesk.Options.OptionSet.ParseValue (System.String option, NDesk.Options.OptionContext c) [0x00000] at NDesk.Options.OptionSet.Parse (System.String argument, NDesk.Options.OptionContext c) [0x00000]
at NDesk.Options.OptionSet.Parse (IEnumerable`1 arguments) [0x00000] at DbModAddMovie.MainClass.Main (System.String[] args) [0x00000]
Looking at the source svn://mono/gtk-sharp/gio/FileFactory.cs the two methods are the following:
[DllImport ("libgio-2.0-0.dll")]
private static extern IntPtr g_file_new_for_path (string path);
public static File NewForPath (string path) {
return GLib.FileAdapter.GetObject (g_file_new_for_path (path), false) as File; }
[DllImport ("libgio-2.0-0.dll")] private static extern IntPtr g_file_new_for_commandline_args (string args);
public static File NewForCommandlineArgs (string args) {
return GLib.FileAdapter.GetObject (g_file_new_for_commandline_args (args), false) as File; }
I do not see a difference between them.
I am relatively new to C# so I do not know how to troubleshoot this. Would anyone be able to point me in the right direction?
Dan
_______________________________________________
Gtk-sharp-list maillist -
Gtk-sharp-list@...
http://lists.ximian.com/mailman/listinfo/gtk-sharp-list