Re: [Mono-list] Re: C# plugin for eclipse
Gregory Bowyer wrote: Erik Dasque wrote: Well, I think that developers are unlikely to drop the development tool they like to use another one even if it's arguably better. MonoDevelop is shaping up to be a great tool and we like it very much. However, we have to make sure that we look beyond MD and provide support to other IDEs and that includes Eclipse. Ok your points are valid and I was not thinking through the human issues in development. I don't know whether we want to limit intellisense to only working if Eclipse is running inside IKVM, though. A bridge to the CLR from a generic JVM using only JNI but providing the same capabilities as IKVM, compatibly, would be the holy grail ;) Can java programs running inside the IKVM utilise .net objects inside the CLR (just like VB.net programs talk to C# code and such forth) However you could run a process (read mono application) that the C# plugin would communicate with and that would tell it what completions are. This application could be built using some of the engine work in MD (a GUI less MD engine). If this is the case then might it be an idea to seperate out the backend of mono-develop (and in part sharp-develop) and then write front-ends to this code, granting us the ability to use the backend stuff with a wide variety of platforms and development tools (ie a GTK# front-end, a windows frontend , links to emacs / vim eclipse etc), with some discussion with the sharp-develop team we could all work against a common backend reducing the amount of work involved for all ?!? . Unfortunately this sounds like a lot better of an idea than it really is. There are subtle but pervasive differences in the platform itself. We have had to extend a lot of non-gui code to meet the requirements of mono, gnome, and in general the 'open source' way of writing code. An abstract 'IDE backend' is just not feasible on any realistic level. And even if you could somehow unify everything into one framework, there will still exist people that have issues with one piece or another, and will want to write their own stuff. As far as not having to write code over, all of the code in SharpDevelop, and most of the code in MonoDevelop is licensed under the GPL, so reuse via copy is a very realizable goal. --Todd ___ Mono-list maillist - [EMAIL PROTECTED] http://lists.ximian.com/mailman/listinfo/mono-list
[Mono-list] mono installation
Hello, I have installed the following: platform - whitebox linux mono 0.31 xsp 0.12 mod_mono 0.10 all installed from source. I am receiving the following error when viewing index.aspx and other errors with other aspx files, any idea why? Here are some ASP.NET examples: <% DirectoryInfo dir = new DirectoryInfo (Path.GetDirectoryName (Request.PhysicalPath)); FileInfo[] files = dir.GetFiles (); StringBuilder sb = new StringBuilder (); Hashtable styles = new Hashtable (); styles [".aspx"] = "background: #ff"; styles [".ashx"] = "background: #00"; styles [".asmx"] = "background: #00"; for (int i=0; i < files.Length; i++) { string fileName = Path.GetFileName(files[i].FullName); string extension = Path.GetExtension (files[i].FullName); if (styles.Contains (extension)) { sb.AppendFormat (" * {0} \n", fileName, styles [extension]); } } FileList.Text = sb.ToString (); %> kind regards, -- Geoff Rainey, UNIX systems consultant, Datacom Systems LTD DDI 308 4345 Mob 0274 856 892 ___ Mono-list maillist - [EMAIL PROTECTED] http://lists.ximian.com/mailman/listinfo/mono-list
Re: [Mono-list] mono installation
On Mon, 2004-06-21 at 10:08, geoff rainey wrote: > Hello, > > I have installed the following: > > platform - whitebox linux > mono 0.31 > xsp 0.12 > mod_mono 0.10 > > all installed from source. I am receiving the following error when > viewing index.aspx and other errors with other aspx files, any idea why? > > That's not an error - that's the source of the .aspx file. This is down to your Apache configuration. Check out the INSTALL file in the mod_mono source. /J\ ___ Mono-list maillist - [EMAIL PROTECTED] http://lists.ximian.com/mailman/listinfo/mono-list
[Mono-list] Remoting betweem Mono and MS .NET
Hello all, Is remoting between Mono and MS .NET supposed to be possible? I tried different variants, seems line currently you cannot remote between these 2 platforms. -- Best regards, Yuri Leikind ___ Mono-list maillist - [EMAIL PROTECTED] http://lists.ximian.com/mailman/listinfo/mono-list
RE: [Mono-list] Remoting betweem Mono and MS .NET
I use remoting between Mono and MS.NET, and it works fine for me. What problems do you have? Robert -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Yuri Leikind Sent: Montag, 21. Juni 2004 16:03 To: [EMAIL PROTECTED] Subject: [Mono-list] Remoting betweem Mono and MS .NET Hello all, Is remoting between Mono and MS .NET supposed to be possible? I tried different variants, seems line currently you cannot remote between these 2 platforms. -- Best regards, Yuri Leikind ___ 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] mono_object_new
On 06/19/04 Joe Ante wrote: > I am trying to instantiate a new class from c code. > > I am using mono_object_new. It creates the class successfully and I can call > functions on it but the constructor is not called. > Do I have to call a separate function to call the constructor? How do I call > it? Default values of fields don¹t seem to get initialized as well when > using mono_object_new? mono_object_new () just allocates the memory. You need to call the ctor yourself using mono_runtime_invoke (), the fields will be initialized by the constructor code. The last few days I added new samples of the mono embedding API usage in cvs: have a look at mono/samples/embed/test-invoke.c. I have attached it to the mail, too: see the comments in the code. lupus -- - [EMAIL PROTECTED] debian/rules [EMAIL PROTECTED] Monkeys do it better #include #include #include #include #include #include /* * Simple mono embedding example. * We show how to create objects and invoke methods and set fields in them. * Compile with: * gcc -Wall -o test-invoke test-invoke.c `pkg-config --cflags --libs mono` -lm * mcs invoke.cs * Run with: * ./test-invoke invoke.exe */ typedef struct { MonoDomain *domain; const char *file; int argc; char **argv; } MainThreadArgs; static void access_valuetype_field (MonoObject *obj) { MonoClass *klass; MonoClassField *field; int val; klass = mono_object_get_class (obj); /* Now we'll change the value of the 'val' field (see invoke.cs) */ field = mono_class_get_field_from_name (klass, "val"); /* This time we also add a bit of error checking... */ if (!field) { fprintf (stderr, "Can't find field val in MyType\n"); exit (1); } /* Check that val is an int (if you're paranoid or if you need to * show how this API is used) */ if (mono_type_get_type (mono_field_get_type (field)) != MONO_TYPE_I4) { fprintf (stderr, "Field val is not a 32 bit integer\n"); exit (1); } /* Note we pass a pointer to the value */ mono_field_get_value (obj, field, &val); printf ("Value of field is: %d\n", val); val = 10; /* Note we pass a pointer to the value here as well */ mono_field_set_value (obj, field, &val); } static void access_reference_field (MonoObject *obj) { MonoClass *klass; MonoDomain *domain; MonoClassField *str; MonoString *strval; char *p; klass = mono_object_get_class (obj); domain = mono_object_get_domain (obj); /* Now we'll see that a reference type is handled slightly differently. * First, get the MonoClassField representing it. */ str = mono_class_get_field_from_name (klass, "str"); /* No change here, we always pass a pointer */ mono_field_get_value (obj, str, &strval); /* get the string in UTF-8 encoding to print it */ p = mono_string_to_utf8 (strval); printf ("Value of str is: %s\n", p); /* we need to free the result from mono_string_to_utf8 () */ g_free (p); /* string are immutable, so we need to create a different string */ strval = mono_string_new (domain, "hello from the embedding API"); /* Here is the slight difference: for reference types we pass * the pointer directly, instead of a pointer to the value. */ mono_field_set_value (obj, str, strval); } /* Demostrate how to call methods */ static void call_methods (MonoObject *obj) { MonoClass *klass; MonoDomain *domain; MonoMethod *method = NULL, *m = NULL, *ctor = NULL, *fail = NULL, *mvalues; MonoProperty *prop; MonoObject *result, *exception; MonoString *str; char *p; gpointer iter; gpointer args [2]; int val; klass = mono_object_get_class (obj); domain = mono_object_get_domain (obj); /* retrieve all the methods we need */ iter = NULL; while ((m = mono_class_get_methods (klass, &iter))) { if (strcmp (mono_method_get_name (m), "method") == 0) { method = m; } else if (strcmp (mono_method_get_name (m), "Fail") == 0) { fail = m; } else if (strcmp (mono_method_get_name (m), "Values") == 0) { mvalues = m; } else if (strcmp (mono_method_get_name (m), ".ctor") == 0) { /* Check it's the ctor that takes two args: * as you see a contrsuctor is a method like any other. */ MonoMethodSignature * sig = mono_method_signature (m); if (mono_signature_get_param_count (sig) == 2) { ctor = m; } } } /* Now we'll call method () on obj: since it takes no arguments * we can pass NULL as the third argument to mono_runtime_invoke (). * The method will print the updated value. */ mono_runtime_invoke (method, obj, NULL, NULL); /* mono_object_new () doesn't call any constructor: this means that * we'll have to invoke the constructor if needed ourselves. Note: * invoking a constructor is no different than calling any other method, * so we'll still call mono_runtime_invoke (). This also means that we * can invoke a constructor at any time, like now. * First, setup the array of
Re: [Mono-list] mod_mono demo configuration Question
On Sun, 2004-06-20 at 20:19, Sergey Moiseev wrote: > still no normal auto-restart production version. Because of that beta 3 > still not suitable for asp.net development in production. That stops > process of normal migration from php to asp.net. That's a pity. > The stopping and re-starting is a requirement of Apache, it would be the same for any change that you might make to the httpd.conf, I'm sure the apache developers would welcome a patch to re-read the configuration when it is changed. /J\ ___ Mono-list maillist - [EMAIL PROTECTED] http://lists.ximian.com/mailman/listinfo/mono-list
Re: [Mono-list] Remoting betweem Mono and MS .NET
On Mon, 21 Jun 2004 16:35:39 +0200 "RoBiK" <[EMAIL PROTECTED]> wrote: > I use remoting between Mono and MS.NET, and it works fine for me. What > problems do you have? > > Robert I run a remoting server on Linux, and try to use it from the Windows machine. Here is my code: common interface, build as a separate assembly == namespace ProofOfConcepts{ public interface ITest{ string SayHello(); } } == Client using System; using System.IO; using System.Runtime.Remoting; using System.Runtime.Remoting.Channels; using System.Runtime.Remoting.Channels.Http; namespace ProofOfConcepts{ class Client{ ITest ar; public Client(string host, int port, string endPoint){ HttpChannel channel = new HttpChannel(0); ChannelServices.RegisterChannel(channel); MarshalByRefObject obj = (MarshalByRefObject) RemotingServices.Connect( typeof(ProofOfConcepts.ITest), "http://"; + host + ":" + port + "/" + endPoint); ar = (ITest) obj; } public string SayHello(){ return ar.SayHello(); } public static void Main(string[] args){ Client client = new Client(args[0], 6, "MyEndPoint"); Console.WriteLine(client.SayHello()); } } } == Server using System; using System.IO; using System.Runtime.Remoting; using System.Runtime.Remoting.Channels; using System.Runtime.Remoting.Channels.Http; namespace ProofOfConcepts{ public class AssemblyCache : MarshalByRefObject, ITest{ public string SayHello(){ return "hello"; } } class RemotingServer{ public RemotingServer(object obj){ HttpChannel channel = new HttpChannel(6); ChannelServices.RegisterChannel(channel); MarshalByRefObject mobj = (MarshalByRefObject) obj; RemotingServices.Marshal(mobj, "MyEndPoint"); } void Listen(){ Console.WriteLine("Press Enter to exit..."); Console.ReadLine( ); } public static void Main(){ AssemblyCache ar = new AssemblyCache(); RemotingServer rServer = new RemotingServer(ar); rServer.Listen(); } } } == Here is what I get running the client: Unhandled Exception: System.Net.WebException: The underlying connectio n was closed: The request was canceled. Server stack trace: at System.Net.HttpWebRequest.CheckFinalStatus() at System.Net.HttpWebRequest.EndGetRequestStream(IAsyncResult async Result) at System.Net.HttpWebRequest.GetRequestStream() at System.Runtime.Remoting.Channels.Http.HttpClientTransportSink.Pr ocessAndSend(IMessage msg, ITransportHeaders headers, Stream inputStre am) at System.Runtime.Remoting.Channels.Http.HttpClientTransportSink.Pr ocessMessage(IMessage msg, ITransportHeaders requestHeaders, Stream re questStream, ITransportHeaders& responseHeaders, Stream& responseStrea m) at System.Runtime.Remoting.Channels.SoapClientFormatterSink.SyncPro cessMessage(IMessage msg) Exception rethrown at [0]: at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IM essage reqMsg, IMessage retMsg) at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageD ata& msgData, Int32 type) at ProofOfConcepts.ITest.SayHello() at ProofOfConcepts.Client.Main(String[] args) === My Mono version is 0.95, MS .NET version 1.1.4322 -- Best regards, Yuri Leikind ___ Mono-list maillist - [EMAIL PROTECTED] http://lists.ximian.com/mailman/listinfo/mono-list
[Mono-list] Resources and satellite assemblies
I am trying to extend Premake (http://premake.sf.net/) to handle ASP.NET projects with Mono. I am stuck on handling resources and the generation of satellite assemblies. In VS.NET, I can just drop a few resource files into my ASP.NET project, mark it as an "EmbeddedResource", and everything Just Works. What set of actions to do I have to do with mono in order to get the same effect? On a related note, I have also started adding MonoDevelop support to Premake, in case anyone is interested. Jason ___ Mono-list maillist - [EMAIL PROTECTED] http://lists.ximian.com/mailman/listinfo/mono-list
Re: [Mono-list] Embedding mono
Em Sex, 2004-06-18 às 06:08, Joe Ante escreveu: > Hi, > > We have been using python for scripting in our game engine before but we > want to switch to mono. > Just ouf of curiosity why are you doing that? If I read you correctly you're gonna replace python by c# (the de facto CLI language) as the scripting language of your game and btw have you considered boo (http://boo.sf.net)? > Our script files are currently not stored as individiual text files instead > they are serialized in one big file. Is it possible to pass mono a c string > for compiling instead of a file? > You'll have to find a way to pass that string to the selected language compiler, you might want to check this: http://boo.sf.net/wiki/HowToCompile Best regards, Rodrigo ___ Mono-list maillist - [EMAIL PROTECTED] http://lists.ximian.com/mailman/listinfo/mono-list
Re: [Mono-list] mono installation
Thankyou for your replies. The problem has been resolved following multiple reinstalls of varying versions etc. I believe what fixed the problem was during the install of mono, the INSTALL file says to install with a prefix of "/usr/local", though other INSTALL files such as mod_mono or other suggested the following - "Assuming everything is installed in /usr..." I thus attempted reinstall of mono with a prefix of /usr, and it is now working. What is the correct prefix for mono to be installed - /usr or /usr/local? Regards, Geoff. On Mon, 2004-06-21 at 23:19, Jonathan Stowe wrote: > On Mon, 2004-06-21 at 10:08, geoff rainey wrote: > > Hello, > > > > I have installed the following: > > > > platform - whitebox linux > > mono 0.31 > > xsp 0.12 > > mod_mono 0.10 > > > > all installed from source. I am receiving the following error when > > viewing index.aspx and other errors with other aspx files, any idea > why? > > > > > > That's not an error - that's the source of the .aspx file. This is > down > to your Apache configuration. Check out the INSTALL file in the > mod_mono source. > > /J\ -- Geoff Rainey, UNIX systems consultant, Datacom Systems LTD DDI 308 4345 Mob 0274 856 892 ___ Mono-list maillist - [EMAIL PROTECTED] http://lists.ximian.com/mailman/listinfo/mono-list
[Mono-list] XSP on Mono Beta3 on Windows XP Pro SP1
I keep getting an Error 500 when running XSP on Mono Beta 3 on Windows XP Pro. What am I doing wrong here? At first, I thought it was my temp, so I set it to something simple. E:\Mono-Beta3\share\doc\xsp\test>set TEMP=D:\TEMP E:\Mono-Beta3\share\doc\xsp\test>set TMP=D:\TEMP E:\Mono-Beta3\share\doc\xsp\test>mono E:\Mono-Beta3\bin\xsp.exe Adding applications '/:.'... Registering application: Host: any Port: any Virtual path: / Physical path: E:\Mono-Beta3\share\doc\xsp\test Listening on port: 8080 Listening on address: 0.0.0.0 Root directory: E:\Mono-Beta3\share\doc\xsp\test Hit Return to stop the server. The filename, directory name, or volume label syntax is incorrect. The filename, directory name, or volume label syntax is incorrect. This is the result: Server error in '/' application Description: Error processing request. Error Message: HTTP 500. Stack Trace: System.IO.FileNotFoundException: File 'D:\TEMP\18873.dll' not found. in (unmanaged) (wrapper managed-to-native) System.Reflection.Assembly:LoadFrom (string) in <0x4> (wrapper managed-to-native) System.Reflection.Assembly:LoadFrom (string) in <0x002fc> Mono.CSharp.CSharpCodeCompiler:CompileAssemblyFromFileBatch (System.CodeDom.Compiler.CompilerParameters,string[]) in <0x003b7> Mono.CSharp.CSharpCodeCompiler:CompileAssemblyFromDomBatch (System.CodeDom.Compiler.CompilerParameters,System.CodeDom.CodeCompileUn it[]) in <0x0004f> Mono.CSharp.CSharpCodeCompiler:CompileAssemblyFromDom (System.CodeDom.Compiler.CompilerParameters,System.CodeDom.CodeCompileUn it) in <0x00156> System.Web.Compilation.CachingCompiler:Compile (System.Web.Compilation.BaseCompiler) in <0x00338> System.Web.Compilation.BaseCompiler:GetCompiledType () in <0x0026a> System.Web.Compilation.AspGenerator:GetCompiledType () in <0x00068> System.Web.UI.ApplicationFileParser:GetCompiledApplicationType (string,System.Web.HttpContext) in <0x00033> System.Web.HttpApplicationFactory:CompileApp (System.Web.HttpContext) in <0x00036> System.Web.HttpApplicationFactory:InitializeFactory (System.Web.HttpContext) in <0x00070> System.Web.HttpApplicationFactory:GetInstance (System.Web.HttpContext) in <0x0011a> System.Web.HttpRuntime:InternalExecuteRequest (System.Web.HttpWorkerRequest) ___ Mono-list maillist - [EMAIL PROTECTED] http://lists.ximian.com/mailman/listinfo/mono-list
Re: [Mono-list] mono installation
On Tue, 2004-06-22 at 12:57, geoff rainey wrote: > What is the correct prefix for mono to be installed - /usr or > /usr/local? There's not really any correct answer; however, things are much, much better tested and therefore more likely to work when all the mono components are in the same prefix. > On Mon, 2004-06-21 at 23:19, Jonathan Stowe wrote: > > On Mon, 2004-06-21 at 10:08, geoff rainey wrote: > > > Hello, > > > > > > I have installed the following: > > > > > > platform - whitebox linux > > > mono 0.31 > > > xsp 0.12 > > > mod_mono 0.10 > > > > > > all installed from source. I am receiving the following error when > > > viewing index.aspx and other errors with other aspx files, any idea > > why? > > > > > > > > > > That's not an error - that's the source of the .aspx file. This is > > down > > to your Apache configuration. Check out the INSTALL file in the > > mod_mono source. > > > > /J\ -- Iain McCoy <[EMAIL PROTECTED]> ___ Mono-list maillist - [EMAIL PROTECTED] http://lists.ximian.com/mailman/listinfo/mono-list
[Mono-list] Embedding Mono .. problem with Console.WriteLine statement
Hi, I am able to invoke C# method from C and it work fine as long as the C# method does not have Console.WriteLine() statement. After introducing Console.Writeline() statement in C# function, the result of invoking it from C was the following: Unhandled Exception: System.TypeInitializationException: An exception was thrown by the type initializer for System.Console ---> System.NullReferenceException: A null value was found where an object instance was required in [0x0] (at /cvs/mcs/class/corlib/System.Globalization/CultureInfo.cs:1096) System.Globalization.CultureInfo:get_CurrentCulture () in [0x1] (at /cvs/mcs/class/corlib/System/String.cs:673) System.String:ToUpper () in [0x00016] (at /cvs/mcs/class/corlib/System/Console.cs:32) System.Console:.cctor () --- End of inner exception stack trace --- in (unmanaged) System.Console:WriteLine (string) in <0x00017> TestNamespace.test:foo (string) Can somebody provide a clue? test.cs Description: Binary data teste.c Description: Binary data