Re: [Mono-winforms-list] patch for enabling primitive XIM text input
Hi, Thanks for the details. Though I don't think I completely understand the second issue (XIM event order matter), I am persuaded. Your patch is in svn (along with my patch of course too). I'm also getting into libX11 code, so if you have pointers to relevant sources (probably in src/xlibi18n/* or modules/im/* ?) please give us them :) Atsushi Eno Doug Rintoul wrote: Atsushi Eno wrote: Hello, The first problem has to do with the tracking of the control, shift, and alt key. These keys will currently get stuck because if FosterParent filters the key release event, a key release event for these keys are never put on the hwnd Queue. For example, if you press CTRL-space to enable an IM, winforms still thinks the control key is still pressed, even after you release it. Using the left and right cursor keys to move around a input field will move a word at a time, rather than a letter at a time. Ah, good point! It should be fixed too. But I somewhat doubt if your change especially that KeyRelease event is always passed works fine. It could result in inconsistent key event processing (KeyPress could be filtered and KeyRelease always isn't) and such inconsistency trapped me couple of days. So, IMHO there should be some condition to determine whether to filter KeyRelease or not. Key filtering is totaling at the whim of the IM. If the the IM processes a key event it will tell the calling procedure the event is filtered. I am assuming you mean there should be a condition on whether we should process a key event in winforms even when the IM has filtered the event. If so, then you are correct. I think my patch currently works because few apps use key release events and so dual processing by both the IM and winforms is not an issue. However keypress events for mod could be a problem if the IM filters event. The keypress event would never be processed by winforms and thus the key state would never be registered. In this case we cannot do dual processing of all keypress events. So some condition needs to be determine as to when we pass the key press and key release events onto winform. Unfortunately, winforms currently relies on key press and key release events to track the modification key states. Perhaps it is enough to test if the event is a key press or a key release mod key event (alt, ctrl, shift, menu, etc) and then pass the event on to winforms for processing even if the IM filters the event. The only other alternative I can see is to redesign winforms so that it queries X for the current state of the modifier keys whenever it needs that information. The second issue has to do with the way that IME compose messages are handle. A bit of background is required here. I am one of the authors of KMFL (kmfl.sourceforge.net), which provides Tavaultesoft Keyman services to Linux. The way KMFL is designed is that KMFL can generate multiple compose messages in response to a single key stroke. The problem is that XIM does not use a FIFO to queue XIM compose messages, but a stack. So unless XIM compose events are processed immediately upon receipt, the recipient window will receive the XIM compose messages in the reverse order that they are generated. The fix is rather easy to implement. We just allow the application to process the keypress messages upon receipt rather than queuing a whole bunch and then returning. Note that the GTK XIM connector and the QT XIM interface work correctly with KMFL, so they implement a similar solution. I'm not sure what you meant here. Do you mean such event processing like below could happen? : - KeyPress for 'A' occurs, and then it is stored in X event queue ... well, stack ... as pending. - KeyPress for 'B' occurs, and then it is stored as pending. - XNextEvent() is called, and X returns KeyPress 'B' because it is not FIFO. This is sort of what happens. It has been awhile since I poked around the XIM code in X. I just went back to familiarized myself with the situation. The actual problem is with the XIM commit code in X11. Here is an example of what actually happens: 1. The user presses 7. The input method is to generate the string seven in response to this. The IM will actually generate each character as a separate compose event. I realize that in this case the IM could have generated one compose event containing the string seven, but this is not always the case. The way the kmfl engine is designed, it needs to be able to generate separate compose events in response to one keypress. 2. The IM calls the XIM commit callback to commit the first letter s 3. The XIM commit callback pushes the commit string on the IC commit info stack and then fabricates a KeyPress event with a keycode of 0 and pushes this event onto the event queue. Control is then transfered to winforms. 4. winforms receives the
Re: [Mono-winforms-list] patch for enabling primitive XIM text input
Hello, Doug Rintoul wrote: Atsushi Eno wrote: Thanks for the details. Though I don't think I completely understand the second issue (XIM event order matter), I am persuaded. Your patch is in svn (along with my patch of course too). Thanks for this. I am assuming that only the patch for the second problem is committed. Any thoughts on solving the tracking of the modification keys (control, alt, shift, etc)? Yes, what I applied was what you have provided (I believe): http://lists.ximian.com/pipermail/mono-patches/2008-March/113937.html For now I'm fighting against other preedit modes (preedit position and preedit callbacks), so let me think about it later. It seems that iiimx and/or atokx3 (Japanese commercial IM) has this kind of issue; it does not change keyboard's shift state, unlike scim(-anthy). I'm also getting into libX11 code, so if you have pointers to relevant sources (probably in src/xlibi18n/* or modules/im/* ?) please give us them :) These are the relevant sources. XIM is not an easy protocol to get your head around. I peppered the xorg code with printf statements to get a feel for the flow of processing.There is documentation at http://xorg.freedesktop.org/archive/X11R6.9.0/doc/PDF/. This is for version 6.9.0 but XIM has not changed much for version 7.3 Xorg rearranged the documentation for version 7 and so there are no PDFs readily available for the internals of 7.3. I have generated pdfs from the postscript file available with the source if your are interested. However you can download the PDFs for 6.9 have have virtually the same thing. The docs you would interested in are xim.pdf, XIMTransport.pdf and i18nFramework.pdf. There are other docs dealing XKB which might be useful but not specifically applicable to XIM. The docs are very low level. I have not really found a good overview of XIM on the net. http://xorg.freedesktop.org/archive/X11R6.9.0/doc/PDF/i18nFramework.pdf I've also generated xim.pdf from xim.ps ;-) Solaris IM implementation detail was also nice to read (it works on top of IIIMF and hence it does not always apply to my environment though) http://opensolaris.org/os/project/input-method/documents/SolIM_Impl.pdf When I solved the puzzle around preedit mode and XVaNestedList, I will have to come back to these docs. Probably I had better commit my ongoing changes to ask for review on what would go wrong. Atsushi Eno ___ Mono-winforms-list maillist - Mono-winforms-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-winforms-list
Re: [Mono-dev] Mono embedded
Stefan Fink wrote: hallo, i have make a small embedded example but i have a few problems. i want to call a embedded c-function like ...list_box(...) (show below cad.h cad.c). when i compile my test.cs the ListBox function is unknown. who can i to make known about this function??? You have to declare it as an internal call: using System; using System.Runtime.CompilerServices; class MonoEmbed { static void Main() { string[] arr = {1,2,3}; string ret = ListBox(Hallo,arr); } [MethodImpl (MethodImplOptions.InternalCall)] static extern string ListBox(string str, string[] arr); } Robert ___ Mono-devel-list mailing list Mono-devel-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-devel-list
[Mono-dev] New profiler is ready
Hello, the new logging profiler is now usable on Linux, and I'd like some feedback and bug reports. It is described here: http://www.mono-project.com/LoggingProfiler and in the mono.1 man page in svn. Open issues (for now): - The default name of the output file should contain the application name, and not just be profiler-log.prof. - The allocation profiler still attributes object creations to wrappers instead of the caller method. - I should check why the decoder is not properly installed and also change its name to something more usable. - The statistical profiler tries to get the names of unmanaged functions using dladdr, but if this fails, it has an oprofile like behavior: it saves the IP value and at *decoding* time examines the elf files (using nm) looking for the symbol name. This is a bit sophisticated (it looks at all the memory regions of the process using /proc/self/maps at run time so that the correct file is examined at decoding time), and works fairly well (better than dladdr). However, this is fragile: if the decoding time happens when some of the relevant elf files has changed, the info is lost and the data in the log file is useless (and there is no warning of this). I am moving code from the decoder to the profiler, so that the symbols are all looked up at runtime, but this code is not ready yet. - The heap analysis features technically work, but are not yet exposed to the user by the decoder program. That's it... have fun :-) Ciao, Massi ___ Mono-devel-list mailing list Mono-devel-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-devel-list
Re: [Mono-dev] [MonoDevelop] Soc 2008 idea: Universal graphical Framwork
Wow this would be great!! Would be possible to implement later winforms designer (someone worked on it, but i dont know why it disappeared) and qt4 designer?? :-)) Gfs Sharique uddin Ahmed Farooqui napsal(a): Hi, We need different types of graphical designers like, xml designer, class designer, xaml designer, moonlight designer, etc. I think we should have a base framework, which will provide basic features like canvas and few controls and Monodevelop addin api. So that one can easily add there desired designer in monodevelop (a PCB designer for example). What are ur views friends? signature.asc Description: OpenPGP digital signature ___ Mono-devel-list mailing list Mono-devel-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-devel-list
Re: [Mono-dev] [MonoDevelop] Soc 2008 idea: Universal graphical Framwork
On Mon, Mar 24, 2008 at 3:00 PM, Sharique uddin Ahmed Farooqui [EMAIL PROTECTED] wrote: Hi, We need different types of graphical designers like, xml designer, class designer, xaml designer, moonlight designer, etc. I think we should have a base framework, which will provide basic features like canvas and few controls and Monodevelop addin api. So that one can easily add there desired designer in monodevelop (a PCB designer for example). What are ur views friends? There is no realistic way to provide a unified framework for many of these things. However, flow-type designers (class visualiser, database designer, workflow designer etc) could certainly share a canvas, ideally based on Moonlight, and a student has already been discussing this with us. -- Michael Hutchinson http://mjhutchinson.com ___ Mono-devel-list mailing list Mono-devel-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-devel-list
Re: [Mono-dev] [MonoDevelop] Soc 2008 idea: Universal graphical Framwork
A user interface designer is not like a drawing tool. The controls you put in the design surface must look and behave exactly like the controls at run-time. They are not graphical representations of the run-time controls, they are the *real* controls running in a special design mode. To do what you propose you would need to replicate gtk#, winforms and any other widget library you want to support using the designer framework. Even if you do that (which would take several years) it wouldn't work for custom widgets which use custom rendering. MonoDevelop already provides a toolbox and a property grid which can be shared by all designers. There isn't much more you can share. Lluis. El dj 27 de 03 del 2008 a les 12:48 +0100, en/na Gryffus va escriure: Wow this would be great!! Would be possible to implement later winforms designer (someone worked on it, but i dont know why it disappeared) and qt4 designer?? :-)) Gfs Sharique uddin Ahmed Farooqui napsal(a): Hi, We need different types of graphical designers like, xml designer, class designer, xaml designer, moonlight designer, etc. I think we should have a base framework, which will provide basic features like canvas and few controls and Monodevelop addin api. So that one can easily add there desired designer in monodevelop (a PCB designer for example). What are ur views friends? ___ Monodevelop-list mailing list [EMAIL PROTECTED] http://lists.ximian.com/mailman/listinfo/monodevelop-list ___ Mono-devel-list mailing list Mono-devel-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-devel-list
Re: [Mono-dev] [MonoDevelop] Soc 2008 idea: Universal graphical Framwork
2008/3/27, Lluis Sanchez Gual [EMAIL PROTECTED]: A user interface designer is not like a drawing tool. The controls you put in the design surface must look and behave exactly like the controls at run-time. They are not graphical representations of the run-time controls, they are the *real* controls running in a special design mode. To do what you propose you would need to replicate gtk#, winforms and any other widget library you want to support using the designer framework. Even if you do that (which would take several years) it wouldn't work for custom widgets which use custom rendering. MonoDevelop already provides a toolbox and a property grid which can be shared by all designers. There isn't much more you can share. This share work with WinForms (.designer file) ? Lluis. El dj 27 de 03 del 2008 a les 12:48 +0100, en/na Gryffus va escriure: Wow this would be great!! Would be possible to implement later winforms designer (someone worked on it, but i dont know why it disappeared) and qt4 designer?? :-)) Gfs Sharique uddin Ahmed Farooqui napsal(a): Hi, We need different types of graphical designers like, xml designer, class designer, xaml designer, moonlight designer, etc. I think we should have a base framework, which will provide basic features like canvas and few controls and Monodevelop addin api. So that one can easily add there desired designer in monodevelop (a PCB designer for example). What are ur views friends? ___ Monodevelop-list mailing list [EMAIL PROTECTED] http://lists.ximian.com/mailman/listinfo/monodevelop-list ___ Monodevelop-list mailing list [EMAIL PROTECTED] http://lists.ximian.com/mailman/listinfo/monodevelop-list ___ Mono-devel-list mailing list Mono-devel-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-devel-list
Re: [Mono-dev] Mono 1.2.6.1 review (bugs and conclusion)
Thanks for the update Varadhan! On Mon, 2008-03-24 at 20:19 +0530, Veerapuram Varadhan wrote: On Sun, 2008-03-23 at 23:12 -0400, Miguel de Icaza wrote: https://bugzilla.novell.com/show_bug.cgi?id=357947 (System.Data) It seems like Varadhan has been looking at this. Varadhan? DataView part of the patch is already in SVN now. RB Tree implementation for DataTable is to be worked upon. We have a primitive RB Tree implementation that is known to work on simple cases. Will be working on it more after my current XSD work. Thanks, V. Varadhan ___ Mono-devel-list mailing list Mono-devel-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-devel-list
Re: [Mono-dev] [PATCH] Further improvements to toString performance
Hello Eyal, I have done a cursory review of this patch, and it looks good to go.Doing it now, will give it more exposure to people. On Tue, 2008-03-25 at 06:05 -0700, Eyal Alaluf wrote: Hi, Miguel. The attached patch contains further improvements to the perf or ToString of primitive types. The perf gain is due to two changes 1. An instance of NumberFormatter is placed as a member of the Thread class. This allows reuse of the character array within the NumberFormat class and to cache the lookup of the NumberFormatInfo from the current culture which turns out to be a costly operation. 2. The default ToString of integers has been specialized (because of its simplicity). The results of these improvements are: 10,000,000 * 12345.ToString():From 13.0 Secs to 6.3 Secs 10,000,000 * 12345.ToString(G): From 14.7 Secs to 8.4 Secs 10,000,000 * 0.12345.ToString(): From 27.9 Secs to 21.3 Secs The results were made on my (a bit outdated) PC but the same improvements were seen in newer types of machines. I have also added the copyright and license notice. Waiting for your approval, Eyal. ___ Mono-devel-list mailing list Mono-devel-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-devel-list
Re: [Mono-dev] Mono 1.2.6.1 review (bugs and conclusion)
On Thu, 2008-03-27 at 11:37 -0400, Miguel de Icaza wrote: Thanks for the update Varadhan! On Mon, 2008-03-24 at 20:19 +0530, Veerapuram Varadhan wrote: On Sun, 2008-03-23 at 23:12 -0400, Miguel de Icaza wrote: https://bugzilla.novell.com/show_bug.cgi?id=357947 (System.Data) It seems like Varadhan has been looking at this. Varadhan? DataView part of the patch is already in SVN now. RB Tree implementation for DataTable is to be worked upon. We have a primitive RB Tree implementation that is known to work on simple cases. Will be working on it more after my current XSD work. Thanks, V. Varadhan ___ Mono-devel-list mailing list Mono-devel-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-devel-list
Re: [Mono-dev] [MonoDevelop] Soc 2008 idea: Universal graphical Framwork
On Thu, Mar 27, 2008 at 6:13 PM, Michael Hutchinson [EMAIL PROTECTED] wrote: On Mon, Mar 24, 2008 at 3:00 PM, Sharique uddin Ahmed Farooqui [EMAIL PROTECTED] wrote: Hi, We need different types of graphical designers like, xml designer, class designer, xaml designer, moonlight designer, etc. I think we should have a base framework, which will provide basic features like canvas and few controls and Monodevelop addin api. So that one can easily add there desired designer in monodevelop (a PCB designer for example). What are ur views friends? There is no realistic way to provide a unified framework for many of these things. However, flow-type designers (class visualiser, database designer, workflow designer etc) could certainly share a canvas, ideally based on Moonlight, and a student has already been discussing this with us. That's great. I think this can be extended to PCB and graphics (xaml is similar to svg?), game object designers as well (leave this for companies). This will make mono more extensible, so more people will use it. -- Michael Hutchinson http://mjhutchinson.com -- Sharique uddin Ahmed Farooqui (C++/C# Developer, IT Consultant) http://safknw.blogspot.com/ ___ Mono-devel-list mailing list Mono-devel-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-devel-list
[Mono-dev] Drupal sharp
Hi, I have proposed an application for Drupal in mono. http://groups.drupal.org/node/10041 If my idea doesn't get shortlisted there, can I post it into mono's Soc idea list? -- Sharique uddin Ahmed Farooqui (C++/C# Developer, IT Consultant) http://safknw.blogspot.com/ ___ Mono-devel-list mailing list Mono-devel-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-devel-list
[Mono-dev] WCF and Mono
Hello folks, With Mono 2.0 approaching, it is time to start looking at new areas in which Mono will expand. Noam at Mainsoft has updated the web page for the WCF project in Mono with the information that they had put together at Mainsoft and some of the information that was available as a status report inside our olive module. If you are interested in WCF, please take a look at our WCF page for details on milestones, goals, tasks and ways in which you can contribute: http://www.mono-project.com/WCF Miguel ___ Mono-devel-list mailing list Mono-devel-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-devel-list
Re: [Mono-dev] [MonoDevelop] Soc 2008 idea: Universal graphical Framwork
Hello Sharique. Something like that is what I've been thinking with MonoHotDraw [1]. After talking with some people in the #monosoc channel, I came to the conclusion that the best way would be to port MonoHotDraw to run on the top of Moonlight (currently It runs over Gtk#/Cario). I'm planing to submit two proposals for GSoC. One is a Class Designer for MonoDevelop (actually, this one is already submmited, if you are a mentor, you could start making comments and suggestions). The other one is for make some improvements to Lunar Eclipse, the XAML editor. In both cases my plan is to build a reusable framework for writing graphical editors that use structured graphics. There are plenty of cool stuff that could be made with a framework such that: * A Class Designer for MonoDevelop. * A DataBase Graphical Desginer for MonoDevelop * A Dia replacement with all the cool features that Moonlight can offer. * An UML Editor (Actually, the MonoHotDraw project has been written as a part o the MonoUML project) * A Mind map editor. How could would be a mind map editor for tomboy. Or a moonlight collaborative mind map editor to be used inside a wiki engine. * Improvements to Lunar eclipse. [1] http://www.monouml.org/doku.php?id=monohotdraw 2008/3/24, Sharique uddin Ahmed Farooqui [EMAIL PROTECTED]: Hi, We need different types of graphical designers like, xml designer, class designer, xaml designer, moonlight designer, etc. I think we should have a base framework, which will provide basic features like canvas and few controls and Monodevelop addin api. So that one can easily add there desired designer in monodevelop (a PCB designer for example). What are ur views friends? -- Sharique uddin Ahmed Farooqui (C++/C# Developer, IT Consultant) http://safknw.blogspot.com/ ___ Monodevelop-list mailing list [EMAIL PROTECTED] http://lists.ximian.com/mailman/listinfo/monodevelop-list -- · Manuel Alejandro Cerón Estrada · [EMAIL PROTECTED] · http://ceronman.freaks-unidos.net ___ Mono-devel-list mailing list Mono-devel-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-devel-list
Re: [Mono-list] NauckIT PostgreSQL provider working with Mono?
Hello, i'm the maintainer of the ASP.NET PostgreSQL Provider. You'll find the latest sources and documentation on the project home page at: http://dev.nauck-it.de/aspsqlprovider/ There is also a ready to run example website: http://dev.nauck-it.de/aspsqlprovider/browser/example Currently only a binary for Npgsql 2.0 Beta 2 is available at: http://pgfoundry.org/frs/?group_id=1000140release_id=989 If you need a binary for Npgsql 1.0 let me know. I'm using the provider on Mono since Mono 1.2.4. Daniel Swaminathan Saikumar schrieb: Hello, I was about to start on Forms Authentication with Postgres in .NET on Mono. I found this message from Kevin: http://www.mail-archive.com/mono-list@lists.ximian.com/msg23395.html but didn't find any responses. I was wondering whether anyone got this working, and has any documentation that can help. Thanks ___ Mono-list maillist - Mono-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-list ___ Mono-list maillist - Mono-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-list
Re: [Mono-list] Mono 1.9: building problem with-jit=no with-interp=yes
[EMAIL PROTECTED] wrote: Hi. I configured mono building in this way ./configure --enable-shared=no --with-x=no --disable-dev-random --disable-shared-handles --with-tls=no --with-sigaltstack=no --with-jit=no --with-interp=yes When I try to build, I get errors for interp.c (missing headers inclusion, structure fields referenced but not defined anywhere...) Please, could someone check this? The interpreter is not supported anymore. Robert ___ Mono-list maillist - Mono-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-list
[Mono-list] New profiler is ready
Hello, the new logging profiler is now usable on Linux, and I'd like some feedback and bug reports. It is described here: http://www.mono-project.com/LoggingProfiler and in the mono.1 man page in svn. Open issues (for now): - The default name of the output file should contain the application name, and not just be profiler-log.prof. - The allocation profiler still attributes object creations to wrappers instead of the caller method. - I should check why the decoder is not properly installed and also change its name to something more usable. - The statistical profiler tries to get the names of unmanaged functions using dladdr, but if this fails, it has an oprofile like behavior: it saves the IP value and at *decoding* time examines the elf files (using nm) looking for the symbol name. This is a bit sophisticated (it looks at all the memory regions of the process using /proc/self/maps at run time so that the correct file is examined at decoding time), and works fairly well (better than dladdr). However, this is fragile: if the decoding time happens when some of the relevant elf files has changed, the info is lost and the data in the log file is useless (and there is no warning of this). I am moving code from the decoder to the profiler, so that the symbols are all looked up at runtime, but this code is not ready yet. - The heap analysis features technically work, but are not yet exposed to the user by the decoder program. That's it... have fun :-) Ciao, Massi ___ Mono-list maillist - Mono-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-list
[Mono-list] .NET Remoting and Hashtable
Hi, we work on a project of distributed system where we use the technology dotNET Remoting. But we have there a small issue. We have two types of nodes there, managers and storages. They both use the same method (the method is in dll file - manager and storage have the same copy of this file). The method is: public void UpdateLastSeen(Node n) { if (lastSeen.ContainsKey(n)) lastSeen[n] = DateTime.Now; else lastSeen.Add(n, DateTime.Now); } // Node n - is our own object // lastSeen is hashtable (key is our own object Node, value is DateTime) Problem: The both nodes - managers and also storage peridiocally call this method, while one of them works well, another one does somethig different with the same code. For example the topology is point-to-point, one manager, one storage. Storage updates active status of the manager well, but manager can't recognize that it has is connected stil the same node - the same storage. The result is that the manager does not overwrite the time of last seen of the node storage, but by timer click it adds allways a new entry into the hashtable. With the same code storage works great. No idea where the problem could be, maybe the copy of the object Node is not the same like in the object stored in the hashtable?? Hope that someone will understand what we tried to explain;) and help. Thanks a lot Regards, michal kohut -- View this message in context: http://www.nabble.com/.NET-Remoting-and-Hashtable-tp16324136p16324136.html Sent from the Mono - General mailing list archive at Nabble.com. ___ Mono-list maillist - Mono-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-list
Re: [Mono-list] Having trouble with winforms
Hi Colin, I installed using yum and opensuse repo for fedora 8. I dont think that is a path problem, but how do I fix it? How can i correct this? Thanks Gustavo. Colin Critch escreveu: Hi Gustavo, How did you install mono? It may be better to use yum to install the latest mono or investigate what package is missing or is there a path problem with libX11.so? Cheers Colin Gustavo Ribeiro De Bonis wrote: Hi everybody, I'm trying to compile and run a simple winform program just to practice and i receive this message when i do it. Unhandled Exception: System.TypeInitializationException: An exception was thrown by the type initializer for System.Windows.Forms.WindowsFormsSynchronizationContext --- System.TypeInitializationException: An exception was thrown by the type initializer for System.Windows.Forms.XplatUI --- System.DllNotFoundException: libX11.so i have X Window System installed, i also have gnome (v2.20.3) running on Fedora 8 (2.6.23.15-137.fc8) and finally mono 1.9. How do i fix this? Thanks, Gustavo. ___ Mono-list maillist - Mono-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-list ___ Mono-list maillist - Mono-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-list
Re: [Mono-list] .NET Remoting and Hashtable
Hi, nemesis35 wrote: No idea where the problem could be, maybe the copy of the object Node is not the same like in the object stored in the hashtable?? It is definitely not the same object, so you have to implement Node.GetHashCode() to establish a consistent identity that does not rely upon Object.GetHashCode. Note that if Node is a MarshalByRefObject, GetHashCode won't be called remotely. This means that overriding GetHashCode has no effect in other app domains than the creator domain. Robert ___ Mono-list maillist - Mono-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-list
Re: [Mono-list] pthreads in mono
On Thu, Mar 27, 2008 at 7:18 AM, Andreas Färber [EMAIL PROTECTED] wrote: You sure about that? Mono does use pthreads in some way, keeping it from running on BeOS. Is getting a pointer to the current thread in native land or using p/ invoke not an option? Andreas The whole point of those specific native functions is to run an asynchronous loop on the specified thread, so getting a pointer to the current pthread would not be useful. However, you may be able to get a pointer to some other Thread object's pthread, but I would not be too sure that this can be done from Mono directly. You could use: [DllImport(pthread)] private static extern pthread_t pthread_self(); However, you'd have to declare pthread_t somewhere, and this call would have to be executed from the other thread -- meaning you'd have to pass the return value over to the main thread and ... ugh. A WaitHandle would undoubtedly be needed, and for what? Writing a ThreadStart that infinitely loops over a call to gps_poll sounds like a lot less work, no? -- Chris Howie http://www.chrishowie.com http://en.wikipedia.org/wiki/User:Crazycomputers ___ Mono-list maillist - Mono-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-list
Re: [Mono-list] .NET Remoting and Hashtable
Hi! Does your Hashtable sit in a MarshalByRef class or a [Serializable] one? If the latter is the case then each connecting node works on its separate copy. Are you positive yor class is marshaled as a singleton rather than single-call? Other than that, only putting: lastSeen[n] = DateTime.Now; in the method body will be a faster solution. You should also consider using lock(lastSeen) if more than one client can be connected at a time. Cheers! Michał Ziemski nemesis35 pisze: Hi, we work on a project of distributed system where we use the technology dotNET Remoting. But we have there a small issue. We have two types of nodes there, managers and storages. They both use the same method (the method is in dll file - manager and storage have the same copy of this file). The method is: public void UpdateLastSeen(Node n) { if (lastSeen.ContainsKey(n)) lastSeen[n] = DateTime.Now; else lastSeen.Add(n, DateTime.Now); } // Node n - is our own object // lastSeen is hashtable (key is our own object Node, value is DateTime) Problem: The both nodes - managers and also storage peridiocally call this method, while one of them works well, another one does somethig different with the same code. For example the topology is point-to-point, one manager, one storage. Storage updates active status of the manager well, but manager can't recognize that it has is connected stil the same node - the same storage. The result is that the manager does not overwrite the time of last seen of the node storage, but by timer click it adds allways a new entry into the hashtable. With the same code storage works great. No idea where the problem could be, maybe the copy of the object Node is not the same like in the object stored in the hashtable?? Hope that someone will understand what we tried to explain;) and help. Thanks a lot Regards, michal kohut ___ Mono-list maillist - Mono-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-list
Re: [Mono-list] pthreads in mono
Chris, Am 27.03.2008 um 06:04 schrieb Chris Howie: On Tue, Mar 25, 2008 at 9:42 AM, Jestin Stoffel [EMAIL PROTECTED] wrote: I am trying to write mono bindings to libgps, but I'm running into a problem. In libgps, there is a function to setup a callback that is defined to take a pointer to a pthread, in addition to the usual function pointer. To delete the callback, the pointer to the pthread is also required. How do I create a pthread in mono so that I can send this pointer to the library function? --Jestin I assume you are referring to gps_set_callback and gps_del_callback. Since mono doesn't support pthreads as far as I know, [...] You sure about that? Mono does use pthreads in some way, keeping it from running on BeOS. Is getting a pointer to the current thread in native land or using p/ invoke not an option? Andreas ___ Mono-list maillist - Mono-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-list
Re: [Mono-list] pthreads in mono
Hi, Am 27.03.2008 um 12:33 schrieb Chris Howie: On Thu, Mar 27, 2008 at 7:18 AM, Andreas Färber [EMAIL PROTECTED] wrote: You sure about that? Mono does use pthreads in some way, keeping it from running on BeOS. Is getting a pointer to the current thread in native land or using p/ invoke not an option? Andreas [...] However, you may be able to get a pointer to some other Thread object's pthread, but I would not be too sure that this can be done from Mono directly. You could use: [DllImport(pthread)] private static extern pthread_t pthread_self(); However, you'd have to declare pthread_t somewhere, using pthread_t = System.IntPtr; // for instance :) and this call would have to be executed from the other thread -- meaning you'd have to pass the return value over to the main thread and ... ugh. A WaitHandle would undoubtedly be needed, and for what? Writing a ThreadStart that infinitely loops over a call to gps_poll sounds like a lot less work, no? I didn't really care about libgps, never used it, so I can't tell. I was just astonished by your saying, AFAYK, Mono didn't support pthreads, because: * Mono links to it on many if not all non-Windows systems * two years ago the LMF code was updated to cope with external pthread callbacks into managed code * the 7.x branch of the Boehm GC appeared to have dropped support for non-posix threading packages So are you implying there are some cases (apart from Windows) where a MonoThread/System.Threading.Thread is not a pthread but some non- pthread userland thread, like in Java IIRC? Or what did you mean by doesn't support? Andreas ___ Mono-list maillist - Mono-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-list
Re: [Mono-list] pthreads in mono
On Thu, 2008-03-27 at 07:33 -0400, Chris Howie wrote: On Thu, Mar 27, 2008 at 7:18 AM, Andreas Färber [EMAIL PROTECTED] wrote: You sure about that? Mono does use pthreads in some way, keeping it from running on BeOS. Is getting a pointer to the current thread in native land or using p/ invoke not an option? Andreas The whole point of those specific native functions is to run an asynchronous loop on the specified thread, so getting a pointer to the current pthread would not be useful. However, you may be able to get a pointer to some other Thread object's pthread, but I would not be too sure that this can be done from Mono directly. You could use: [DllImport(pthread)] private static extern pthread_t pthread_self(); However, you'd have to declare pthread_t somewhere, and this call would have to be executed from the other thread -- meaning you'd have to pass the return value over to the main thread and ... ugh. A WaitHandle would undoubtedly be needed, and for what? Writing a ThreadStart that infinitely loops over a call to gps_poll sounds like a lot less work, no? All things considered, libgps is really just a socket reader and parser, and reimplementing it's functionality might just be the easiest solution of all. I'm a good halfway done, and hope to have something up and running later tonight (when I get home from work). Thanks for all the input. --Jestin ___ Mono-list maillist - Mono-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-list
Re: [Mono-list] Detect OS using mono framework
I came up with a temporary solution for now similar to what the site descibes: public class OSDetection { static public bool IsWindows { get { return Environment.OSVersion.Platform != PlatformID.Unix; } } static public bool IsOSX { get { bool retVal = false; if (!IsWindows) { ProcessStartInfo si = new ProcessStartInfo(uname, -s); si.RedirectStandardOutput = true; si.UseShellExecute = false; string outputString = string.Empty; using (Process p = Process.Start(si)) { p.Start(); outputString = p.StandardOutput.ReadLine(); p.WaitForExit(); } retVal = string.Compare(outputString, darwin, true) == 0; } return retVal; } } static public bool IsLinux { get { bool retVal = false; if (!IsWindows) { ProcessStartInfo si = new ProcessStartInfo(uname, -s); si.RedirectStandardOutput = true; si.UseShellExecute = false; string outputString = string.Empty; using (Process p = Process.Start(si)) { p.Start(); outputString = p.StandardOutput.ReadLine(); p.WaitForExit(); } retVal = string.Compare(outputString, linux, true) == 0; } return retVal; } } } On Wed, Mar 26, 2008 at 11:06 PM, Oleg Deribas [EMAIL PROTECTED] wrote: Hi, Scott Graves wrote: I now have a requirement to execute a method based on the targeted OS. As of today, the code is 100% portable across OS X, Linux, and Wn32. Using the mono framework, is there a way to determine this by using a Conditional attribute or any other means? Partially it is described here: http://mono-project.com/FAQ:_Technical#How_to_detect_the_execution_platform_.3F -- Oleg ___ Mono-list maillist - Mono-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-list ___ Mono-list maillist - Mono-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-list
[Mono-list] Process has not been started
Hi, I'm using (or trying to use) mod_mono on CentOS 5. I get the Process has not been started error but the fixes i found on google don't work, I've added a .wapi (apache:apache) directory to /var/www, and if i su to apache the mcs compiler appears to work: # su apache bash-3.1$ mcs error CS2008: No files to compile were specified Compilation failed: 1 error(s), 0 warnings bash-3.1$ I can't find any useful logging messages for mod_mono so any help in debugging this issue would be much appreciated. mcs is definitely in $PATH (/usr/bin). Thanks, yage ___ Mono-list maillist - Mono-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-list
Re: [Mono-list] Process has not been started
I've got a bit further, it seems the files are being processed now but IE and firefox both keep trying to make me download the file instead of displaying it correctly :/ yage wrote: Hi, I'm using (or trying to use) mod_mono on CentOS 5. I get the Process has not been started error but the fixes i found on google don't work, I've added a .wapi (apache:apache) directory to /var/www, and if i su to apache the mcs compiler appears to work: # su apache bash-3.1$ mcs error CS2008: No files to compile were specified Compilation failed: 1 error(s), 0 warnings bash-3.1$ I can't find any useful logging messages for mod_mono so any help in debugging this issue would be much appreciated. mcs is definitely in $PATH (/usr/bin). Thanks, yage ___ Mono-list maillist - Mono-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-list ___ Mono-list maillist - Mono-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-list
Re: [Mono-list] Detect OS using mono framework
Your OSDetection.IsOSX code can be simplified greatly by using Mono.Posix.dll in Mono 1.9: static bool IsOSX { get { if (IsWindows) return false; Mono.Unix.Native.Utsname buf; if (Mono.Unix.Native.Syscall.uname (out buf) == 0) { return string.Compare(buf.sysname, darwin, true) == 0 } return false; } } See also: http://www.go-mono.com/docs/index.aspx?link=T%3aMono.Unix.Native.Utsname%2f* http://www.go-mono.com/docs/[EMAIL PROTECTED] - Jon ___ Mono-list maillist - Mono-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-list
Re: [Mono-list] Process has not been started
Is this a correct virtualhost definition for mono? -- VirtualHost 10.0.0.10:80 ServerAdmin [EMAIL PROTECTED] DocumentRoot /home/asptest/htdocs ServerName www.asptest.com ErrorLog /home/asptest/logs/error_log CustomLog /home/asptest/logs/access_log combined Alias /demo /home/asptest/htdocs MonoApplications /demo:/home/asptest/htdocs MonoServerPath /usr/lib64/mono/1.0/mod-mono-server.exe Directory /home/asptest/htdocs SetHandler mono /Directory /VirtualHost -- mod_mono.conf contains: -- IfModule !mod_mono.c MonoAutoApplication enabled LoadModule mono_module /usr/lib64/httpd/modules/mod_mono.so AddType application/x-asp-net .aspx AddType application/x-asp-net .asmx AddType application/x-asp-net .ashx AddType application/x-asp-net .asax AddType application/x-asp-net .ascx AddType application/x-asp-net .soap AddType application/x-asp-net .rem AddType application/x-asp-net .axd AddType application/x-asp-net .cs AddType application/x-asp-net .config AddType application/x-asp-net .Config AddType application/x-asp-net .dll #AddHandler mono .aspx DirectoryIndex index.aspx DirectoryIndex Default.aspx DirectoryIndex default.aspx /IfModule -- The above configuration makes the browser try to download the .aspx file :/ I've scoured google and im stumped, if anyone can offer any pointers id be very grateful. yage yage wrote: I've got a bit further, it seems the files are being processed now but IE and firefox both keep trying to make me download the file instead of displaying it correctly :/ yage wrote: Hi, I'm using (or trying to use) mod_mono on CentOS 5. I get the Process has not been started error but the fixes i found on google don't work, I've added a .wapi (apache:apache) directory to /var/www, and if i su to apache the mcs compiler appears to work: # su apache bash-3.1$ mcs error CS2008: No files to compile were specified Compilation failed: 1 error(s), 0 warnings bash-3.1$ I can't find any useful logging messages for mod_mono so any help in debugging this issue would be much appreciated. mcs is definitely in $PATH (/usr/bin). Thanks, yage ___ Mono-list maillist - Mono-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-list ___ Mono-list maillist - Mono-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-list ___ Mono-list maillist - Mono-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-list
Re: [Mono-list] Process has not been started
yage wrote: Is this a correct virtualhost definition for mono? No, see below. -- VirtualHost 10.0.0.10:80 ServerAdmin [EMAIL PROTECTED] DocumentRoot /home/asptest/htdocs ServerName www.asptest.com ErrorLog /home/asptest/logs/error_log CustomLog /home/asptest/logs/access_log combined Alias /demo /home/asptest/htdocs MonoApplications /demo:/home/asptest/htdocs MonoServerPath /usr/lib64/mono/1.0/mod-mono-server.exe MonoServerPath /usr/bin/mod-mono-server or for ASP.NET 2.0: MonoServerPath /usr/bin/mod-mono-server2 Robert Directory /home/asptest/htdocs SetHandler mono /Directory /VirtualHost -- mod_mono.conf contains: -- IfModule !mod_mono.c MonoAutoApplication enabled LoadModule mono_module /usr/lib64/httpd/modules/mod_mono.so AddType application/x-asp-net .aspx AddType application/x-asp-net .asmx AddType application/x-asp-net .ashx AddType application/x-asp-net .asax AddType application/x-asp-net .ascx AddType application/x-asp-net .soap AddType application/x-asp-net .rem AddType application/x-asp-net .axd AddType application/x-asp-net .cs AddType application/x-asp-net .config AddType application/x-asp-net .Config AddType application/x-asp-net .dll #AddHandler mono .aspx DirectoryIndex index.aspx DirectoryIndex Default.aspx DirectoryIndex default.aspx /IfModule -- The above configuration makes the browser try to download the .aspx file :/ I've scoured google and im stumped, if anyone can offer any pointers id be very grateful. yage yage wrote: I've got a bit further, it seems the files are being processed now but IE and firefox both keep trying to make me download the file instead of displaying it correctly :/ yage wrote: Hi, I'm using (or trying to use) mod_mono on CentOS 5. I get the Process has not been started error but the fixes i found on google don't work, I've added a .wapi (apache:apache) directory to /var/www, and if i su to apache the mcs compiler appears to work: # su apache bash-3.1$ mcs error CS2008: No files to compile were specified Compilation failed: 1 error(s), 0 warnings bash-3.1$ I can't find any useful logging messages for mod_mono so any help in debugging this issue would be much appreciated. mcs is definitely in $PATH (/usr/bin). Thanks, yage ___ Mono-list maillist - Mono-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-list ___ Mono-list maillist - Mono-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-list ___ Mono-list maillist - Mono-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-list ___ Mono-list maillist - Mono-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-list
Re: [Mono-list] Process has not been started
Tried both and it still tries to download the file in the browser... ive tried adding: application/x-asp-net aspx to /etc/mime.types but still no joy yage Robert Jordan wrote: yage wrote: Is this a correct virtualhost definition for mono? No, see below. -- VirtualHost 10.0.0.10:80 ServerAdmin [EMAIL PROTECTED] DocumentRoot /home/asptest/htdocs ServerName www.asptest.com ErrorLog /home/asptest/logs/error_log CustomLog /home/asptest/logs/access_log combined Alias /demo /home/asptest/htdocs MonoApplications /demo:/home/asptest/htdocs MonoServerPath /usr/lib64/mono/1.0/mod-mono-server.exe MonoServerPath /usr/bin/mod-mono-server or for ASP.NET 2.0: MonoServerPath /usr/bin/mod-mono-server2 Robert Directory /home/asptest/htdocs SetHandler mono /Directory /VirtualHost -- mod_mono.conf contains: -- IfModule !mod_mono.c MonoAutoApplication enabled LoadModule mono_module /usr/lib64/httpd/modules/mod_mono.so AddType application/x-asp-net .aspx AddType application/x-asp-net .asmx AddType application/x-asp-net .ashx AddType application/x-asp-net .asax AddType application/x-asp-net .ascx AddType application/x-asp-net .soap AddType application/x-asp-net .rem AddType application/x-asp-net .axd AddType application/x-asp-net .cs AddType application/x-asp-net .config AddType application/x-asp-net .Config AddType application/x-asp-net .dll #AddHandler mono .aspx DirectoryIndex index.aspx DirectoryIndex Default.aspx DirectoryIndex default.aspx /IfModule -- The above configuration makes the browser try to download the .aspx file :/ I've scoured google and im stumped, if anyone can offer any pointers id be very grateful. yage yage wrote: I've got a bit further, it seems the files are being processed now but IE and firefox both keep trying to make me download the file instead of displaying it correctly :/ yage wrote: Hi, I'm using (or trying to use) mod_mono on CentOS 5. I get the Process has not been started error but the fixes i found on google don't work, I've added a .wapi (apache:apache) directory to /var/www, and if i su to apache the mcs compiler appears to work: # su apache bash-3.1$ mcs error CS2008: No files to compile were specified Compilation failed: 1 error(s), 0 warnings bash-3.1$ I can't find any useful logging messages for mod_mono so any help in debugging this issue would be much appreciated. mcs is definitely in $PATH (/usr/bin). Thanks, yage ___ Mono-list maillist - Mono-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-list ___ Mono-list maillist - Mono-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-list ___ Mono-list maillist - Mono-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-list ___ Mono-list maillist - Mono-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-list ___ Mono-list maillist - Mono-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-list
Re: [Mono-list] pthreads in mono
On Thu, Mar 27, 2008 at 9:33 AM, Andreas Färber [EMAIL PROTECTED] wrote: So are you implying there are some cases (apart from Windows) where a MonoThread/System.Threading.Thread is not a pthread but some non- pthread userland thread, like in Java IIRC? Or what did you mean by doesn't support? I meant that AFAIK, Mono provides no mechanism to interact with pthreads directly, for example obtaining a pthread_t* for a specific thread. Whether this can be done by p/invoking to libpthread is beside the point. My main point (that I probably failed to stress) was that bending over backwards to wrap an API using a type of thread that may only exist on one CLR would be a very broken wrapper indeed -- I doubt such a wrapper would run on Microsoft's implementation, for example. -- Chris Howie http://www.chrishowie.com http://en.wikipedia.org/wiki/User:Crazycomputers ___ Mono-list maillist - Mono-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-list
Re: [Mono-list] Detect OS using mono framework
On Thu, Mar 27, 2008 at 1:29 PM, Jonathan Pryor [EMAIL PROTECTED] wrote: Your OSDetection.IsOSX code can be simplified greatly by using Mono.Posix.dll in Mono 1.9: static bool IsOSX { get { if (IsWindows) return false; Mono.Unix.Native.Utsname buf; if (Mono.Unix.Native.Syscall.uname (out buf) == 0) { return string.Compare(buf.sysname, darwin, true) == 0 } return false; } } See also: http://www.go-mono.com/docs/index.aspx?link=T%3aMono.Unix.Native.Utsname%2f* http://www.go-mono.com/docs/[EMAIL PROTECTED] - Jon Won't the JIT explode if this is called on MS.NET? -- Chris Howie http://www.chrishowie.com http://en.wikipedia.org/wiki/User:Crazycomputers ___ Mono-list maillist - Mono-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-list
Re: [Mono-list] Detect OS using mono framework
On Thu, 2008-03-27 at 22:23 -0400, Chris Howie wrote: On Thu, Mar 27, 2008 at 1:29 PM, Jonathan Pryor [EMAIL PROTECTED] wrote: Your OSDetection.IsOSX code can be simplified greatly by using Mono.Posix.dll in Mono 1.9: static bool IsOSX { get { if (IsWindows) return false; Mono.Unix.Native.Utsname buf; if (Mono.Unix.Native.Syscall.uname (out buf) == 0) { return string.Compare(buf.sysname, darwin, true) == 0 } return false; } } Won't the JIT explode if this is called on MS.NET? Only if you don't include Mono.Posix.dll with your app. :-) If you don't want it to blow up, it should work to move the Ustname and uname use into a different method (called by the IsOSX property), as that method will never be jitted on Windows. - Jon ___ Mono-list maillist - Mono-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-list