Re: [Mono-list] xsp more than one app failure
hi, i am experiencing this as well with mod_mono - i had submimtted it to bugzilla a while back and it was working again but since thursdsay or so i have seen regression (usinig anon cvs). http://bugzilla.ximian.com/show_bug.cgi?id=55978 in my report, i thought it had more to do with a specific control, but now it appears indeed to have more to do with multiple webapps. regards, --chris ps: stack trace: Server error in '/blogx' application Description: Error processing request. Error Message: HTTP 500. Stack Trace: System.NullReferenceException: Object reference not set to an instance of an object in 0xf System.Int32:FindSign (int,string,System.Globalization.NumberFormatInfo,bool,bool) in 0x00427 System.Int32:Parse (string,System.Globalization.NumberStyles,System.IFormatProvider) in 0x00013 System.Int32:Parse (string,System.IFormatProvider) in 0x00019 System.Convert:ToInt32 (string,System.IFormatProvider) in 0xe System.String:System.IConvertible.ToInt32 (System.IFormatProvider) in 0x00473 System.Convert:ToType (object,System.Type,System.IFormatProvider) in 0x00069 System.Convert:ChangeType (object,System.Type) in 0x0020d System.Web.Compilation.TemplateControlCompiler:GetExpressionFromString (System.Type,string) in 0x000e9 System.Web.Compilation.TemplateControlCompiler:AddCodeForPropertyOrField (System.Web.UI.ControlBuilder,System.Type,string,string,bool) in 0x001e3 System.Web.Compilation.TemplateControlCompiler:ProcessPropertiesAndFields (System.Web.UI.ControlBuilder,System.Reflection.MemberInfo,string,string) in 0x003e0 System.Web.Compilation.TemplateControlCompiler:CreateAssignStatementsFromAttributes (System.Web.UI.ControlBuilder) in 0x0014b System.Web.Compilation.TemplateControlCompiler:CreateControlTree (System.Web.UI.ControlBuilder,bool,bool) in 0x00494 System.Web.Compilation.TemplateControlCompiler:CreateControlTree (System.Web.UI.ControlBuilder,bool,bool) in 0x00494 System.Web.Compilation.TemplateControlCompiler:CreateControlTree (System.Web.UI.ControlBuilder,bool,bool) in 0x00494 System.Web.Compilation.TemplateControlCompiler:CreateControlTree (System.Web.UI.ControlBuilder,bool,bool) in 0x00050 System.Web.Compilation.TemplateControlCompiler:CreateMethods () in 0xa System.Web.Compilation.PageCompiler:CreateMethods () in 0x00148 System.Web.Compilation.BaseCompiler:GetCompiledType () in 0x00251 System.Web.Compilation.AspGenerator:GetCompiledType () in 0x00036 System.Web.UI.PageParser:CompileIntoType () in 0x00018 System.Web.UI.TemplateControlParser:GetCompiledInstance () in 0x00050 System.Web.UI.PageParser:GetCompiledPageInstance (string,string,System.Web.HttpContext) in 0x00011 System.Web.UI.PageHandlerFactory:GetHandler (System.Web.HttpContext,string,string,string) in 0x00337 System.Web.HttpApplication:CreateHttpHandler (System.Web.HttpContext,string,string,string) in 0x0011f CreateHandlerState:Execute () in 0x00084 StateMachine:ExecuteState (System.Web.HttpApplication/IStateHandler,bool) On Sun, 27 Jun 2004, Tomasz Soroka wrote: I have problem with xsp since beta 3 it's also in rc1, so look at this: All apps work properly, when I run them as standalone - for example: mono /usr/bin/xsp.exe --root . --applications /www:possibleWWW Problem is when I try run more than one app with xsp mono /usr/bin/xsp.exe --root . --applications /www:possibleWWW,/test:t1/ first app is my homepage and second is a xsp testing pages - from xsp installation. My homepage is written with using vs.net and compiled with mono.It uses firebird .net assembly compiled also with mono. when I first call /test 1 in browser http://localhost:8080/test it load properly next when i try call /www http://localhost:8080/www i get stacktrace (this app standaolne works perfectly) Description: Error processing request. Error Message: HTTP 500. Stack Trace: System.NullReferenceException: Object reference not set to an instance of an object in 0xf System.Int32:FindSign (int,string,System.Globalization.NumberFormatInfo,bool,bool) in 0x00427 System.Int32:Parse (string,System.Globalization.NumberStyles,System.IFormatProvider) in 0x00013 System.Int32:Parse (string,System.IFormatProvider) in 0x00019 System.Convert:ToInt32 (string,System.IFormatProvider) in 0xe System.String:System.IConvertible.ToInt32 (System.IFormatProvider) in 0x00473 System.Convert:ToType (object,System.Type,System.IFormatProvider) in 0x00069 System.Convert:ChangeType (object,System.Type) in 0x0020d System.Web.Compilation.TemplateControlCompiler:GetExpressionFromString (System.Type,string) in 0x000e9 System.Web.Compilation.TemplateControlCompiler:AddCodeForPropertyOrField (System.Web.UI.ControlBuilder,System.Type,string,string,bool) in 0x001e3 System.Web.Compilation.TemplateControlCompiler:ProcessPropertiesAndFields (System.Web.UI.ControlBuilder,System.Reflection.MemberInfo,string,string) in 0x003e0
Re: [Mono-list] xsp more than one app failure
So I will add it to bugzilla, because it seems to be still a problem. regards Tomek W licie z nie, 27-06-2004, godz. 10:59, Chris Turchin pisze: hi, i am experiencing this as well with mod_mono - i had submimtted it to bugzilla a while back and it was working again but since thursdsay or so i have seen regression (usinig anon cvs). http://bugzilla.ximian.com/show_bug.cgi?id=55978 in my report, i thought it had more to do with a specific control, but now it appears indeed to have more to do with multiple webapps. regards, --chris ps: stack trace: Server error in '/blogx' application Description: Error processing request. Error Message: HTTP 500. Stack Trace: System.NullReferenceException: Object reference not set to an instance of an object in 0xf System.Int32:FindSign (int,string,System.Globalization.NumberFormatInfo,bool,bool) in 0x00427 System.Int32:Parse (string,System.Globalization.NumberStyles,System.IFormatProvider) in 0x00013 System.Int32:Parse (string,System.IFormatProvider) in 0x00019 System.Convert:ToInt32 (string,System.IFormatProvider) in 0xe System.String:System.IConvertible.ToInt32 (System.IFormatProvider) in 0x00473 System.Convert:ToType (object,System.Type,System.IFormatProvider) in 0x00069 System.Convert:ChangeType (object,System.Type) in 0x0020d System.Web.Compilation.TemplateControlCompiler:GetExpressionFromString (System.Type,string) in 0x000e9 System.Web.Compilation.TemplateControlCompiler:AddCodeForPropertyOrField (System.Web.UI.ControlBuilder,System.Type,string,string,bool) in 0x001e3 System.Web.Compilation.TemplateControlCompiler:ProcessPropertiesAndFields (System.Web.UI.ControlBuilder,System.Reflection.MemberInfo,string,string) in 0x003e0 System.Web.Compilation.TemplateControlCompiler:CreateAssignStatementsFromAttributes (System.Web.UI.ControlBuilder) in 0x0014b System.Web.Compilation.TemplateControlCompiler:CreateControlTree (System.Web.UI.ControlBuilder,bool,bool) in 0x00494 System.Web.Compilation.TemplateControlCompiler:CreateControlTree (System.Web.UI.ControlBuilder,bool,bool) in 0x00494 System.Web.Compilation.TemplateControlCompiler:CreateControlTree (System.Web.UI.ControlBuilder,bool,bool) in 0x00494 System.Web.Compilation.TemplateControlCompiler:CreateControlTree (System.Web.UI.ControlBuilder,bool,bool) in 0x00050 System.Web.Compilation.TemplateControlCompiler:CreateMethods () in 0xa System.Web.Compilation.PageCompiler:CreateMethods () in 0x00148 System.Web.Compilation.BaseCompiler:GetCompiledType () in 0x00251 System.Web.Compilation.AspGenerator:GetCompiledType () in 0x00036 System.Web.UI.PageParser:CompileIntoType () in 0x00018 System.Web.UI.TemplateControlParser:GetCompiledInstance () in 0x00050 System.Web.UI.PageParser:GetCompiledPageInstance (string,string,System.Web.HttpContext) in 0x00011 System.Web.UI.PageHandlerFactory:GetHandler (System.Web.HttpContext,string,string,string) in 0x00337 System.Web.HttpApplication:CreateHttpHandler (System.Web.HttpContext,string,string,string) in 0x0011f CreateHandlerState:Execute () in 0x00084 StateMachine:ExecuteState (System.Web.HttpApplication/IStateHandler,bool) On Sun, 27 Jun 2004, Tomasz Soroka wrote: I have problem with xsp since beta 3 it's also in rc1, so look at this: All apps work properly, when I run them as standalone - for example: mono /usr/bin/xsp.exe --root . --applications /www:possibleWWW Problem is when I try run more than one app with xsp mono /usr/bin/xsp.exe --root . --applications /www:possibleWWW,/test:t1/ first app is my homepage and second is a xsp testing pages - from xsp installation. My homepage is written with using vs.net and compiled with mono.It uses firebird .net assembly compiled also with mono. when I first call /test 1 in browser http://localhost:8080/test it load properly next when i try call /www http://localhost:8080/www i get stacktrace (this app standaolne works perfectly) Description: Error processing request. Error Message: HTTP 500. Stack Trace: System.NullReferenceException: Object reference not set to an instance of an object in 0xf System.Int32:FindSign (int,string,System.Globalization.NumberFormatInfo,bool,bool) in 0x00427 System.Int32:Parse (string,System.Globalization.NumberStyles,System.IFormatProvider) in 0x00013 System.Int32:Parse (string,System.IFormatProvider) in 0x00019 System.Convert:ToInt32 (string,System.IFormatProvider) in 0xe System.String:System.IConvertible.ToInt32 (System.IFormatProvider) in 0x00473 System.Convert:ToType (object,System.Type,System.IFormatProvider) in 0x00069 System.Convert:ChangeType (object,System.Type) in 0x0020d System.Web.Compilation.TemplateControlCompiler:GetExpressionFromString (System.Type,string) in 0x000e9 System.Web.Compilation.TemplateControlCompiler:AddCodeForPropertyOrField
Re: [Mono-list] xsp more than one app failure
I've reopened this bug: look at: http://bugzilla.ximian.com/show_bug.cgi?id=55978 for comment and test cases best Tomek W licie z nie, 27-06-2004, godz. 13:17, Tomasz Soroka pisze: So I will add it to bugzilla, because it seems to be still a problem. regards Tomek W licie z nie, 27-06-2004, godz. 10:59, Chris Turchin pisze: hi, i am experiencing this as well with mod_mono - i had submimtted it to bugzilla a while back and it was working again but since thursdsay or so i have seen regression (usinig anon cvs). http://bugzilla.ximian.com/show_bug.cgi?id=55978 in my report, i thought it had more to do with a specific control, but now it appears indeed to have more to do with multiple webapps. regards, --chris ps: stack trace: Server error in '/blogx' application Description: Error processing request. Error Message: HTTP 500. Stack Trace: System.NullReferenceException: Object reference not set to an instance of an object in 0xf System.Int32:FindSign (int,string,System.Globalization.NumberFormatInfo,bool,bool) in 0x00427 System.Int32:Parse (string,System.Globalization.NumberStyles,System.IFormatProvider) in 0x00013 System.Int32:Parse (string,System.IFormatProvider) in 0x00019 System.Convert:ToInt32 (string,System.IFormatProvider) in 0xe System.String:System.IConvertible.ToInt32 (System.IFormatProvider) in 0x00473 System.Convert:ToType (object,System.Type,System.IFormatProvider) in 0x00069 System.Convert:ChangeType (object,System.Type) in 0x0020d System.Web.Compilation.TemplateControlCompiler:GetExpressionFromString (System.Type,string) in 0x000e9 System.Web.Compilation.TemplateControlCompiler:AddCodeForPropertyOrField (System.Web.UI.ControlBuilder,System.Type,string,string,bool) in 0x001e3 System.Web.Compilation.TemplateControlCompiler:ProcessPropertiesAndFields (System.Web.UI.ControlBuilder,System.Reflection.MemberInfo,string,string) in 0x003e0 System.Web.Compilation.TemplateControlCompiler:CreateAssignStatementsFromAttributes (System.Web.UI.ControlBuilder) in 0x0014b System.Web.Compilation.TemplateControlCompiler:CreateControlTree (System.Web.UI.ControlBuilder,bool,bool) in 0x00494 System.Web.Compilation.TemplateControlCompiler:CreateControlTree (System.Web.UI.ControlBuilder,bool,bool) in 0x00494 System.Web.Compilation.TemplateControlCompiler:CreateControlTree (System.Web.UI.ControlBuilder,bool,bool) in 0x00494 System.Web.Compilation.TemplateControlCompiler:CreateControlTree (System.Web.UI.ControlBuilder,bool,bool) in 0x00050 System.Web.Compilation.TemplateControlCompiler:CreateMethods () in 0xa System.Web.Compilation.PageCompiler:CreateMethods () in 0x00148 System.Web.Compilation.BaseCompiler:GetCompiledType () in 0x00251 System.Web.Compilation.AspGenerator:GetCompiledType () in 0x00036 System.Web.UI.PageParser:CompileIntoType () in 0x00018 System.Web.UI.TemplateControlParser:GetCompiledInstance () in 0x00050 System.Web.UI.PageParser:GetCompiledPageInstance (string,string,System.Web.HttpContext) in 0x00011 System.Web.UI.PageHandlerFactory:GetHandler (System.Web.HttpContext,string,string,string) in 0x00337 System.Web.HttpApplication:CreateHttpHandler (System.Web.HttpContext,string,string,string) in 0x0011f CreateHandlerState:Execute () in 0x00084 StateMachine:ExecuteState (System.Web.HttpApplication/IStateHandler,bool) On Sun, 27 Jun 2004, Tomasz Soroka wrote: I have problem with xsp since beta 3 it's also in rc1, so look at this: All apps work properly, when I run them as standalone - for example: mono /usr/bin/xsp.exe --root . --applications /www:possibleWWW Problem is when I try run more than one app with xsp mono /usr/bin/xsp.exe --root . --applications /www:possibleWWW,/test:t1/ first app is my homepage and second is a xsp testing pages - from xsp installation. My homepage is written with using vs.net and compiled with mono.It uses firebird .net assembly compiled also with mono. when I first call /test 1 in browser http://localhost:8080/test it load properly next when i try call /www http://localhost:8080/www i get stacktrace (this app standaolne works perfectly) Description: Error processing request. Error Message: HTTP 500. Stack Trace: System.NullReferenceException: Object reference not set to an instance of an object in 0xf System.Int32:FindSign (int,string,System.Globalization.NumberFormatInfo,bool,bool) in 0x00427 System.Int32:Parse (string,System.Globalization.NumberStyles,System.IFormatProvider) in 0x00013 System.Int32:Parse (string,System.IFormatProvider) in 0x00019 System.Convert:ToInt32 (string,System.IFormatProvider) in 0xe System.String:System.IConvertible.ToInt32 (System.IFormatProvider) in 0x00473 System.Convert:ToType
Re: [Mono-list] gtk-sharp CVS build failing
Hi Fawad, thanks for the tip (off the list) on how to solve this. if anyone else is having this problem (and I just saw on IRC that others are) then try this suggestion from fawad: When doing the compilation, you need to pass the option '--optimize=loop' to mono. I had to go into the Makefile for each assembly in gtk-sharp, change the RUNTIME variable from MY_PATH_TO_MONO/bin/mono to MY_PATH_TO_MONO/bin/mono --optimize=loop. This is a known mono bug and should be fixed soon. regards, --chris On Sat, 26 Jun 2004, Fawad Halim wrote: Hi, gtk-sharp build is failing for me with this error: Name: pattern Type: FcPattern* in callback PangoFT2SubstituteFunc Stubbing it out Unhandled Exception: System.NullReferenceException: Object reference not set to an instance of an object in 0x0005d GtkSharp.Generation.ClassBase:GenMethods (GtkSharp.Generation.GenerationInfo,System.Collections.Hashtable,GtkSharp.Generation.ClassBase) make[3]: *** [generated-stamp] Error 1 make[3]: Leaving directory `/usr/data/fawad/cvs/mono/gtk-sharp/pango' make[2]: *** [all-recursive] Error 1 make[2]: Leaving directory `/usr/data/fawad/cvs/mono/gtk-sharp/pango' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/usr/data/fawad/cvs/mono/gtk-sharp' make: *** [all] Error 2 I'm getting this same error on both FC2 and Debian Unstable. mono and gtk-sharp source was gotten from CVS. Regards -fawad ___ Mono-list maillist - [EMAIL PROTECTED] http://lists.ximian.com/mailman/listinfo/mono-list ___ Mono-list maillist - [EMAIL PROTECTED] http://lists.ximian.com/mailman/listinfo/mono-list
[Mono-list] libgdi on OS X
I libgdi buildable on OS X? or is it platfform dependent. I try to build it, but I end up with the following error: In file included from bitmap.c:29: gdip_win32.h:146: warning: `__stdcall__' attribute directive ignored gdip_win32.h:147: warning: `__stdcall__' attribute directive ignored gdip_win32.h:148: warning: `__stdcall__' attribute directive ignored gdip_win32.h:150: warning: `__stdcall__' attribute directive ignored gdip_win32.h:152: warning: `__stdcall__' attribute directive ignored gdip_win32.h:153: warning: `__stdcall__' attribute directive ignored gdip_win32.h:154: warning: `__stdcall__' attribute directive ignored gdip_win32.h:156: warning: `__stdcall__' attribute directive ignored gdip_win32.h:157: warning: `__stdcall__' attribute directive ignored gdip_win32.h:159: warning: `__stdcall__' attribute directive ignored gdip_win32.h:160: warning: `__stdcall__' attribute directive ignored gdip_win32.h:161: warning: `__stdcall__' attribute directive ignored gdip_win32.h:170: warning: `__stdcall__' attribute directive ignored make[2]: *** [bitmap.lo] Error 1 make[1]: *** [all-recursive] Error 1 make: *** [all] Error 2 making me think its a platform dependant thing. -- Elfred Pagan ___ Mono-list maillist - [EMAIL PROTECTED] http://lists.ximian.com/mailman/listinfo/mono-list
[Mono-list] gtk# app installer
Hi! I did app in gtk# and now I would write installer for windows. I would like have all needed things in one installer. - mono - gtk# libs - gtk+ libs It should installs all in one place, and should be very easy - user shouldn't know what technology was used. Can You give me any advices how to do that? best Tomek ___ Mono-list maillist - [EMAIL PROTECTED] http://lists.ximian.com/mailman/listinfo/mono-list
[Mono-list] gtk-sharp CVS build failing
Hi, gtk-sharp build is failing for me with this error: Name: pattern Type: FcPattern* in callback PangoFT2SubstituteFunc Stubbing it out Unhandled Exception: System.NullReferenceException: Object reference not set to an instance of an object in 0x0005d GtkSharp.Generation.ClassBase:GenMethods (GtkSharp.Generation.GenerationInfo,System.Collections.Hashtable,GtkSharp.Generation.ClassBase) make[3]: *** [generated-stamp] Error 1 make[3]: Leaving directory `/usr/data/fawad/cvs/mono/gtk-sharp/pango' make[2]: *** [all-recursive] Error 1 make[2]: Leaving directory `/usr/data/fawad/cvs/mono/gtk-sharp/pango' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/usr/data/fawad/cvs/mono/gtk-sharp' make: *** [all] Error 2 I'm getting this same error on both FC2 and Debian Unstable. mono and gtk-sharp source was gotten from CVS. Regards -fawad ___ Mono-list maillist - [EMAIL PROTECTED] http://lists.ximian.com/mailman/listinfo/mono-list
Re: [Mono-list] gtk-sharp CVS build failing
I'm getting this same error on both FC2 and Debian Unstable. mono and gtk-sharp source was gotten from CVS. I'm getting the same error on NetBSD with mono 0.97 and Gtk# 0.99. Marc pgpZ0zhAmL0e6.pgp Description: PGP signature !DSPAM:40df1752270552020415896!
Re: [Mono-list] gtk-sharp CVS build failing
I'm getting this same error on both FC2 and Debian Unstable. mono and gtk-sharp source was gotten from CVS. I'm getting the same error on NetBSD with mono 0.97 and Gtk# 0.99. Same here on Debian unstable. Also noticed that building libgdiplus gives many errors like ../libtool: line 3975: test: : integer expression expected No idea whether they are related or not... -- Gert smime.p7s Description: S/MIME Cryptographic Signature
[Mono-list] Casting and Plugin Issue
Hi! I'll explain what I'm doing and what I'm looking for: I've three plugins to post/get data from different Blogs (supporting XMLRPC and SOAP). In order to standardize these plugins I'm using Interfaces and three type of Structs (PostStruct, BlogStruct, CategoryStruct) each one XmlSerialized. So, the method to retrieve a list of posts should return a PostStruct. The problem is: When I'm using the plugin to Invoke the methods of these plugins (dll's) I'm having problems with these objects, for example: my_method = t.GetMethod(MGetPosts); object retVal = my_method.Invoke(activator, BindingFlags.Instance | BindingFlags.NonPublic | BindingFlags.InvokeMethod, null, new Object[]{3, user}, null); Will return a PostStruct (cause I'm asking for Posts) with the last 3 posts (3, and the userInfo). When I do a WriteLine of retVal I get a PostStruct, that should be, however, When I try to cast retVal to a PostStruct so I can read I get this: Unhandled Exception: System.InvalidCastException: Cannot cast from source type to destination type. in 0x0020e PluginLoader:Main (string[]) From: PostStruct p = (PostStruct)retVal; What I'm doing wrong if the Console.WriteLine(retVal) show me that retVal is a PostStruct?. Any Clues? I'm running Beta3 Thanks! Pablo -- Pablo Fischer Sandoval (pablo [arroba/at] pablo.com.mx) Fingerprint: 5973 0F10 543F 54AE 1E41 EC81 0840 A10A 74A4 E5C0 http://www.pablo.com.mx http://www.debianmexico.org signature.asc Description: Esta parte del mensaje =?ISO-8859-1?Q?est=E1?= firmada digitalmente
Re: [Mono-list] Casting and Plugin Issue
Hello Pablo, (inline) El dom, 27-06-2004 a las 17:43, Pablo Fischer escribió: Hi! I'll explain what I'm doing and what I'm looking for: I've three plugins to post/get data from different Blogs (supporting XMLRPC and SOAP). In order to standardize these plugins I'm using Interfaces and three type of Structs (PostStruct, BlogStruct, CategoryStruct) each one XmlSerialized. So, the method to retrieve a list of posts should return a PostStruct. The problem is: When I'm using the plugin to Invoke the methods of these plugins (dll's) I'm having problems with these objects, for example: my_method = t.GetMethod(MGetPosts); object retVal = my_method.Invoke(activator, BindingFlags.Instance | BindingFlags.NonPublic | BindingFlags.InvokeMethod, null, new Object[]{3, user}, null); Will return a PostStruct (cause I'm asking for Posts) with the last 3 posts (3, and the userInfo). When I do a WriteLine of retVal I get a PostStruct, that should be, however, When I try to cast retVal to a PostStruct so I can read I get this: Unhandled Exception: System.InvalidCastException: Cannot cast from source type to destination type. in 0x0020e PluginLoader:Main (string[]) From: PostStruct p = (PostStruct)retVal; What I'm doing wrong if the Console.WriteLine(retVal) show me that retVal is a PostStruct?. Maybe you're compiling the source file where PostStruct is defined in both assemblies, caller and callee. What you should do is to compile it only in the caller, and then compile the plugin with a reference to the caller assembly. Beware that you can't do this if the caller is an exe. Any Clues? I'm running Beta3 Maybe you could also add an interface, lets say IPlugin, which defines the method GetPosts. This way you wouldn't have to use reflection in order to invoke methods. Thanks! Pablo Hope this helps, Rodolfo ___ Mono-list maillist - [EMAIL PROTECTED] http://lists.ximian.com/mailman/listinfo/mono-list
Re: [Mono-list] issues with mono .97 on Fedora Core 2
I got the same problem using the mono rpms and sorted it out by compiling it from sources myself. Nevertheless I would like to know the reason behinf this. It is not handy to compile that stuff every time. Especially on a Pentium 166 with just 64MB or RAM... :-) -fs - Original Message - From: Paul [EMAIL PROTECTED] To: Mono List [EMAIL PROTECTED] Sent: Sunday, June 27, 2004 9:15 PM Subject: Re: [Mono-list] issues with mono .97 on Fedora Core 2 Hi Mono seems to die unexpectedly with the following error message: $ mono mono: error while loading shared libraries: libmono.so.0: cannot handle TLS data Have you built this yourself or using the mono rpms? TTFN Paul -- If I face my God tomorrow, I can tell Him I am innocent. I've never harmed anyone. I have cheated no one. I have deceived no one. I have hurt no one. Except myself. And that He will forgive me. - Hans Holzel ___ Mono-list maillist - [EMAIL PROTECTED] http://lists.ximian.com/mailman/listinfo/mono-list
Re: [Mono-list] Casting and Plugin Issue
Hi! Maybe you're compiling the source file where PostStruct is defined in both assemblies, caller and callee. What you should do is to compile it only in the caller, and then compile the plugin with a reference to the caller assembly. Beware that you can't do this if the caller is an exe. Yeah, It works!. I compiled these *Struct.cs files as a Assembly (dll) and I'm compiling the plugin and main app with a reference to Struct.dll and it works!. Maybe you could also add an interface, lets say IPlugin, which defines the method GetPosts. This way you wouldn't have to use reflection in order to invoke methods. Uhm, I did not understand very well this. In IPlugin.cs I have defined these methods (GetPost, GetPosts, etc) and in each Plugin I'm inheriting from it (IPlugin) so with the Wrapper I just call GetPost instead of calling each method with different names (Blogger, MetaWebLog, LiveJournal, etc). Or you have another idea? :-) Thanks!! Pablo -- Pablo Fischer Sandoval (pablo [arroba/at] pablo.com.mx) Fingerprint: 5973 0F10 543F 54AE 1E41 EC81 0840 A10A 74A4 E5C0 http://www.pablo.com.mx http://www.debianmexico.org signature.asc Description: Esta parte del mensaje =?ISO-8859-1?Q?est=E1?= firmada digitalmente
[Mono-list] Visual Studio Add-in Design Objectives Discussion
Greetings: I have completed a document that presents a clickable screen shot of the prototype of the prj2make-sharp Visual Studio Add-in. In this document I go over what my initial release will try to accomplish. There are some issues that are still not resolved on the installation and usage of Mono and GTK# under Win32. I am asking for community leaders and some of our outstanding contributors the likes of Mike Kestner, Miguel de Icaza, Erik Dasque, Todd Berman, Daniel Morgan, Gonzalo Paniagua, Jonathan Pryor, John Luke, Urs Muff and others to take a look at this document and to please provide feedback if pertinent. I certainly don't want to make this an elitist poll or query, but there are a few issues that maybe best addressed by the group of folks listed above. Feel free to comment back on the mailing list or to send me emails to my personal account. There will also be an ASP.NET application for sending feedback -- a button near the top of the page -- that ends up as an email to my mail box. http://www.mfconsulting.com/product/prj2make-sharp/vsprj2make_Proposal.html Best regards for all. Paco ___ Mono-list maillist - [EMAIL PROTECTED] http://lists.ximian.com/mailman/listinfo/mono-list
Re: [Mono-list] Casting and Plugin Issue
El dom, 27-06-2004 a las 20:17, Pablo Fischer escribió: Hi! Maybe you're compiling the source file where PostStruct is defined in both assemblies, caller and callee. What you should do is to compile it only in the caller, and then compile the plugin with a reference to the caller assembly. Beware that you can't do this if the caller is an exe. Yeah, It works!. I compiled these *Struct.cs files as a Assembly (dll) and I'm compiling the plugin and main app with a reference to Struct.dll and it works!. :) It feels nice to be helpful. Maybe you could also add an interface, lets say IPlugin, which defines the method GetPosts. This way you wouldn't have to use reflection in order to invoke methods. Uhm, I did not understand very well this. In IPlugin.cs I have defined these methods (GetPost, GetPosts, etc) and in each Plugin I'm inheriting from it (IPlugin) so with the Wrapper I just call GetPost instead of calling each method with different names (Blogger, MetaWebLog, LiveJournal, etc). Or you have another idea? :-) I don't have any other idea, but I thought that maybe instead of doing: snip my_method = t.GetMethod(MGetPosts); object retVal = my_method.Invoke(activator, BindingFlags.Instance | BindingFlags.NonPublic | BindingFlags.InvokeMethod, null, new Object[]{3, user}, null); /snip You could do: IPluging p = (IPlugin)t; object retVal = p.MGetPosts(3, user); Thanks!! Pablo Happy hacking, Rodolfo ___ Mono-list maillist - [EMAIL PROTECTED] http://lists.ximian.com/mailman/listinfo/mono-list
Re: [Mono-list] Visual Studio Add-in Design Objectives Discussion
Francisco T. Martinez wrote: Greetings: I have completed a document that presents a clickable screen shot of the prototype of the prj2make-sharp Visual Studio Add-in. In this document I go over what my initial release will try to accomplish. There are some issues that are still not resolved on the installation and usage of Mono and GTK# under Win32. I am asking for community leaders and some of our outstanding contributors the likes of Mike Kestner, Miguel de Icaza, Erik Dasque, Todd Berman, Daniel Morgan, Gonzalo Paniagua, Jonathan Pryor, John Luke, Urs Muff and others to take a look at this document and to please provide feedback if pertinent. I certainly don't want to make this an elitist poll or query, but there are a few issues that maybe best addressed by the group of folks listed above. Feel free to comment back on the mailing list or to send me emails to my personal account. There will also be an ASP.NET application for sending feedback -- a button near the top of the page -- that ends up as an email to my mail box. http://www.mfconsulting.com/product/prj2make-sharp/vsprj2make_Proposal.html Very nice. I especially like the Import/Export to MonoDevelop project, and the Import/Export from VS.NET that MD will get. These are very important features, that we will love to have. :) Also, the 'Test in mono' target sounds absolutely wonderful, especially for people looking to migrate some software over. If, for some of this to work, you need MD to handle loose references if given, we can work something out. --Todd Best regards for all. Paco ___ Mono-list maillist - [EMAIL PROTECTED] http://lists.ximian.com/mailman/listinfo/mono-list ___ Mono-list maillist - [EMAIL PROTECTED] http://lists.ximian.com/mailman/listinfo/mono-list
Re: [Mono-list] Visual Studio Add-in Design Objectives Discussion
I realise it's the entire point here, but I'd much rather have some simple shell extensions for the right-click menu. To use it in VS.NET I would want it seamless... ie, run automatically every time I save. Test in Mono, however, looks like a very nice tool to put into VS.NET. Anything that makes things easier for companies to care about cross-platformness is okay in my book. But that's just me, and I know how varied opinions can be about coding environments :) On Sun, 27 Jun 2004 18:31:44 -0500, Francisco T. Martinez [EMAIL PROTECTED] wrote: Greetings: I have completed a document that presents a clickable screen shot of the prototype of the prj2make-sharp Visual Studio Add-in. In this document I go over what my initial release will try to accomplish. There are some issues that are still not resolved on the installation and usage of Mono and GTK# under Win32. I am asking for community leaders and some of our outstanding contributors the likes of Mike Kestner, Miguel de Icaza, Erik Dasque, Todd Berman, Daniel Morgan, Gonzalo Paniagua, Jonathan Pryor, John Luke, Urs Muff and others to take a look at this document and to please provide feedback if pertinent. I certainly don't want to make this an elitist poll or query, but there are a few issues that maybe best addressed by the group of folks listed above. Feel free to comment back on the mailing list or to send me emails to my personal account. There will also be an ASP.NET application for sending feedback -- a button near the top of the page -- that ends up as an email to my mail box. http://www.mfconsulting.com/product/prj2make-sharp/vsprj2make_Proposal.html Best regards for all. Paco ___ Mono-list maillist - [EMAIL PROTECTED] http://lists.ximian.com/mailman/listinfo/mono-list ___ Mono-list maillist - [EMAIL PROTECTED] http://lists.ximian.com/mailman/listinfo/mono-list
Re: [Mono-list] gtk-sharp CVS build failing
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Gert Kello wrote: | I'm getting this same error on both FC2 and Debian Unstable. mono and | gtk-sharp source was gotten from CVS. | | | | I'm getting the same error on NetBSD with mono 0.97 and Gtk# 0.99. | | | Same here on Debian unstable. Also noticed that building libgdiplus | gives many errors like | | ../libtool: line 3975: test: : integer expression expected | | No idea whether they are related or not... | Same here when compiling Monodevelop. When running gapi-codegen. Regards, Francisco Figueiredo Jr. -BEGIN PGP SIGNATURE- Version: GnuPG v1.2.4 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org iQEVAwUBQN+Am/7iFmsNzeXfAQKSqggAhpWpiOZpm1Kp/LN8N+4zHdHO4jzDL4dD 6BluWPjPIusctYw9XDhkas41mdHNEnXG5wvVy8vO5Hu9tA+7ZtBS7H5xr1PKjGLT Ydm44gBCwWes4HkIEBN6VXitUIz0FJ45o/kq04B77dVrAFDlXY3JU7/nLE1/7SWq Wpevuv6PXyBoI7SryNhygFXKZf7ntOglEpiyI6GSxD+6j1yLYCr0J9FS6RL/Rtjb e4TxZZzsQHY27kdSJev6XaD589fNguOAVUcuOJetaJr9jrfuSvgSW7eXRSYn8ebt /HW+y7LzwxWTpkL3LmUkSZXwG9XUklHyPhOvjKWaOvUvsRxkUhRhkA== =dMOp -END PGP SIGNATURE- ___ Mono-list maillist - [EMAIL PROTECTED] http://lists.ximian.com/mailman/listinfo/mono-list
Re: [Mono-list] gtk# app installer
Well, do you need Mono there, on Windows ? You can just rely on .NET. As for GTK/GTK#, we have an installer coming very soon for Windows. Erik On Jun 27, 2004, at 2:34 PM, Tomasz Soroka wrote: Hi! I did app in gtk# and now I would write installer for windows. I would like have all needed things in one installer. - mono - gtk# libs - gtk+ libs It should installs all in one place, and should be very easy - user shouldn't know what technology was used. Can You give me any advices how to do that? best Tomek ___ Mono-list maillist - [EMAIL PROTECTED] http://lists.ximian.com/mailman/listinfo/mono-list ___ Mono-list maillist - [EMAIL PROTECTED] http://lists.ximian.com/mailman/listinfo/mono-list
Re: [Mono-list] Casting and Plugin Issue
Hi! I don't have any other idea, but I thought that maybe instead of doing: snip my_method = t.GetMethod(MGetPosts); object retVal = my_method.Invoke(activator, BindingFlags.Instance | BindingFlags.NonPublic | BindingFlags.InvokeMethod, null, new Object[]{3, user}, null); /snip You could do: IPluging p = (IPlugin)t; object retVal = p.MGetPosts(3, user); Sounds great, I tried what you said with two assemblies: one is the Structs.dll (*Struct.cs) and the other Plugin.dll (Plugin.cs and the interface IPlugin.cs), then I compiled MyApp with mcs MyApp.cs -r Structs.dll And then tried to cast it, and it fails: Test7.cs(20) error CS0246: Cannot find type `IPlugin' Also I did a Console.WriteLine to 't' (Type) and prints MBloggy.Plugins.IPlugin. Seems that I can't cast an interface, or what I'm doing wrong?. Assembly a; Type t; MethodInfo my_method; a = Assembly.LoadFrom(BloggerPlugin.dll); t = a.GetType(MBloggy.Plugins.IPlugin); Console.WriteLine(t); As I said, I'm testing what you suggested, but with Reflections the plugins are working great! Thanks Pablo -- Pablo Fischer Sandoval (pablo [arroba/at] pablo.com.mx) Fingerprint: 5973 0F10 543F 54AE 1E41 EC81 0840 A10A 74A4 E5C0 http://www.pablo.com.mx http://www.debianmexico.org signature.asc Description: Esta parte del mensaje =?ISO-8859-1?Q?est=E1?= firmada digitalmente
Re: [Mono-list] gtk-sharp CVS build failing
I have followed the advice on adding the --optimize=loop option when compiling and it worked for me. This option will be required for building gtk-sharp and gecko-sharp. While at it, there were other issues compiling gtkmozembed-sharp. In order to fix those, a patch to MozWindow.custom will be required in order to add read- only Location property and Title property, pointing to accessor methods GetLocation() and GetTitle() respectively in Gecko.MozWindow class. I can make a patch and send to the list, if needed. I experienced this on MDK 10.0 with a set of RC packages as listed on the download page while compiling from source. I hope this is helpful to someone. Regards, Mark. Quoting Francisco Figueiredo Jr. [EMAIL PROTECTED]: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Gert Kello wrote: | I'm getting this same error on both FC2 and Debian Unstable. mono and | gtk-sharp source was gotten from CVS. | | | | I'm getting the same error on NetBSD with mono 0.97 and Gtk# 0.99. | | | Same here on Debian unstable. Also noticed that building libgdiplus | gives many errors like | | ../libtool: line 3975: test: : integer expression expected | | No idea whether they are related or not... | Same here when compiling Monodevelop. When running gapi-codegen. Regards, Francisco Figueiredo Jr. -BEGIN PGP SIGNATURE- Version: GnuPG v1.2.4 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org iQEVAwUBQN+Am/7iFmsNzeXfAQKSqggAhpWpiOZpm1Kp/LN8N+4zHdHO4jzDL4dD 6BluWPjPIusctYw9XDhkas41mdHNEnXG5wvVy8vO5Hu9tA+7ZtBS7H5xr1PKjGLT Ydm44gBCwWes4HkIEBN6VXitUIz0FJ45o/kq04B77dVrAFDlXY3JU7/nLE1/7SWq Wpevuv6PXyBoI7SryNhygFXKZf7ntOglEpiyI6GSxD+6j1yLYCr0J9FS6RL/Rtjb e4TxZZzsQHY27kdSJev6XaD589fNguOAVUcuOJetaJr9jrfuSvgSW7eXRSYn8ebt /HW+y7LzwxWTpkL3LmUkSZXwG9XUklHyPhOvjKWaOvUvsRxkUhRhkA== =dMOp -END PGP SIGNATURE- ___ Mono-list maillist - [EMAIL PROTECTED] http://lists.ximian.com/mailman/listinfo/mono-list ___ Mono-list maillist - [EMAIL PROTECTED] http://lists.ximian.com/mailman/listinfo/mono-list
Re: [Mono-list] Casting and Plugin Issue
I think that you need to put IPlugin in the shared assembly (that the main program and plugins both references). On Sunday 27 June 2004 9:19 pm, Pablo Fischer wrote: Hi! I don't have any other idea, but I thought that maybe instead of doing: snip my_method = t.GetMethod(MGetPosts); object retVal = my_method.Invoke(activator, BindingFlags.Instance | BindingFlags.NonPublic | BindingFlags.InvokeMethod, null, new Object[]{3, user}, null); /snip You could do: IPluging p = (IPlugin)t; object retVal = p.MGetPosts(3, user); Sounds great, I tried what you said with two assemblies: one is the Structs.dll (*Struct.cs) and the other Plugin.dll (Plugin.cs and the interface IPlugin.cs), then I compiled MyApp with mcs MyApp.cs -r Structs.dll And then tried to cast it, and it fails: Test7.cs(20) error CS0246: Cannot find type `IPlugin' Also I did a Console.WriteLine to 't' (Type) and prints MBloggy.Plugins.IPlugin. Seems that I can't cast an interface, or what I'm doing wrong?. Assembly a; Type t; MethodInfo my_method; a = Assembly.LoadFrom(BloggerPlugin.dll); t = a.GetType(MBloggy.Plugins.IPlugin); Console.WriteLine(t); As I said, I'm testing what you suggested, but with Reflections the plugins are working great! Thanks Pablo ___ Mono-list maillist - [EMAIL PROTECTED] http://lists.ximian.com/mailman/listinfo/mono-list
Re: [Mono-list] Casting and Plugin Issue
hi pablo, i am no expert, but i think you need to rerference the assembly containing which should perhaps not be in the same assembly as said plugin itself. --chris On Sun, 27 Jun 2004, Pablo Fischer wrote: Hi! I don't have any other idea, but I thought that maybe instead of doing: snip my_method = t.GetMethod(MGetPosts); object retVal = my_method.Invoke(activator, BindingFlags.Instance | BindingFlags.NonPublic | BindingFlags.InvokeMethod, null, new Object[]{3, user}, null); /snip You could do: IPluging p = (IPlugin)t; object retVal = p.MGetPosts(3, user); Sounds great, I tried what you said with two assemblies: one is the Structs.dll (*Struct.cs) and the other Plugin.dll (Plugin.cs and the interface IPlugin.cs), then I compiled MyApp with mcs MyApp.cs -r Structs.dll And then tried to cast it, and it fails: Test7.cs(20) error CS0246: Cannot find type `IPlugin' Also I did a Console.WriteLine to 't' (Type) and prints MBloggy.Plugins.IPlugin. Seems that I can't cast an interface, or what I'm doing wrong?. Assembly a; Type t; MethodInfo my_method; a = Assembly.LoadFrom(BloggerPlugin.dll); t = a.GetType(MBloggy.Plugins.IPlugin); Console.WriteLine(t); As I said, I'm testing what you suggested, but with Reflections the plugins are working great! Thanks Pablo -- Pablo Fischer Sandoval (pablo [arroba/at] pablo.com.mx) Fingerprint: 5973 0F10 543F 54AE 1E41 EC81 0840 A10A 74A4 E5C0 http://www.pablo.com.mx http://www.debianmexico.org ___ Mono-list maillist - [EMAIL PROTECTED] http://lists.ximian.com/mailman/listinfo/mono-list
Re: [Mono-list] xsp more than one app failure
i got a copy of the bug changes via cc - looks good. i had mailed gonzalo about this lasat tuesday, but not heard back and figured it was just me having the prob... i added anohther comment to the bug too. --chris x On Sun, 27 Jun 2004, Tomasz Soroka wrote: I've reopened this bug: look at: http://bugzilla.ximian.com/show_bug.cgi?id=55978 for comment and test cases best Tomek W liście z nie, 27-06-2004, godz. 13:17, Tomasz Soroka pisze: So I will add it to bugzilla, because it seems to be still a problem. regards Tomek W liście z nie, 27-06-2004, godz. 10:59, Chris Turchin pisze: hi, i am experiencing this as well with mod_mono - i had submimtted it to bugzilla a while back and it was working again but since thursdsay or so i have seen regression (usinig anon cvs). http://bugzilla.ximian.com/show_bug.cgi?id=55978 in my report, i thought it had more to do with a specific control, but now it appears indeed to have more to do with multiple webapps. regards, --chris ps: stack trace: Server error in '/blogx' application Description: Error processing request. Error Message: HTTP 500. Stack Trace: System.NullReferenceException: Object reference not set to an instance of an object in 0xf System.Int32:FindSign (int,string,System.Globalization.NumberFormatInfo,bool,bool) in 0x00427 System.Int32:Parse (string,System.Globalization.NumberStyles,System.IFormatProvider) in 0x00013 System.Int32:Parse (string,System.IFormatProvider) in 0x00019 System.Convert:ToInt32 (string,System.IFormatProvider) in 0xe System.String:System.IConvertible.ToInt32 (System.IFormatProvider) in 0x00473 System.Convert:ToType (object,System.Type,System.IFormatProvider) in 0x00069 System.Convert:ChangeType (object,System.Type) in 0x0020d System.Web.Compilation.TemplateControlCompiler:GetExpressionFromString (System.Type,string) in 0x000e9 System.Web.Compilation.TemplateControlCompiler:AddCodeForPropertyOrField (System.Web.UI.ControlBuilder,System.Type,string,string,bool) in 0x001e3 System.Web.Compilation.TemplateControlCompiler:ProcessPropertiesAndFields (System.Web.UI.ControlBuilder,System.Reflection.MemberInfo,string,string) in 0x003e0 System.Web.Compilation.TemplateControlCompiler:CreateAssignStatementsFromAttributes (System.Web.UI.ControlBuilder) in 0x0014b System.Web.Compilation.TemplateControlCompiler:CreateControlTree (System.Web.UI.ControlBuilder,bool,bool) in 0x00494 System.Web.Compilation.TemplateControlCompiler:CreateControlTree (System.Web.UI.ControlBuilder,bool,bool) in 0x00494 System.Web.Compilation.TemplateControlCompiler:CreateControlTree (System.Web.UI.ControlBuilder,bool,bool) in 0x00494 System.Web.Compilation.TemplateControlCompiler:CreateControlTree (System.Web.UI.ControlBuilder,bool,bool) in 0x00050 System.Web.Compilation.TemplateControlCompiler:CreateMethods () in 0xa System.Web.Compilation.PageCompiler:CreateMethods () in 0x00148 System.Web.Compilation.BaseCompiler:GetCompiledType () in 0x00251 System.Web.Compilation.AspGenerator:GetCompiledType () in 0x00036 System.Web.UI.PageParser:CompileIntoType () in 0x00018 System.Web.UI.TemplateControlParser:GetCompiledInstance () in 0x00050 System.Web.UI.PageParser:GetCompiledPageInstance (string,string,System.Web.HttpContext) in 0x00011 System.Web.UI.PageHandlerFactory:GetHandler (System.Web.HttpContext,string,string,string) in 0x00337 System.Web.HttpApplication:CreateHttpHandler (System.Web.HttpContext,string,string,string) in 0x0011f CreateHandlerState:Execute () in 0x00084 StateMachine:ExecuteState (System.Web.HttpApplication/IStateHandler,bool) On Sun, 27 Jun 2004, Tomasz Soroka wrote: I have problem with xsp since beta 3 it's also in rc1, so look at this: All apps work properly, when I run them as standalone - for example: mono /usr/bin/xsp.exe --root . --applications /www:possibleWWW Problem is when I try run more than one app with xsp mono /usr/bin/xsp.exe --root . --applications /www:possibleWWW,/test:t1/ first app is my homepage and second is a xsp testing pages - from xsp installation. My homepage is written with using vs.net and compiled with mono.It uses firebird .net assembly compiled also with mono. when I first call /test 1 in browser http://localhost:8080/test it load properly next when i try call /www http://localhost:8080/www i get stacktrace (this app standaolne works perfectly) Description: Error processing request. Error Message: HTTP 500. Stack Trace: System.NullReferenceException: Object reference not set to an instance of an object in 0xf System.Int32:FindSign (int,string,System.Globalization.NumberFormatInfo,bool,bool) in 0x00427
Re: [Mono-list] Casting and Plugin Issue
Oh yes, what an idiot, I forgot that. Thanks! Pablo El dom, 27-06-2004 a las 22:02, Chris Turchin escribió: hi pablo, i am no expert, but i think you need to rerference the assembly containing which should perhaps not be in the same assembly as said plugin itself. --chris On Sun, 27 Jun 2004, Pablo Fischer wrote: Hi! I don't have any other idea, but I thought that maybe instead of doing: snip my_method = t.GetMethod(MGetPosts); object retVal = my_method.Invoke(activator, BindingFlags.Instance | BindingFlags.NonPublic | BindingFlags.InvokeMethod, null, new Object[]{3, user}, null); /snip You could do: IPluging p = (IPlugin)t; object retVal = p.MGetPosts(3, user); Sounds great, I tried what you said with two assemblies: one is the Structs.dll (*Struct.cs) and the other Plugin.dll (Plugin.cs and the interface IPlugin.cs), then I compiled MyApp with mcs MyApp.cs -r Structs.dll And then tried to cast it, and it fails: Test7.cs(20) error CS0246: Cannot find type `IPlugin' Also I did a Console.WriteLine to 't' (Type) and prints MBloggy.Plugins.IPlugin. Seems that I can't cast an interface, or what I'm doing wrong?. Assembly a; Type t; MethodInfo my_method; a = Assembly.LoadFrom(BloggerPlugin.dll); t = a.GetType(MBloggy.Plugins.IPlugin); Console.WriteLine(t); As I said, I'm testing what you suggested, but with Reflections the plugins are working great! Thanks Pablo -- Pablo Fischer Sandoval (pablo [arroba/at] pablo.com.mx) Fingerprint: 5973 0F10 543F 54AE 1E41 EC81 0840 A10A 74A4 E5C0 http://www.pablo.com.mx http://www.debianmexico.org ___ Mono-list maillist - [EMAIL PROTECTED] http://lists.ximian.com/mailman/listinfo/mono-list -- Pablo Fischer Sandoval (pablo [arroba/at] pablo.com.mx) Fingerprint: 5973 0F10 543F 54AE 1E41 EC81 0840 A10A 74A4 E5C0 http://www.pablo.com.mx http://www.debianmexico.org signature.asc Description: Esta parte del mensaje =?ISO-8859-1?Q?est=E1?= firmada digitalmente
Re: [Mono-list] Casting and Plugin Issue
El lun, 28-06-2004 a las 00:02, Marcus escribió: I think that you need to put IPlugin in the shared assembly (that the main program and plugins both references). Yes, I agree. On Sunday 27 June 2004 9:19 pm, Pablo Fischer wrote: Hi! I don't have any other idea, but I thought that maybe instead of doing: snip my_method = t.GetMethod(MGetPosts); object retVal = my_method.Invoke(activator, BindingFlags.Instance | BindingFlags.NonPublic | BindingFlags.InvokeMethod, null, new Object[]{3, user}, null); /snip You could do: IPluging p = (IPlugin)t; object retVal = p.MGetPosts(3, user); Sounds great, I tried what you said with two assemblies: one is the Structs.dll (*Struct.cs) and the other Plugin.dll (Plugin.cs and the interface IPlugin.cs), then I compiled MyApp with mcs MyApp.cs -r Structs.dll And then tried to cast it, and it fails: Test7.cs(20) error CS0246: Cannot find type `IPlugin' Also I did a Console.WriteLine to 't' (Type) and prints MBloggy.Plugins.IPlugin. Seems that I can't cast an interface, or what I'm doing wrong?. Assembly a; Type t; MethodInfo my_method; a = Assembly.LoadFrom(BloggerPlugin.dll); t = a.GetType(MBloggy.Plugins.IPlugin); Console.WriteLine(t); As I said, I'm testing what you suggested, but with Reflections the plugins are working great! My wrong. I thought that t was an object instance. Thanks Pablo ___ Mono-list maillist - [EMAIL PROTECTED] http://lists.ximian.com/mailman/listinfo/mono-list -- Rodolfo Campero http://expertcoder.sourceforge.net/ ___ Mono-list maillist - [EMAIL PROTECTED] http://lists.ximian.com/mailman/listinfo/mono-list
Re: [Mono-list] Casting and Plugin Issue
Yes sorry. However, 't' is a BloggerPlugin that is inherited from an Interface (IPlugin), how can I cast it and use it as an Object, like this: IPluging p = (IPlugin)t; object retVal = p.MGetPosts(3, user); Can I cast an object that is inherited so the casted object will be the 'father' object?. Like this: class Foo { Foo() {} public void Read() { //Something } } class Bar : Foo { Bar() {} } Bar b = (Bar)f; I tried and it fails: Unhandled Exception: System.InvalidCastException: Cannot cast from source type to destination type. in 0x00080 PluginLoader:Main (string[]) Thanks! Pablo -- Pablo Fischer Sandoval (pablo [arroba/at] pablo.com.mx) Fingerprint: 5973 0F10 543F 54AE 1E41 EC81 0840 A10A 74A4 E5C0 http://www.pablo.com.mx http://www.debianmexico.org signature.asc Description: Esta parte del mensaje =?ISO-8859-1?Q?est=E1?= firmada digitalmente
Re: [Mono-list] Casting and Plugin Issue
Heh, no problem, Gracias! Pablo El dom, 27-06-2004 a las 22:23, Rodolfo Campero escribió: El lun, 28-06-2004 a las 00:02, Marcus escribió: I think that you need to put IPlugin in the shared assembly (that the main program and plugins both references). Yes, I agree. On Sunday 27 June 2004 9:19 pm, Pablo Fischer wrote: Hi! I don't have any other idea, but I thought that maybe instead of doing: snip my_method = t.GetMethod(MGetPosts); object retVal = my_method.Invoke(activator, BindingFlags.Instance | BindingFlags.NonPublic | BindingFlags.InvokeMethod, null, new Object[]{3, user}, null); /snip You could do: IPluging p = (IPlugin)t; object retVal = p.MGetPosts(3, user); Sounds great, I tried what you said with two assemblies: one is the Structs.dll (*Struct.cs) and the other Plugin.dll (Plugin.cs and the interface IPlugin.cs), then I compiled MyApp with mcs MyApp.cs -r Structs.dll And then tried to cast it, and it fails: Test7.cs(20) error CS0246: Cannot find type `IPlugin' Also I did a Console.WriteLine to 't' (Type) and prints MBloggy.Plugins.IPlugin. Seems that I can't cast an interface, or what I'm doing wrong?. Assembly a; Type t; MethodInfo my_method; a = Assembly.LoadFrom(BloggerPlugin.dll); t = a.GetType(MBloggy.Plugins.IPlugin); Console.WriteLine(t); As I said, I'm testing what you suggested, but with Reflections the plugins are working great! My wrong. I thought that t was an object instance. Thanks Pablo ___ Mono-list maillist - [EMAIL PROTECTED] http://lists.ximian.com/mailman/listinfo/mono-list -- Pablo Fischer Sandoval (pablo [arroba/at] pablo.com.mx) Fingerprint: 5973 0F10 543F 54AE 1E41 EC81 0840 A10A 74A4 E5C0 http://www.pablo.com.mx http://www.debianmexico.org signature.asc Description: Esta parte del mensaje =?ISO-8859-1?Q?est=E1?= firmada digitalmente