[Mono-devel-list] RE: [Gc] [PATCH] Race condition when restarting threads
On Mon, 2005-08-01 at 16:41 -0700, Boehm, Hans wrote: > My assumption is that if thread A sends a signal to thread B, then > Bs handler sees all memory operations performed by A before the > signal was sent. I don't think that's officially guaranteed, but I > would be amazed if it weren't true everywhere. Ah, yeah, that probably fixes things. Anyways, not sure what I want to do in the Mono tree for this. We should probably swap out my version of the patch (the one that does context switches). Having a membar feels alot cleaner. Would you mind putting up a pre-7.0a4 for me, so I can see if backporting the patch there and whatever __asm__ is needed for all the platforms. -- Ben ___ Mono-devel-list mailing list Mono-devel-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-devel-list
[Mono-devel-list] RE: [Gc] [PATCH] Race condition when restarting threads
On Mon, 2005-08-01 at 15:09 -0700, Boehm, Hans wrote: > I don't quite understand the problem here. If GC_stop_count has > just been incremented, then I'm about to send another suspend > signal to the thread, and it will have to stop again before > we think the world is stopped. My situation is: 1) the thread suspending other threads has done both GC_stop_count ++ and GC_world_is_stopped = TRUE 2) A suspended thread wakes up from sigsuspend (on a random signal) 3) By the time it wakes up, the GC_stop_count has taken effect (as seen by this thread), but GC_world_is_stopped has not 4) The thread thus thinks that the world is being started up again and continues. -- Ben ___ Mono-devel-list mailing list Mono-devel-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-devel-list
[Mono-devel-list] Not sure why this won't compile
Hi, I have two source files (below). If I compile them up with -r:System.Drawing and -r:System.Windows.Forms, I get an error about the first file on the line which has EventArgs in it. Am I wrong in thinking that if I compile both files at the same time that EventArgs in the first file should be resolved by -r:S.W.F? // FECdomain.cs using System.Text.RegularExpressions; delegate void StringSplitHandler(object src, SplitStringArgs args); class SplitStringArgs : EventArgs { private SplitStringArgs() {} public SplitStringArgs(string[] strings) { this.strings = strings; } string[] strings; public string[] Strings { get { return strings; } set { strings = value; } } } class DomainSplitter { Regex re = new Regex("\\s"); string[] substrings; public event StringSplitHandler StringsSplit; public void SplitString(string inStr) { substrings = re.Split(inStr); StringsSplit(this, new SplitStringArgs(substrings)); } } //FECdomain2.cs using System; using System.Drawing; using System.Windows.Forms; class FECdomain : Form { TextBox tb = new TextBox(); Button b = new Button(); label[] labels; DomainSplitter domainObject = new DomainSplitter(); FECdomain() { tb.Location = new Point(10, 10); tb.Text = "The quick brown fox"; b.Location = new Point(150, 10); b.Text = "Split text"; b.Click += new EventHandler(this.GUIEvent); domainObject.StringsSplit += new StringSplitHandler(this.DomainEvent); this.Text = "Form-Event-Control"; this.Controls.Add(tb); this.Controls.Add(b); } void GUIEvent(object src, EventArgs args) { domainObject.SplitString(tb.Text); } void DomainEvent(object src, SplitStringsArgs args) { string[] strings = args.Strings; if (labels != null) { foreach(Label l in labels) this.Controls.Remove(l); } labels = new Label[strings.Length]; int row = 40; for (int i = 0; i < labels.Length; i++) { labels[i] = new Label(); labels[i].Text = strings[i]; labels[i].Location = new Point(100, row); row += 20; } this.Controls.AddRange(labels); } public static void Main() { Application.Run(new FECdomain()); } } mcs FECdomain.cs FECdomain2.cs -r:System.Windows.Forms -r:System.Drawing FECdomain.cs(6) error CS0246: The type or namespace name `EventArgs' could not be found. Are you missing a using directive or an assembly reference? Compilation failed: 1 error(s), 0 warnings. TTFN Paul -- "Some people will do anything for a woman in uniform" - The Doctor - Unregenerate (Big Finish audio) signature.asc Description: This is a digitally signed message part ___ Mono-devel-list mailing list Mono-devel-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-devel-list
[Mono-devel-list] Mono Cryptography UnmanagedWrapper Wiki setup
http://flexwiki.eharning.us/default.aspx/EhWiki.MonoUnmanagedEncryption That site might be down for a bit since the last host of my DNS screwed up the information. Right now I have a table of algorithms supported by different libraries and a table of current performance stats. The perf stats table isn't really complete since I haven't tested it out with the other wrappers and such. I will soon fix it up w/ stats from OpenSSL's hashing functions. -- Thomas Harning Jr. 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-devel-list] calling indexer from aspx page written in VB
Hi Bobby, Item is the indexer (default Property) for the class so you CAN omit it, but I'm not sure why it's not accepting to be explictily called. Could you fill a bugzilla case about it to organize our search of a solution. Thank you On 8/1/05, Bobby Beckmann <[EMAIL PROTECTED]> wrote: > Hi, > > I'm trying to port a vb.net asp app over to mono and my first head > scratcher is why can't I have a line that says: > > > > in my code. The error I get is > "error BC30390: 'System.Web.SessionState.HttpSessionState.Item' is > inaccessible because of its protection level" > > I've searched the bug dbs and google, but haven't found anything > relevant. It does work when I remove the .Item and just do > Session("Test"). Is this a compiler issue or a runtime issue? I > appreciate any help. > > Thanks, > Bobby > > ___ > Mono-devel-list mailing list > Mono-devel-list@lists.ximian.com > http://lists.ximian.com/mailman/listinfo/mono-devel-list > -- Rafael "Monoman" Teixeira --- I'm trying to become a "Rosh Gadol" before my own eyes. See http://www.joelonsoftware.com/items/2004/12/06.html for enlightment. It hurts! ___ Mono-devel-list mailing list Mono-devel-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-devel-list
[Mono-devel-list] [PATCH] Assembly Linker linkin resources
Hey, AL currently invokes AssemblyBuilder.DefineResource when linking to a resource file. It looks like .NET invokes AssemblyBuilder.AddResourceFile instead, avoiding changing the linked file (/link). May I commit? Carlos. Index: Al.cs === --- Al.cs (revisión: 47896) +++ Al.cs (copia de trabajo) @@ -706,8 +706,8 @@ res.fileName = res.target; } - ab.DefineResource (res.name, "", res.fileName, - res.isPrivate ? ResourceAttributes.Private : ResourceAttributes.Public); + ab.AddResourceFile (res.name, res.fileName, + res.isPrivate ? ResourceAttributes.Private : ResourceAttributes.Public); } } Index: ChangeLog === --- ChangeLog (revisión: 47896) +++ ChangeLog (copia de trabajo) @@ -1,3 +1,9 @@ +2005-08-01 Carlos Alberto Cortez <[EMAIL PROTECTED]> + + * Al.cs: Use AssemblyBuilder.AddResourceFile instead of + AddResourceFile when linkin to a resource, just as .NET + does. + 2005-07-08 Zoltan Varga <[EMAIL PROTECTED]> * Al.cs: Applied patch from Sridhar Kulkarni ([EMAIL PROTECTED]). ___ Mono-devel-list mailing list Mono-devel-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-devel-list
[Mono-devel-list] calling indexer from aspx page written in VB
Hi, I'm trying to port a vb.net asp app over to mono and my first head scratcher is why can't I have a line that says: in my code. The error I get is "error BC30390: 'System.Web.SessionState.HttpSessionState.Item' is inaccessible because of its protection level" I've searched the bug dbs and google, but haven't found anything relevant. It does work when I remove the .Item and just do Session("Test"). Is this a compiler issue or a runtime issue? I appreciate any help. Thanks, Bobby ___ Mono-devel-list mailing list Mono-devel-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-devel-list
Re: [Mono-devel-list] Printing status and reporting engine
There is some C# bindings to gnome-print in gtk#. I don't think they are maintained though. I even heard that gnome-print even works on Windows (not the gui though), but I have not tried. Has anyone seen this http://report.sourceforge.net/ which I've heard works on Mono too?Rafael Teixeira <[EMAIL PROTECTED]> wrote: Well thanks for your project it is surely needed...Nowadays I'm using specific code over iTextSharp to generate PDF filesand then exec'ing lpr on them, as my reporting solution.I don't think anything is actively being developed in the printing classes. Neither Gnome-printing is correctly supported by GTK#. So that lots of work in the printing support subject is awaiting forenterprising volunteers...Could you help us? At least by pointing at bugzilla the not what ismissing (maybe just a task reminding case on the whole subject) but onhow it should be working (some small pieces of code that exercisethings and that work attached to specific cases) so that we canimplement missing things correctly?Thank you, again On 7/30/05, Toni Martir <[EMAIL PROTECTED]>wrote:> Resume:> & gt; 1. Time line for printing implementation classes (StandardPrintController> mainly)> 2. Your preferences,opinions,use of reporting engine for your applications.> > Hello,> > I'm the main developer of an opensource reporting engine:> > http://reportman.sourceforge.net> > I'm in the process of testing a possible port to c#, Mono and Microsoft.Net.> I implemented few required classes with success:> - Variant class:with operator overload implemeted (why is it not on standard> runtime classes?)In truth there is but it is tyed to specific languages (and theiradditional runtime libraries): VB.NET and JScript.NET that haslate-binding and Boo that has duck-typing allow for some"Variant"-type functionality. C# is a strict-typing language...> - _expression_ evaluator:exp.parser+exp.evaluator with access to dataset> fields, that is to provide runtime _expression_ eval uation like> ((PRODUCT.PRICE*(100-ORDER.DISCOUNT)/100*ORDER.QUANTITY))Cool. AFAIK, JScript.NET also has such embedded evaluator. The BOOIinterpreter for the boo language has some pieces that could have beenreused...> I'm on the process of printing tests, I see status of printing classes is> about 50%, I tested simple printouts on Linux without success (message> Document 001.jpg is shown on console and nothing print).Yes, I think things are mostly stubbed, not really implemented in that space.> I want to know about implementation plans (timeline?) for printing classes:> StandardPrintControler> PrintPreviewDialog (in Winforms).> I have no information about status of important functions like> MeasureCharacterRanges.> > I'm also interested about mono developers tools, I'm new to mono and don't> know which reporting engine you use actually, or plans to implement a& gt; similar tool. I know really few developers using Mono or .Net for desktop> applications.As I said, I know no Report Generating tool for Mono. Some peoplealready expressed the need in the list, but some want a gigantic firststep, like if a tool as-fully-featured-as Crystal Reports or MicrosoftSQL Server Reporting Services, could be built from scratch in some fewweeks.> Note that some parts of the engine are not really dificult to port, like PDF> output generation (once I find correct functions for text measurement), and> maybe really useful for server side applications.Well I generate PDFs with iTextSharp that is a port of java's iText(by one of the it's main mantainers). I think it is far from perfect,but it certainly works.:)-- Rafael "Monoman" Teixeira---I'm trying to become a "Rosh Gadol" before my own eyes. See http://www.joelonsoftware.com/items/2004/12/06.html for enlightment.It hurts!___Mono-devel-list mailing listMono-devel-list@lists.ximian.comhttp://lists.ximian.com/mailman/listinfo/mono-devel-list__Do You Yahoo!?Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com ___ Mono-devel-list mailing list Mono-devel-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-devel-list
Re: [Mono-devel-list] Serializing widgets with C#
You could use [Serializable] in your class and implements ISerialiable. So, you are not going to serialize all the widgets, instead you are going to serialize the info needed to build it again (implementing GetObjectData and a constructor defined in ISerializable). in GetObjectData you are going to tell to the serialization engine what info do you need to save, for example the text for labels, or buttons, etc. In the constructor you'll read the data that the serialization engine gives you, and it'll be your responsability to bouild all the widgets again. I hope that this could be useful. Greets. On 8/1/05, Andreas Nahr <[EMAIL PROTECTED]> wrote: > I don't know what exactly you are trying to do, but it seems you want to use > it as a kind of "saving something". > The problem with (binary) serialization is that nobody guarantees that > different .net versions will serialize the same way. > > So a serialized file saved in .net 1.0 may not open in 1.1 may not open in > 2.0. > Also a file from MS.Net may not open in Mono may not open in Dotgnu. > > If that doesn't matter it should work (like only saving a cache that could > be simply deleted if it cannot be restored), otherwise other mechanisms are > more appropriate... > > greets > Andreas > > > What you're trying to accomplish is impossible. first because gtk > > widgets are not serializable and secondly, it just sounds like a bad > > idea all together :-). In order for you to serialize an array of > > anything the entire object graph needs to be serializable, so if you > > wrap a gtk widget in a class that is ISerializable, it will still fail > > > > since the widget isn't. > > Yeap, I can assure you that nor by marking it or implementing > ISerializable it works that was why ask you all :o). However, the answer > impossible it also and end of this pursuit. Thanks for that knowledge. > By the way, why do you think it is a bad idea (if it could have been > done) this solution? > > > ___ > Mono-devel-list mailing list > Mono-devel-list@lists.ximian.com > http://lists.ximian.com/mailman/listinfo/mono-devel-list > -- Alberto Avila Desarrollador ___ Mono-devel-list mailing list Mono-devel-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-devel-list
Re: [Mono-devel-list] Printing status and reporting engine
Well thanks for your project it is surely needed... Nowadays I'm using specific code over iTextSharp to generate PDF files and then exec'ing lpr on them, as my reporting solution. I don't think anything is actively being developed in the printing classes. Neither Gnome-printing is correctly supported by GTK#. So that lots of work in the printing support subject is awaiting for enterprising volunteers... Could you help us? At least by pointing at bugzilla the not what is missing (maybe just a task reminding case on the whole subject) but on how it should be working (some small pieces of code that exercise things and that work attached to specific cases) so that we can implement missing things correctly? Thank you, again On 7/30/05, Toni Martir <[EMAIL PROTECTED]> wrote: > Resume: > > 1. Time line for printing implementation classes (StandardPrintController > mainly) > 2. Your preferences,opinions,use of reporting engine for your applications. > > Hello, > > I'm the main developer of an opensource reporting engine: > > http://reportman.sourceforge.net > > I'm in the process of testing a possible port to c#, Mono and Microsoft.Net. > I implemented few required classes with success: > - Variant class:with operator overload implemeted (why is it not on standard > runtime classes?) In truth there is but it is tyed to specific languages (and their additional runtime libraries): VB.NET and JScript.NET that has late-binding and Boo that has duck-typing allow for some "Variant"-type functionality. C# is a strict-typing language... > - Expression evaluator:exp.parser+exp.evaluator with access to dataset > fields, that is to provide runtime expression evaluation like > ((PRODUCT.PRICE*(100-ORDER.DISCOUNT)/100*ORDER.QUANTITY)) Cool. AFAIK, JScript.NET also has such embedded evaluator. The BOOI interpreter for the boo language has some pieces that could have been reused... > I'm on the process of printing tests, I see status of printing classes is > about 50%, I tested simple printouts on Linux without success (message > Document 001.jpg is shown on console and nothing print). Yes, I think things are mostly stubbed, not really implemented in that space. > I want to know about implementation plans (timeline?) for printing classes: > StandardPrintControler > PrintPreviewDialog (in Winforms). > I have no information about status of important functions like > MeasureCharacterRanges. > > I'm also interested about mono developers tools, I'm new to mono and don't > know which reporting engine you use actually, or plans to implement a > similar tool. I know really few developers using Mono or .Net for desktop > applications. As I said, I know no Report Generating tool for Mono. Some people already expressed the need in the list, but some want a gigantic first step, like if a tool as-fully-featured-as Crystal Reports or Microsoft SQL Server Reporting Services, could be built from scratch in some few weeks. > Note that some parts of the engine are not really dificult to port, like PDF > output generation (once I find correct functions for text measurement), and > maybe really useful for server side applications. Well I generate PDFs with iTextSharp that is a port of java's iText (by one of the it's main mantainers). I think it is far from perfect, but it certainly works. :) -- Rafael "Monoman" Teixeira --- I'm trying to become a "Rosh Gadol" before my own eyes. See http://www.joelonsoftware.com/items/2004/12/06.html for enlightment. It hurts! ___ Mono-devel-list mailing list Mono-devel-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-devel-list
Re: [Mono-devel-list] Serializing widgets with C#
I don't know what exactly you are trying to do, but it seems you want to use it as a kind of "saving something". The problem with (binary) serialization is that nobody guarantees that different .net versions will serialize the same way. So a serialized file saved in .net 1.0 may not open in 1.1 may not open in 2.0. Also a file from MS.Net may not open in Mono may not open in Dotgnu. If that doesn't matter it should work (like only saving a cache that could be simply deleted if it cannot be restored), otherwise other mechanisms are more appropriate... greets Andreas What you're trying to accomplish is impossible. first because gtk widgets are not serializable and secondly, it just sounds like a bad idea all together :-). In order for you to serialize an array of anything the entire object graph needs to be serializable, so if you wrap a gtk widget in a class that is ISerializable, it will still fail since the widget isn't. Yeap, I can assure you that nor by marking it or implementing ISerializable it works that was why ask you all :o). However, the answer impossible it also and end of this pursuit. Thanks for that knowledge. By the way, why do you think it is a bad idea (if it could have been done) this solution? ___ Mono-devel-list mailing list Mono-devel-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-devel-list
Re: [Mono-devel-list] Serializing widgets with C#
Hi Alfredo, On 8/1/05, Alfredo Jose Muela Romero <[EMAIL PROTECTED]> wrote: > By the way, why do you think it is a bad idea (if it could have been > done) this solution? Because the tree would be much bigger than needed and you would need to recreate links with the GUI infrastructure. It costs less to recreate as needed. > > I suggest you look into Monodevelop's settings code to get a sense of > > > > how MD is persisting the user UI preferences and reconfiguring it at > > start up. > > Ok, I'm on my way (downloading the source code). MonoDevelop uses Glade-files (xml files generated by the Glade-2 GUI designer) that are loaded (recreating the needed widgets) by Glade# (that currently just wraps libglade) to define its basic UI. The user customizations are saved in xml configurations files specific to MonoDevelop, and reapplied after the basic UI is reconstructed. > > my 2 cents, > > Forgive my ignorance and my curiosity... what does "my 2 cents" means? > :-S It means that is just a personal commentary/opinion on the subject. I'm not sure about the origin of the expression, but it tries to convey that it is an "easy" (not time-costly) thought that is being shared. > Thank you so much, > > Alfredo. :) -- Rafael "Monoman" Teixeira --- I'm trying to become a "Rosh Gadol" before my own eyes. See http://www.joelonsoftware.com/items/2004/12/06.html for enlightment. It hurts! ___ Mono-devel-list mailing list Mono-devel-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-devel-list
Re: [Mono-devel-list] Mod_mono / XSP compiled from scratch latest
On Thu, 2005-07-28 at 18:09 +0200, Colt D. Majkrzak wrote: > I just downloaded all of mono/xsp/mod_mono to upgrade to the latest on > our Cpanel server, removing the cpanel outdated crap for mono. I > recompiled everything exactly how each describes but I’m getting a 503 > Service temporarily Unavailable from the website itself, and if I look > at the apache logs I can see the following: > > > > Corlib not in sync with this runtime: expected corlib version 37, > found 22. > > Download a newer corlib or a newer runtime at > http://www.go-mono.com/daily. May be your new mono was installed into, say, /usr/local and the old one and mod_mono where compiled with --prefix=/usr. If the /usr copy of mono is still there, mod_mono is trying to use it. I would rebuild mod_mono to point to the right location by default (--prefix and --with-mono-prefix) or use the appropiate directives for mod_mono so that it knows where the new 'mono' executable is (man mod_mono). -Gonzalo ___ Mono-devel-list mailing list Mono-devel-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-devel-list
Re: [Mono-devel-list] C# Threading : libgcc_s.so.1 must be installed for pthread_cancel to work
[EMAIL PROTECTED] wrote: libgcc_s.so.1 must be installed for pthread_cancel to work My search daemons have been dying and dumping this message from time to time in the last few days. I'm running Mono 1.1.8 on Fedora Core 2; on one machine I have Mono 1.1.8 installed from RPMs, on the other I've installed a patched 1.1.8 from source (for a remoting HTTP fixlet) over the rpms. My search update daemon consists of a main thread running Lucene index updates and a remoting server in the background adding queued items. Unfortunately I haven't yet figured out what specifically triggers it; Prashanth's sample program seems to run without any error for me. -- brion vibber (brion @ pobox.com) 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-devel-list] Serializing widgets with C#
El Mon, 01 Aug 2005 05:45:57 -0700 Rafael Ferreira <[EMAIL PROTECTED]> escribió: > Alfredo Jose Muela Romero wrote: > > >El Sun, 31 Jul 2005 17:48:21 -0700 > >Rafael Ferreira <[EMAIL PROTECTED]> escribió: > > > > > > > >>Crazy question but can you explain to me why would you want to do > >>that? > >> > >> > > > > Sure. > > > > The point is that I'm developing a program in which the GUI is > >generated dinamically (i.e. widgets come and go with the user > >interaction) so one of my business classes contains an array of > >Gtk.Widgets (the ones which are added to the interface). So, somehow, > >I need to keep this info for the next restarting of the program (in > >order to keep the interface as the user wanted before stopping the > >program). At this point the choices were: > > > > 1) Back-up the object at a OODB > > 2) Back-up the data at tables in a RDB > > 3) Make a config file where I put the needed info to reconstruct > > the > >objects (with the widgets) at starting time > > 4) Serialize the objects before stopping the program and > > deserialize > >them at starting. > > > > And, well, you know my choice. > > > > Any suggestions and/or advices will be welcomed. > > > > > > Alfredo. > > > > > > > >>- raf > >> > >>On Sun, 2005-07-31 at 19:46 +0200, Alfredo Jose Muela Romero wrote: > >> > >> > >>> Hi everybody, > >>> > >>> I'm new to this list, I have look up the answer to my question > >>> trough > >>>the list's files but I haven't found it so I'll make it: how can I > >>>make it to serialize an object which contains an array of > >>>Gtk.Widgets since for serializing I need to mark the classes with > >>>[Serializable]? In other words, how can I serialize an object with > >>>3rd party objects whithin? > >>> > >>> Thanks in advance, > >>> > >>> > >>> Alfredo. > >>>___ > >>>Mono-devel-list mailing list > >>>Mono-devel-list@lists.ximian.com > >>>http://lists.ximian.com/mailman/listinfo/mono-devel-list > >>> > >>> > >>___ > >>Mono-devel-list mailing list > >>Mono-devel-list@lists.ximian.com > >>http://lists.ximian.com/mailman/listinfo/mono-devel-list > >> > >> > >___ > >Mono-devel-list mailing list > >Mono-devel-list@lists.ximian.com > >http://lists.ximian.com/mailman/listinfo/mono-devel-list > > > > > What you're trying to accomplish is impossible. first because gtk > widgets are not serializable and secondly, it just sounds like a bad > idea all together :-). In order for you to serialize an array of > anything the entire object graph needs to be serializable, so if you > wrap a gtk widget in a class that is ISerializable, it will still fail > > since the widget isn't. > > I suggest you look into Monodevelop's settings code to get a sense of > > how MD is persisting the user UI preferences and reconfiguring it at > start up. I haven't read it all (it's quite big), anyway it looks like it uses a kind of config file which is read at start-up time, am I right? > > my 2 cents, > > - raf > > > > ___ > Mono-devel-list mailing list > Mono-devel-list@lists.ximian.com > http://lists.ximian.com/mailman/listinfo/mono-devel-list ___ Mono-devel-list mailing list Mono-devel-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-devel-list
Re: [Mono-devel-list] Serializing widgets with C#
El Mon, 01 Aug 2005 05:45:57 -0700 Rafael Ferreira <[EMAIL PROTECTED]> escribió: > Alfredo Jose Muela Romero wrote: > > >El Sun, 31 Jul 2005 17:48:21 -0700 > >Rafael Ferreira <[EMAIL PROTECTED]> escribió: > > > > > > > >>Crazy question but can you explain to me why would you want to do > >>that? > >> > >> > > > > Sure. > > > > The point is that I'm developing a program in which the GUI is > >generated dinamically (i.e. widgets come and go with the user > >interaction) so one of my business classes contains an array of > >Gtk.Widgets (the ones which are added to the interface). So, somehow, > >I need to keep this info for the next restarting of the program (in > >order to keep the interface as the user wanted before stopping the > >program). At this point the choices were: > > > > 1) Back-up the object at a OODB > > 2) Back-up the data at tables in a RDB > > 3) Make a config file where I put the needed info to reconstruct > > the > >objects (with the widgets) at starting time > > 4) Serialize the objects before stopping the program and > > deserialize > >them at starting. > > > > And, well, you know my choice. > > > > Any suggestions and/or advices will be welcomed. > > > > > > Alfredo. > > > > > > > >>- raf > >> > >>On Sun, 2005-07-31 at 19:46 +0200, Alfredo Jose Muela Romero wrote: > >> > >> > >>> Hi everybody, > >>> > >>> I'm new to this list, I have look up the answer to my question > >>> trough > >>>the list's files but I haven't found it so I'll make it: how can I > >>>make it to serialize an object which contains an array of > >>>Gtk.Widgets since for serializing I need to mark the classes with > >>>[Serializable]? In other words, how can I serialize an object with > >>>3rd party objects whithin? > >>> > >>> Thanks in advance, > >>> > >>> > >>> Alfredo. > >>>___ > >>>Mono-devel-list mailing list > >>>Mono-devel-list@lists.ximian.com > >>>http://lists.ximian.com/mailman/listinfo/mono-devel-list > >>> > >>> > >>___ > >>Mono-devel-list mailing list > >>Mono-devel-list@lists.ximian.com > >>http://lists.ximian.com/mailman/listinfo/mono-devel-list > >> > >> > >___ > >Mono-devel-list mailing list > >Mono-devel-list@lists.ximian.com > >http://lists.ximian.com/mailman/listinfo/mono-devel-list > > > > > What you're trying to accomplish is impossible. first because gtk > widgets are not serializable and secondly, it just sounds like a bad > idea all together :-). In order for you to serialize an array of > anything the entire object graph needs to be serializable, so if you > wrap a gtk widget in a class that is ISerializable, it will still fail > > since the widget isn't. Yeap, I can assure you that nor by marking it or implementing ISerializable it works that was why ask you all :o). However, the answer impossible it also and end of this pursuit. Thanks for that knowledge. By the way, why do you think it is a bad idea (if it could have been done) this solution? > I suggest you look into Monodevelop's settings code to get a sense of > > how MD is persisting the user UI preferences and reconfiguring it at > start up. Ok, I'm on my way (downloading the source code). > > my 2 cents, Forgive my ignorance and my curiosity... what does "my 2 cents" means? :-S Thank you so much, Alfredo. > - raf > > > > ___ > Mono-devel-list mailing list > Mono-devel-list@lists.ximian.com > http://lists.ximian.com/mailman/listinfo/mono-devel-list ___ Mono-devel-list mailing list Mono-devel-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-devel-list
[Mono-devel-list] Size and SizeF tests - no fixes needed!
Added tests to cover 100% of Size and SizeF API. No bugs revealed. TestSize.patch Description: TestSize.patch ___ Mono-devel-list mailing list Mono-devel-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-devel-list
[Mono-devel-list] Color tests and fix for them
Added tests to cover 100% of Color API. Needed to fix Color.GetHashCode to take Name into account, in addition to ARGB. TestColor.patch Description: TestColor.patch Color.patch Description: Color.patch ___ Mono-devel-list mailing list Mono-devel-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-devel-list
RE: [Mono-devel-list] More tests and fixes for them
At the beginning I hoped to simulate MS functionality as much as possible, but as I don't know how to reproduce Rectangle hash code, I don't care if Point will have different code, too. So I will change the test so it does not requires fixed hash values, as I did with Rectangle. Thank you. Andrew. ___ Mono-devel-list mailing list Mono-devel-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-devel-list
RE: [Mono-devel-list] Hangs on System.IO.MonoIO:Write
Yes, the data is intact and valid. I've output it to the screen also, and it shows up. No matter if mono hangs or not, the file is created and has the exact same data (which is correct). The file is apparently being written (and flushed) correctly. This looks like a "destruct" issue for the StreamWriter or something?? -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Paul Sent: Monday, August 01, 2005 10:56 AM To: mono-devel Subject: RE: [Mono-devel-list] Hangs on System.IO.MonoIO:Write Hi, > I'm not reading any file, though. I make an LDAP call, and use a > foreach to iterate through the results. The only file IO I'm doing is writing. Yep. Are you checking that what is being read in isn't just garbage? TTFN Paul -- "Some people will do anything for a woman in uniform" - The Doctor - Unregenerate (Big Finish audio) ___ Mono-devel-list mailing list Mono-devel-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-devel-list
RE: [Mono-devel-list] Hangs on System.IO.MonoIO:Write
Hi, > I'm not reading any file, though. I make an LDAP call, and use a foreach > to iterate through the results. The only file IO I'm doing is writing. Yep. Are you checking that what is being read in isn't just garbage? TTFN Paul -- "Some people will do anything for a woman in uniform" - The Doctor - Unregenerate (Big Finish audio) signature.asc Description: This is a digitally signed message part ___ Mono-devel-list mailing list Mono-devel-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-devel-list
Re: [Mono-devel-list] More tests and fixes for them
On Mon, 2005-08-01 at 02:43 -0700, Andrew Skiba wrote: > Please review the attached tests and fixes for them. > > I know the fixes look weird, but that's what dot net appear to do in > their sys.drawing. PointF.ToString returns string with space, while > Point.ToString returns without space. And the hash code for PointF seem > to ignore the y value. GetHashCode does not need to be the same for different impls of the framework. For example, char has a different gethashcode for microsoft and mono. The only thing that we should test in GetHashCode is that x == y implies hash(x) == hash (y). -- Ben ___ Mono-devel-list mailing list Mono-devel-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-devel-list
RE: [Mono-devel-list] Hangs on System.IO.MonoIO:Write
I'm not reading any file, though. I make an LDAP call, and use a foreach to iterate through the results. The only file IO I'm doing is writing. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Paul Sent: Monday, August 01, 2005 10:25 AM To: mono-devel Subject: RE: [Mono-devel-list] Hangs on System.IO.MonoIO:Write Hi, > foreach (SearchResult lResult in lResults) > { > if (lResult.Properties["mail"] != null) > foreach (String item in > lResult.Properties["mail"]) > { > if > (item.IndexOf("wardandsmith.com") > 0) > > //Console.WriteLine(item); > > file.WriteLine(item.ToLower()); > } > } > } > catch (Exception exc) > { > Console.WriteLine("ERRNUM: " + exc.Message); > Console.WriteLine("ERRNUM: " + exc.InnerException); > Console.WriteLine("ERRNUM: " + exc.Source); > Console.WriteLine("ERRNUM: " + exc.StackTrace); > } > file.Close(); > } > > > The very last line in the code is where the Close() call is. If you > can find anything wrong, I'd be very grateful! By the looks of it, the problem is the read routine more than anything as it looks like you may be reading past the end of the file which means the close at the end generates an error. TTFN Paul -- "Some people will do anything for a woman in uniform" - The Doctor - Unregenerate (Big Finish audio) ___ Mono-devel-list mailing list Mono-devel-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-devel-list
RE: [Mono-devel-list] Hangs on System.IO.MonoIO:Write
Hi, > foreach (SearchResult lResult in lResults) > { > if (lResult.Properties["mail"] != null) > foreach (String item in > lResult.Properties["mail"]) > { > if > (item.IndexOf("wardandsmith.com") > 0) > > //Console.WriteLine(item); > > file.WriteLine(item.ToLower()); > } > } > } > catch (Exception exc) > { > Console.WriteLine("ERRNUM: " + exc.Message); > Console.WriteLine("ERRNUM: " + exc.InnerException); > Console.WriteLine("ERRNUM: " + exc.Source); > Console.WriteLine("ERRNUM: " + exc.StackTrace); > } > file.Close(); > } > > > The very last line in the code is where the Close() call is. If you can > find anything wrong, I'd be very grateful! By the looks of it, the problem is the read routine more than anything as it looks like you may be reading past the end of the file which means the close at the end generates an error. TTFN Paul -- "Some people will do anything for a woman in uniform" - The Doctor - Unregenerate (Big Finish audio) signature.asc Description: This is a digitally signed message part ___ Mono-devel-list mailing list Mono-devel-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-devel-list
RE: [Mono-devel-list] Hangs on System.IO.MonoIO:Write
static void Main(string[] args) { if (args[0] == null) { Console.WriteLine("No filename specified!"); return; } ArrayList items = new ArrayList(); System.IO.StreamWriter file = new System.IO.StreamWriter(args[0], false); try { // Connect via LDAP String LDAPPath = (LDAP PATH HERE); DirectoryEntry lRoot = new DirectoryEntry(LDAPPath, (USERNAME HERE), (PASSWORD HERE)); DirectorySearcher lSearcher = new DirectorySearcher(lRoot); SearchResultCollection lResults = null; lSearcher.PropertiesToLoad.Add("mail"); lResults = lSearcher.FindAll(); foreach (SearchResult lResult in lResults) { if (lResult.Properties["mail"] != null) foreach (String item in lResult.Properties["mail"]) { if (item.IndexOf("wardandsmith.com") > 0) //Console.WriteLine(item); file.WriteLine(item.ToLower()); } } } catch (Exception exc) { Console.WriteLine("ERRNUM: " + exc.Message); Console.WriteLine("ERRNUM: " + exc.InnerException); Console.WriteLine("ERRNUM: " + exc.Source); Console.WriteLine("ERRNUM: " + exc.StackTrace); } file.Close(); } The very last line in the code is where the Close() call is. If you can find anything wrong, I'd be very grateful! -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Paul F. Johnson Sent: Monday, August 01, 2005 10:17 AM To: mono-devel Subject: Re: [Mono-devel-list] Hangs on System.IO.MonoIO:Write Hi, > I've got a C# app (developed & tested on WinXP) which writes an > ArrayList to a file, using a StreamWriter. The last line in the code > is the call to StreamWriter.Close(). 75% of the time, the code runs > flawlessly. Sporadically, though, it hangs on the call to > System.IO.MonoIO:Write(). When I run mono with the "-v" parameter, > here's what I get (I'm only showing the parts before/after the hang): Any chance of a looksee at some code? Last time I had something like this, I somehow managed to screw things up and overwrite part of the stack! TTFN Paul -- "Some people will do anything for a woman in uniform" - The Doctor - Unregenerate (Big Finish audio) ___ Mono-devel-list mailing list Mono-devel-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-devel-list ___ Mono-devel-list mailing list Mono-devel-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-devel-list
[Mono-devel-list] Patch for System.Data/XmlSchemaDataImporter.cs
Hello all, Attached is a test case and proposed patch for System.Data/XmlSchemaDataImporter.cs : Data relations should be processes after the keys, so no redundant constraints created while relations processing. Boris XmlSchemaDataImporter.patch Description: XmlSchemaDataImporter.patch ___ Mono-devel-list mailing list Mono-devel-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-devel-list
Re: [Mono-devel-list] Hangs on System.IO.MonoIO:Write
Hi, > I've got a C# app (developed & tested on WinXP) which writes an > ArrayList to a file, using a StreamWriter. The last line in the code > is the call to StreamWriter.Close(). 75% of the time, the code runs > flawlessly. Sporadically, though, it hangs on the call to > System.IO.MonoIO:Write(). When I run mono with the "-v" parameter, > here's what I get (I'm only showing the parts before/after the hang): Any chance of a looksee at some code? Last time I had something like this, I somehow managed to screw things up and overwrite part of the stack! TTFN Paul -- "Some people will do anything for a woman in uniform" - The Doctor - Unregenerate (Big Finish audio) ___ Mono-devel-list mailing list Mono-devel-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-devel-list
[Mono-devel-list] Hangs on System.IO.MonoIO:Write
I've got a C# app (developed & tested on WinXP) which writes an ArrayList to a file, using a StreamWriter. The last line in the code is the call to StreamWriter.Close(). 75% of the time, the code runs flawlessly. Sporadically, though, it hangs on the call to System.IO.MonoIO:Write(). When I run mono with the "-v" parameter, here's what I get (I'm only showing the parts before/after the hang): When it hangs, here's what I get- Method System.IO.FileStream:WriteSegment (byte[],int,int) emitted at 0x40e53418 to 0x40e53474 [emaillistgenerator.exe]Method System.IO.StreamWriter:Close () emitted at 0x40e53478 to 0x40e53492 [emaillistgenerator.exe]Method System.IO.StreamWriter:Dispose (bool) emitted at 0x40e53498 to 0x40e534ee [emaillistgenerator.exe]Method System.IO.StreamWriter:Flush () emitted at 0x40e534f0 to 0x40e5354c [emaillistgenerator.exe]Method (wrapper managed-to-native) System.IO.MonoIO:Seek (intptr,long,System.IO.SeekOrigin,System.IO.MonoIOError&) emitted at 0x40e53550 to 0x40e535c5 [emaillistgenerator.exe]Method (wrapper managed-to-native) System.IO.MonoIO:Write (intptr,byte[],int,int,System.IO.MonoIOError&) emitted at 0x40e535c8 to 0x40e5361c [emaillistgenerator.exe] (This is the end of the output) When it runs normal, here's what I get- Method System.IO.FileStream:WriteSegment (byte[],int,int) emitted at 0x40e53e90 to 0x40e53eec [emaillistgenerator.exe]Method System.IO.StreamWriter:Close () emitted at 0x40e53ef0 to 0x40e53f0a [emaillistgenerator.exe]Method System.IO.StreamWriter:Dispose (bool) emitted at 0x40e53f10 to 0x40e53f66 [emaillistgenerator.exe]Method System.IO.StreamWriter:Flush () emitted at 0x40e53f68 to 0x40e53fc4 [emaillistgenerator.exe]Method (wrapper managed-to-native) System.IO.MonoIO:Seek (intptr,long,System.IO.SeekOrigin,System.IO.MonoIOError&) emitted at 0x40e53fc8 to 0x40e5403d [emaillistgenerator.exe]Method (wrapper managed-to-native) System.IO.MonoIO:Write (intptr,byte[],int,int,System.IO.MonoIOError&) emitted at 0x40e54040 to 0x40e54094 [emaillistgenerator.exe]Method System.ComponentModel.Component:Finalize () emitted at 0x40e54098 to 0x40e540c5 [emaillistgenerator.exe]Method System.DirectoryServices.DirectoryEntry:Dispose (bool) emitted at 0x40e540c8 to 0x40e540f1 [emaillistgenerator.exe]Method System.EventArgs:.cctor () emitted at 0x40e54108 to 0x40e5412d [emaillistgenerator.exe] (More output after this, but I omitted it) Can anyone help figure out why it's hanging? I've tried doing a Flush() on the StreamWriter before the close, but it doesn't make a difference. I am using Mono 1.1.8.2. Thanks!!! ___ Mono-devel-list mailing list Mono-devel-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-devel-list
RE: [Mono-devel-list] new rectangle tests and patch for fixing them
Sorry, I missed a couple of methods to test in both Rectangle and RectangleF. I attach all patches here for convenience. RectangleF.patch Description: RectangleF.patch Rectangle.patch Description: Rectangle.patch TestRectangle.patch Description: TestRectangle.patch TestRectangleF.patch Description: TestRectangleF.patch ___ Mono-devel-list mailing list Mono-devel-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-devel-list
RE: [Mono-devel-list] new rectangle tests and patch for fixing them
Similar tests and fixes for RectangleF. In addition to what happened in Rectangle, RectangleF had funny bug caused by using same name for parameter and member variable (width and height). RectangleF.patch Description: RectangleF.patch TestRectangleF.patch Description: TestRectangleF.patch ___ Mono-devel-list mailing list Mono-devel-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-devel-list
RE: [Mono-devel-list] new rectangle tests and patch for fixing them
Forgotten testcase added and more elegant fix. Please use these patches instead of previous. TestRectangle.patch Description: TestRectangle.patch Rectangle.patch Description: Rectangle.patch ___ Mono-devel-list mailing list Mono-devel-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-devel-list
Re: [Mono-devel-list] Serializing widgets with C#
Alfredo Jose Muela Romero wrote: El Sun, 31 Jul 2005 17:48:21 -0700 Rafael Ferreira <[EMAIL PROTECTED]> escribió: Crazy question but can you explain to me why would you want to do that? Sure. The point is that I'm developing a program in which the GUI is generated dinamically (i.e. widgets come and go with the user interaction) so one of my business classes contains an array of Gtk.Widgets (the ones which are added to the interface). So, somehow, I need to keep this info for the next restarting of the program (in order to keep the interface as the user wanted before stopping the program). At this point the choices were: 1) Back-up the object at a OODB 2) Back-up the data at tables in a RDB 3) Make a config file where I put the needed info to reconstruct the objects (with the widgets) at starting time 4) Serialize the objects before stopping the program and deserialize them at starting. And, well, you know my choice. Any suggestions and/or advices will be welcomed. Alfredo. - raf On Sun, 2005-07-31 at 19:46 +0200, Alfredo Jose Muela Romero wrote: Hi everybody, I'm new to this list, I have look up the answer to my question trough the list's files but I haven't found it so I'll make it: how can I make it to serialize an object which contains an array of Gtk.Widgets since for serializing I need to mark the classes with [Serializable]? In other words, how can I serialize an object with 3rd party objects whithin? Thanks in advance, Alfredo. ___ Mono-devel-list mailing list Mono-devel-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-devel-list ___ Mono-devel-list mailing list Mono-devel-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-devel-list ___ Mono-devel-list mailing list Mono-devel-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-devel-list What you're trying to accomplish is impossible. first because gtk widgets are not serializable and secondly, it just sounds like a bad idea all together :-). In order for you to serialize an array of anything the entire object graph needs to be serializable, so if you wrap a gtk widget in a class that is ISerializable, it will still fail since the widget isn't. I suggest you look into Monodevelop's settings code to get a sense of how MD is persisting the user UI preferences and reconfiguring it at start up. my 2 cents, - raf ___ Mono-devel-list mailing list Mono-devel-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-devel-list
SOLVED: Re: [Mono-devel-list] Patch for generating debug info in System.Reflection.Emit
On 7/28/05, Rodrigo B. de Oliveira <[EMAIL PROTECTED]> wrote: > On 7/28/05, Rodrigo B. de Oliveira <[EMAIL PROTECTED]> wrote: > > ... > > I'm getting off-by-one errors only with raise/throw statements: > > > > The behavior is actually a little more complex but still predictable. > The stack trace entry for the raise line is always the line of the > next statement in the same method: > The workaround was to emit debugging information again for a Nop just after the raise statement. Now the lines are reported correctly in both runtimes. -- bamboo http://blogs.codehaus.org/people/bamboo/ Got objects? http://www.db4o.com/ ___ Mono-devel-list mailing list Mono-devel-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-devel-list
[Mono-devel-list] new rectangle tests and patch for fixing them
Those tests now cover 100% of Rectangle API. The fix is a trivial one - in Intersects method when computing new Width, it was affected by new value of X, so Width was calculated incorrectly. Rectangle.patch Description: Rectangle.patch TestRectangle.patch Description: TestRectangle.patch ___ Mono-devel-list mailing list Mono-devel-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-devel-list
Re: [Mono-devel-list] Regression in Soap serialization
I forgot to commit one change in corlib. It should be fixed now. Thanks! Lluis. El dl 01 de 08 del 2005 a les 13:18 +0200, en/na Kamil Skalski va escriure: > This patch > http://lists.ximian.com/pipermail/mono-patches/2005-July/061773.html > caused regression in serialization example from > > http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfsystemnonserializedattributeclasstopic.asp > > using System; > using System.IO; > using System.Runtime.Serialization; > using System.Runtime.Serialization.Formatters.Soap; > //using System.Runtime.Serialization.Formatters.Binary; > > public class Test { >public static void Main() { > > //Creates a new TestSimpleObject object. > TestSimpleObject obj = new TestSimpleObject(); > > Console.WriteLine("Before serialization the object contains: "); > obj.Print(); > > //Opens a file and serializes the object into it in binary format. > Stream stream = File.Open("data.xml", FileMode.Create); > SoapFormatter formatter = new SoapFormatter(); > > //BinaryFormatter formatter = new BinaryFormatter(); > > formatter.Serialize(stream, obj); > stream.Close(); > > //Empties obj. > obj = null; > > //Opens file "data.xml" and deserializes the object from it. > stream = File.Open("data.xml", FileMode.Open); > formatter = new SoapFormatter(); > > //formatter = new BinaryFormatter(); > > obj = (TestSimpleObject)formatter.Deserialize(stream); > stream.Close(); > > Console.WriteLine(""); > Console.WriteLine("After deserialization the object contains: "); > obj.Print(); >} > } > > > // A test object that needs to be serialized. > [Serializable()] > public class TestSimpleObject { > > public int member1; > public string member2; > public string member3; > public double member4; > > // A field that is not serialized. > [NonSerialized()] public string member5; > > public TestSimpleObject() { > > member1 = 11; > member2 = "hello"; > member3 = "hello"; > member4 = 3.14159265; > member5 = "hello world!"; > } > > > public void Print() { > > Console.WriteLine("member1 = '{0}'", member1); > Console.WriteLine("member2 = '{0}'", member2); > Console.WriteLine("member3 = '{0}'", member3); > Console.WriteLine("member4 = '{0}'", member4); > Console.WriteLine("member5 = '{0}'", member5); > } > } > > > gives exception > > Unhandled Exception: System.TypeInitializationException: An exception > was thrown by the type initializer for > System.Runtime.Serialization.Formatters.Soap.SoapTypeMapper ---> > System.ArgumentException: Key duplication when adding: > nonPositiveInteger http://www.w3.org/2001/XMLSchema > in <0x001d0> System.Collections.Hashtable:PutImpl (System.Object key, > System.Object value, Boolean overwrite) > in <0x00012> System.Collections.Hashtable:Add (System.Object key, > System.Object value) > in <0x00064> > System.Runtime.Serialization.Formatters.Soap.SoapTypeMapper:RegisterType > (System.Type type, System.String name, System.String namspace, Boolean > reverseMap) > in <0x00060> > System.Runtime.Serialization.Formatters.Soap.SoapTypeMapper:RegisterType > (System.Type type) > in <0x002e9> > System.Runtime.Serialization.Formatters.Soap.SoapTypeMapper:InitMappingTables > () > in <0x0011b> > System.Runtime.Serialization.Formatters.Soap.SoapTypeMapper:.cctor > ()--- End of inner exception stack trace --- > > in <0x0> > in <0x000c5> > System.Runtime.Serialization.Formatters.Soap.SoapFormatter:Serialize > (System.IO.Stream serializationStream, System.Objectgraph, > System.Runtime.Remoting.Messaging.Header[] headers) > in <0x00015> > System.Runtime.Serialization.Formatters.Soap.SoapFormatter:Serialize > (System.IO.Stream serializationStream, System.Objectgraph) > in <0x00071> Test:Main () > ___ Mono-devel-list mailing list Mono-devel-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-devel-list
[Mono-devel-list] Regression in Soap serialization
This patch http://lists.ximian.com/pipermail/mono-patches/2005-July/061773.html caused regression in serialization example from http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfsystemnonserializedattributeclasstopic.asp using System; using System.IO; using System.Runtime.Serialization; using System.Runtime.Serialization.Formatters.Soap; //using System.Runtime.Serialization.Formatters.Binary; public class Test { public static void Main() { //Creates a new TestSimpleObject object. TestSimpleObject obj = new TestSimpleObject(); Console.WriteLine("Before serialization the object contains: "); obj.Print(); //Opens a file and serializes the object into it in binary format. Stream stream = File.Open("data.xml", FileMode.Create); SoapFormatter formatter = new SoapFormatter(); //BinaryFormatter formatter = new BinaryFormatter(); formatter.Serialize(stream, obj); stream.Close(); //Empties obj. obj = null; //Opens file "data.xml" and deserializes the object from it. stream = File.Open("data.xml", FileMode.Open); formatter = new SoapFormatter(); //formatter = new BinaryFormatter(); obj = (TestSimpleObject)formatter.Deserialize(stream); stream.Close(); Console.WriteLine(""); Console.WriteLine("After deserialization the object contains: "); obj.Print(); } } // A test object that needs to be serialized. [Serializable()] public class TestSimpleObject { public int member1; public string member2; public string member3; public double member4; // A field that is not serialized. [NonSerialized()] public string member5; public TestSimpleObject() { member1 = 11; member2 = "hello"; member3 = "hello"; member4 = 3.14159265; member5 = "hello world!"; } public void Print() { Console.WriteLine("member1 = '{0}'", member1); Console.WriteLine("member2 = '{0}'", member2); Console.WriteLine("member3 = '{0}'", member3); Console.WriteLine("member4 = '{0}'", member4); Console.WriteLine("member5 = '{0}'", member5); } } gives exception Unhandled Exception: System.TypeInitializationException: An exception was thrown by the type initializer for System.Runtime.Serialization.Formatters.Soap.SoapTypeMapper ---> System.ArgumentException: Key duplication when adding: nonPositiveInteger http://www.w3.org/2001/XMLSchema in <0x001d0> System.Collections.Hashtable:PutImpl (System.Object key, System.Object value, Boolean overwrite) in <0x00012> System.Collections.Hashtable:Add (System.Object key, System.Object value) in <0x00064> System.Runtime.Serialization.Formatters.Soap.SoapTypeMapper:RegisterType (System.Type type, System.String name, System.String namspace, Boolean reverseMap) in <0x00060> System.Runtime.Serialization.Formatters.Soap.SoapTypeMapper:RegisterType (System.Type type) in <0x002e9> System.Runtime.Serialization.Formatters.Soap.SoapTypeMapper:InitMappingTables () in <0x0011b> System.Runtime.Serialization.Formatters.Soap.SoapTypeMapper:.cctor ()--- End of inner exception stack trace --- in <0x0> in <0x000c5> System.Runtime.Serialization.Formatters.Soap.SoapFormatter:Serialize (System.IO.Stream serializationStream, System.Objectgraph, System.Runtime.Remoting.Messaging.Header[] headers) in <0x00015> System.Runtime.Serialization.Formatters.Soap.SoapFormatter:Serialize (System.IO.Stream serializationStream, System.Objectgraph) in <0x00071> Test:Main () -- Kamil Skalski http://nazgul.omega.pl ___ Mono-devel-list mailing list Mono-devel-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-devel-list
RE: [Mono-devel-list] More tests and fixes for them
I'm wondering the same thing. There will be many places with weird dotnet behavior in sys.drawing, we need to decide how to deal with them. And how to write tests for places where we decide to have different behavior? Andrew. From: Hugo Ferreira [mailto:[EMAIL PROTECTED] Sent: Monday, August 01, 2005 13:32 To: Andrew Skiba Subject: Re: [Mono-devel-list] More tests and fixes for them Heya there, I'm wondering... Should we stick so close to MSFT idiosyncrasies? I mean, for example, if the GetHashCode() for PointF ignores the Y value, shouldn't we make it more correct (and possibly increase performance when using Data Structures that take advantage of hashes)? Same goes with coherence. If the ToString() of two similar structures is different, why not make it the right way? Unless it breakes code, of course, though I don't see those two functions as code-breaking (correct me if I'm wrong). ___ Mono-devel-list mailing list Mono-devel-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-devel-list
[Mono-devel-list] More tests and fixes for them
Please review the attached tests and fixes for them. I know the fixes look weird, but that's what dot net appear to do in their sys.drawing. PointF.ToString returns string with space, while Point.ToString returns without space. And the hash code for PointF seem to ignore the y value. MoreTests.patch Description: MoreTests.patch Point.patch Description: Point.patch ___ Mono-devel-list mailing list Mono-devel-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-devel-list
[Mono-devel-list] MonoDevelop autopackage to play with
Hi, I sent this message a few days ago, but it never got through. It's incomplete, but should give the general idea: http://plan99.net/~mike/files/monodevelop-0.7.x86.package To use it, download and run it. I don't think anybody here will need it, but: http://autopackage.org/docs/howto-install/ It expects the Mono runtime to be in your PATH, and that's about it. Currently there are no checks for GTK# or anything like that. It would not be hard to add them in though. Let me know what you guys think - if there are any Mono app developers out there who would like to experiment with releasing their software as an autopackage please let me know, and we'll be happy to get you started. thanks -mike ___ Mono-devel-list mailing list Mono-devel-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-devel-list
[Mono-devel-list] Mainsoft branch for System.Drawing
Hello. We are going to implement a big part of System.Drawing for JVM. While majority of the code will be java-specific, I expect some changes to shared code, too. So the question is - can I create a branch to perform this development in svn? After we get to some stable point I will create patches for shared code and mail them to the devlist, so those changes can be merged into trunk. Thank you. Andrew. ___ Mono-devel-list mailing list Mono-devel-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-devel-list
RE: [Mono-devel-list] Services and eventlogs
Hello Casper, > -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf > Of Casper Hornstrup > > My application has two services. How do you register the > services on Mono/Linux? I'm looking for the equivalent of > installutil.exe on Windows. There is no such tool on Linux. You can run your services using mono-service. Please see the man page for its options. Currently it is not possible to start two services from one EXE. You have to run mono-service twice to get both services. > My application does its logging using the eventlog APIs. I > cannot figure out where the eventlog entries are stored on > Mono/Linux. Where are they stored? My application write only > plaintext to the eventlog, not binary data. The last time I've checked eventlog wasn't implemented. There was some discussion about sending it to syslog (var/log/messages) but I don't know if someone implemented this. Joerg. ___ Mono-devel-list mailing list Mono-devel-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-devel-list