Re: [Mono-dev] Config file w/ mkbundle

2007-12-20 Thread Torello Querci
Hi Ricardo,

I make some test at the beginning of November about this.
Unfortunately seems not work. I talk with Atsuschi and he tell me that
this problem is now fixed but I not make any test, sorry.

Best Regards,
Torello Querci

2007/12/19, Ricardo Ruiz [EMAIL PROTECTED]:
 I wish to use a config file with a bundled app... how is that done? How
 is the config file named? Can the config file be bundled?

 For example, if the original app is original.exe and the bundled app is
 bundled.exe, what should the config file be named?

 Thanks!!

 Ricardo Ruiz, Development
 Ignite Technologies
 3211 Internet Blvd., Suite 300
 Frisco, Texas 75034
 Phone - 972.348.6429
 [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 mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


Re: [Mono-dev] [Patch] NameObjectCollectionBase, HttpCookieCollection

2007-12-20 Thread Juraj Skripsky
Hi Gert,

I'm attaching my patches, updated as per your suggestions.

- Juraj


On Thu, 2007-12-20 at 10:06 +0100, Gert Driesen wrote:
 Hi Juraj,
 
 I'd advise against using ExpectedException when multiple calls are made in
 the test, as this may lead to false positives.
 
 For example:
 
   [Test]
   [ExpectedException (typeof (ArgumentException))]
   public void CopyTo_NotEnoughSpace () 
   {
   string [] array = new string [4];
   UnitTestNameObjectCollectionBase c = new
 UnitTestNameObjectCollectionBase ();
   c.Add (1, mono);
   c.Add (2, MoNo);
   c.Add (3, mOnO);
   c.Add (4, MONO);
   ((ICollection)c).CopyTo (array, 2);
   }
 
 If any of the Add methods would lead to an ArgumentException, the test would
 pass although you explicitly wanted to check if CopyTo resulted in an
 ArgumentException.
 
 I would advise the following code (which is more bloated, yes):
 
   [Test]
   public void CopyTo_NotEnoughSpace () 
   {
   string [] array = new string [4];
   UnitTestNameObjectCollectionBase c = new
 UnitTestNameObjectCollectionBase ();
   c.Add (1, mono);
   c.Add (2, MoNo);
   c.Add (3, mOnO);
   c.Add (4, MONO);
   try {
   ((ICollection)c).CopyTo (array, 2);
   Assert.Fail (#1);
   } catch (ArgumentException ex) {
   Assert.AreEqual (typeof (ArgumentException),
 ex.GetType (), #2);
   Assert.IsNull (ex.InnerException, #3);
   Assert.IsNotNull (ex.Message, #4);
   Assert.IsNull (ex.ParamName, #5);
   }
   }
 
 This also allows you to perform additional checks (eg. was there an inner
 exception?).
 
 Gert
 
 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED] On Behalf Of Juraj
 Skripsky
 Sent: woensdag 19 december 2007 11:27
 To: mono-devel-list@lists.ximian.com
 Subject: [Mono-dev] [Patch] NameObjectCollectionBase, HttpCookieCollection
 
 Hello,
 
 Attached are three small patches for NameObjectCollectionBase.cs,
 NameObjectCollectionBaseTest.cs and HttpCookieCollection.cs.
 
 All unit tests pass on Mono. Could someone verify that the new unit tests
 work on MS.NET?
 
 May I commit?
 
 - Juraj
 
Index: System.Web/System.Web/ChangeLog
===
--- System.Web/System.Web/ChangeLog	(revision 91583)
+++ System.Web/System.Web/ChangeLog	(working copy)
@@ -1,3 +1,7 @@
+2007-12-19  Juraj Skripsky [EMAIL PROTECTED]
+
+	* HttpCookieCollection.cs (AllKeys): Use Keys.CopyTo().
+
 2007-12-18  Miguel de Icaza  [EMAIL PROTECTED]
 
 	* HttpCookieCollection.cs (Get): implement using the indexer to
Index: System.Web/System.Web/HttpCookieCollection.cs
===
--- System.Web/System.Web/HttpCookieCollection.cs	(revision 91583)
+++ System.Web/System.Web/HttpCookieCollection.cs	(working copy)
@@ -28,6 +28,7 @@
 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 //
 
+using System.Collections;
 using System.Collections.Specialized;
 using System.Security.Permissions;
 
@@ -161,13 +162,8 @@
 
 		public string[] AllKeys {
 			get {
-/* XXX another inefficient copy due to
- * lack of exposure from the base
- * class */
 string[] keys = new string [Keys.Count];
-for (int i = 0; i  Keys.Count; i ++)
-	keys[i] = Keys[i];
-
+((ICollection)Keys).CopyTo (keys, 0);
 return keys;
 			}
 		}
Index: System/System.Collections.Specialized/NameObjectCollectionBase.cs
===
--- System/System.Collections.Specialized/NameObjectCollectionBase.cs	(revision 91612)
+++ System/System.Collections.Specialized/NameObjectCollectionBase.cs	(working copy)
@@ -101,7 +101,7 @@
 			}
 			public bool MoveNext()
 			{
-return ((++m_position)m_collection.Count)?true:false;
+return ((++m_position)  m_collection.Count);
 			}
 			public void Reset()
 			{
@@ -128,17 +128,26 @@
 			}
 			
 			// ICollection methods ---
-			void ICollection.CopyTo(Array arr, int index)
+			void ICollection.CopyTo (Array array, int arrayIndex)
 			{
-if (arr==null)
-	throw new ArgumentNullException(array can't be null);
-IEnumerator en = this.GetEnumerator();
-int i = index;
-while (en.MoveNext())
-{
-	arr.SetValue(en.Current,i);
-	i++;
-}			
+if (null == array)
+	throw new ArgumentNullException (array);
+	
+if (arrayIndex  0)
+	throw new ArgumentOutOfRangeException (arrayIndex);
+	
+if (array.Rank  1)
+	throw new ArgumentException (array is multidimensional, array);
+	
+if ((array.Length  0)  (arrayIndex = array.Length))
+	throw new ArgumentException (arrayIndex is equal to 

[Mono-dev] getting Error while compileing Mono-1-2.4

2007-12-20 Thread Sanjay Tripathi
Please,

   Help me out form this. I'm getting error while I'm
compiling the Mono-1.2.4 on solaris box.

 

 

gmake[3]: Entering directory `/usr/local/mono-1.2.6/mcs'

gmake profile-do--default--all profile-do--net_2_0--all

gmake[4]: Entering directory `/usr/local/mono-1.2.6/mcs'

gmake PROFILE=basic all

gmake[5]: Entering directory `/usr/local/mono-1.2.6/mcs'

GC Warning: Large stack limit(10485760): only scanning 8 MB

gmake[6]: Entering directory `/usr/local/mono-1.2.6/mcs/build'

gmake all-local

gmake[7]: Entering directory `/usr/local/mono-1.2.6/mcs/build'

test -n ''

gmake[7]: *** [common/Consts.cs] Error 1

gmake[7]: Leaving directory `/usr/local/mono-1.2.6/mcs/build'

gmake[6]: *** [do-all] Error 2

gmake[6]: Leaving directory `/usr/local/mono-1.2.6/mcs/build'

gmake[5]: *** [all-recursive] Error 1

gmake[5]: Leaving directory `/usr/local/mono-1.2.6/mcs'

gmake[4]: *** [profile-do--basic--all] Error 2

gmake[4]: Leaving directory `/usr/local/mono-1.2.6/mcs'

gmake[3]: *** [profiles-do--all] Error 2

gmake[3]: Leaving directory `/usr/local/mono-1.2.6/mcs'

gmake[2]: *** [all-local] Error 2

gmake[2]: Leaving directory `/usr/local/mono-1.2.6/runtime'

gmake[1]: *** [all-recursive] Error 1

gmake[1]: Leaving directory `/usr/local/mono-1.2.6'

gmake: *** [all] Error 2

 

--

 

Thanks

San

___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


[Mono-dev] Build Mono runtime under windows CE 5.0 or higher

2007-12-20 Thread Omri Azencot
Hello

I am intrested in building mono runtime under windows CE 5.0 and I
wonder if someone tried it already ?

I know about this guide: http://www.mono-project.com/Compiling_Mono_VSNET
for building mono under Visual Studio .NET 2005.

Another question is if I would want to convert myself the build
process into windows CE 5.0 from the VS8 win32 project, does someone
have any idea if it is possible at all? or should I encounter some
critical problems with the Windows libraries ?

thanks in advance

Azencot Omri
___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


Re: [Mono-dev] FW: [Bug 349875] DictionaryTKey, TValue stores values out of order.

2007-12-20 Thread Josh Mouch
I recall reading somewhere that when possible, mono will try to mimic the
behavior of .Net, to make it easier for people to migrate from the later to
the former.  I can't find that reference now, so maybe it's all in my head.
:)


-Original Message-
From: Juraj Skripsky [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, December 19, 2007 2:17 PM
To: Josh Mouch
Cc: mono-devel-list@lists.ximian.com
Subject: Re: FW: [Bug 349875] DictionaryTKey, TValue stores values out of
order.

Hi Josh,

Mono is support to follow the MS .net _design_ not the _implementation_.
If the docs don't state that you can depend on the order of the
elements, you shouldn't do so. I consider an app relying on this order
to be buggy.

- Juraj

PS: please always send a copy of such mails to the mailing lists. Others
might be interested.


On Wed, 2007-12-19 at 14:09 -0500, Josh Mouch wrote:
 Isn't mono supposed to mimic MS .Net behavior?
 
 Josh
 
 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
 Sent: Wednesday, December 19, 2007 2:07 PM
 To: [EMAIL PROTECTED]
 Subject: [Bug 349875] DictionaryTKey, TValue stores values out of order.
 
 https://bugzilla.novell.com/show_bug.cgi?id=349875
 
 User [EMAIL PROTECTED] added comment
 https://bugzilla.novell.com/show_bug.cgi?id=349875#c1
 
 
 Juraj Skripsky [EMAIL PROTECTED] changed:
 
What|Removed |Added


  CC|
|[EMAIL PROTECTED]
  Status|NEW
|RESOLVED
  Resolution|
|INVALID
 
 
 
 
 --- Comment #1 from Juraj Skripsky [EMAIL PROTECTED]  2007-12-19 12:06:33
MST ---
 According to MS.NET docs, this behavior is perfectly fine for the Values
 property (see
 http://msdn2.microsoft.com/en-us/library/ekcfxy3x.aspx):
 
 The order of the values in the Dictionary(Of (TKey,
 TValue))..::.ValueCollection is unspecified, but it is the same order as
the
 associated keys in the Dictionary(Of (TKey, TValue))..::.KeyCollection
 returned by the Keys property.
 
 As for the enumeration of the Dictionary'2 itself, the documentation does
not
 state a required ordering of the returned elements.
 
 Setting to resolved/fixed.
 Please reopen if the docs support your claim.
 
 

___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


[Mono-dev] [PATCH] Updated managed Marshal.Copy implemantations

2007-12-20 Thread Kornél Pál

Hi,

I have reworked the patch:
- added Array.GetElementSize
- added Array.GetOffsetToArrayData
- rename Object.obj_address to Object.UnsafeAddrOfPinnedObject that is 
static and I think is a more descriptive name for an internal method.


All of them are inlined by JID.

Modified Marshal.copy_to_unmanaged and Marshal.copy_from_unmanaged to be 
fully managed.


They are intended to be used from Marshal.Copy so I see no reason for rank 
check.


Also implemented Marshal.UnsafeAddrOfPinnedArrayElement fully in managed 
code.


I assume that object on the stack are pinned so I hope GC won't move or free 
the objects.


Please review this patch. If it's approved I'll implement Buffer class 
methods using managed code as well.


Kornél 


managed_copy.diff
Description: Binary data
___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


[Mono-dev] System.Diagnostics.PerformanceCounter.NextValue

2007-12-20 Thread matte
Im running mod_mono/1.2.4 and getting a
The requested feature is not implemented.
when trying to call System.Diagnostics.PerformanceCounter.NextValue() in a
method to return the uptime of the server.

Can anyone tell me if this is a problem with my local mono install being
out of date (im new at this), or if i can get the server uptime by some
other method.

Method works fine under my winxp machine.

___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


[Mono-dev] Mono Web service on 1.2.6

2007-12-20 Thread Gwyneth Morrison
Good Day,

This short program is being used to test a web service from mono to a 
windows server.



using System;
using System.Collections.Generic;
using System.Text;
using ConsoleApplication1.mywebservice;
using System.Data;

namespace ConsoleApplication1
{
class Program
{
static void Main(string[] args)
{
mywebservice.EnterpriseConfigWebService svc = new 
ConsoleApplication1.mywebservice.EnterpriseConfigWebService();
// GCM added ConsoleApplication1.mywebservice.
ConsoleApplication1.mywebservice.GetYourSiteDataResponse 
response=svc.GetYourSiteData(new 
ConsoleApplication1.mywebservice.GetYourSiteDataRequest());
DataRow row = 
response.Data.tblEnterpriseConfig_Enterprise.Rows[0];
Console.WriteLine(row[Name]);
}
}
}

=

The first thing you will notice by the comment is that I needed to 
prefix GetYourSiteDataResponse with the
name space etc even though it is declared above. This in not required in 
VS2005.

There are some other components generated by VS2005 but it all compiles 
and runs just fine under 1.2.5.
Upon updating to 1.2.6 we receive the following exception which appears 
to be much lower in the food
chain then the example program given (something has changed in the mono 
engine?)

==
Unhandled Exception: System.FormatException: Invalid format.
  at System.DateTime.ParseExact (System.String s, System.String[] 
formats, IFormatProvider fp, DateTimeStyles style) [0x0]
  at System.Xml.XmlConvert.ToDateTime (System.String s, System.String[] 
formats) [0x0]
  at System.Xml.XmlConvert.ToDateTime (System.String value, 
XmlDateTimeSerializationMode mode) [0x0]
  at System.Data.XmlDataLoader.StringToObject (System.Type type, 
System.String value) [0x0]
  at System.Data.XmlDiffLoader.LoadColumnChildren (System.Data.DataTable 
Table, System.Data.DataRow Row, System.Xml.XmlReader reader, 
DataRowVersion loadType) [0x0]
  at System.Data.XmlDiffLoader.LoadColumns (System.Data.DataTable Table, 
System.Data.DataRow Row, System.Xml.XmlReader reader, DataRowVersion 
loadType) [0x0]
  at System.Data.XmlDiffLoader.LoadCurrentTable (System.Data.DataTable 
Table, System.Xml.XmlReader reader) [0x0]
  at System.Data.XmlDiffLoader.LoadCurrent (System.Xml.XmlReader reader) 
[0x0]
  at System.Data.XmlDiffLoader.Load (System.Xml.XmlReader reader) [0x0]
  at System.Data.DataSet.ReadXml (System.Xml.XmlReader reader, 
XmlReadMode mode) [0x0]
  at System.Data.DataSet.ReadXml (System.Xml.XmlReader r) [0x0]
  at ConsoleApplication1.mywebservice.DSYourSite.ReadXmlSerializable 
(System.Xml.XmlReader reader) [0x0]
  at 
System.Data.DataSet.System.Xml.Serialization.IXmlSerializable.ReadXml 
(System.Xml.XmlReader reader) [0x0]
  at System.Xml.Serialization.XmlSerializationReader.ReadSerializable 
(IXmlSerializable serializable) [0x0]
  at 
System.Xml.Serialization.XmlSerializationReaderInterpreter.ReadObjectElement 
(System.Xml.Serialization.XmlTypeMapElementInfo elem) [0x0]
  at 
System.Xml.Serialization.XmlSerializationReaderInterpreter.ReadMembers 
(System.Xml.Serialization.ClassMap map, System.Object ob, Boolean 
isValueList, Boolean readByOrder) [0x0]
  at 
System.Xml.Serialization.XmlSerializationReaderInterpreter.ReadClassInstanceMembers
 
(System.Xml.Serialization.XmlTypeMapping typeMap, System.Object ob) 
[0x0]
  at 
System.Xml.Serialization.XmlSerializationReaderInterpreter.ReadClassInstance 
(System.Xml.Serialization.XmlTypeMapping typeMap, Boolean isNullable, 
Boolean checkType) [0x0]
  at 
System.Xml.Serialization.XmlSerializationReaderInterpreter.ReadObject 
(System.Xml.Serialization.XmlTypeMapping typeMap, Boolean isNullable, 
Boolean checkType) [0x0]
  at 
System.Xml.Serialization.XmlSerializationReaderInterpreter.ReadObjectElement 
(System.Xml.Serialization.XmlTypeMapElementInfo elem) [0x0]
  at 
System.Xml.Serialization.XmlSerializationReaderInterpreter.ReadMembers 
(System.Xml.Serialization.ClassMap map, System.Object ob, Boolean 
isValueList, Boolean readByOrder) [0x0]
  at 
System.Xml.Serialization.XmlSerializationReaderInterpreter.ReadMessage 
(System.Xml.Serialization.XmlMembersMapping typeMap) [0x0]
  at System.Xml.Serialization.XmlSerializationReaderInterpreter.ReadRoot 
() [0x0]
  at System.Xml.Serialization.XmlSerializer.Deserialize 
(System.Xml.Serialization.XmlSerializationReader reader) [0x0]

Any suggestions?

Thank you

Gwyneth
___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


Re: [Mono-dev] mono/mini/driver.c patch for RHEL3 compatability

2007-12-20 Thread Paolo Molaro
On 12/19/07 C.J. Adams-Collier wrote:
 Zoltan asked that I make a change to configure.in as well, but I wanted
 to send this before I forgot about it.

The configure.in change is what is more important as you need to make
sure you won't break the correct systems in your quest for supporting
an old and broken distribution.

 --- mono/mini/driver.c  2007-12-19 15:04:53.0 -0800
 +++ mono/mini/patched-driver.c  2007-12-19 15:05:20.0 -0800
 @@ -706,8 +706,16 @@
  
  #if HAVE_SCHED_SETAFFINITY
 if (getenv (MONO_NO_SMP)) {
 +#  ifdef GLIBC_RHEL3_SCHED_SETAFFINITY

Use HAVE_BROKEN_SCHED_SETAFFINITY here.

lupus

-- 
-
[EMAIL PROTECTED] debian/rules
[EMAIL PROTECTED] Monkeys do it better
___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


Re: [Mono-dev] 1.2.6: threads.h

2007-12-20 Thread Paolo Molaro
On 12/14/07 Sebastian Good wrote:
 I am compiling an embedding library which #includes 
 mono/metadata/threads.h, however in 1.2.6 this file does not compile 
 cleanly. threads.h apparently further includes 
 mono/metadata/threads-types.h, which is no longer shipped with mono. 
 Commenting out lines 70-72 (which reference the MonoThreadState class) 
 solves the problem. Trivial programs seem to run fine, though I am not sure 
 if there are any further knock-on effects. (I am currently compiling with 
 the Windows version of Mono 1.2.6)

This is fixed in svn: in the mean time just remove the 2-3 functions
from your copy of the threads.h header file.

lupus

-- 
-
[EMAIL PROTECTED] debian/rules
[EMAIL PROTECTED] Monkeys do it better
___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


Re: [Mono-dev] [PATCH] Managed Marshal.Copy implemantations

2007-12-20 Thread Paolo Molaro
On 12/17/07 Kornél Pál wrote:
 (for example the original C implementation has a bug and
 in your code it's duplicated several times)
 
 What is that bug?

Integer overflow when doing the array range check.

 and you also managed to hide
 the assignment of a local var inside of a conditional expression.
 
 Is that a bad practice?

Yes, there is no reason to try to hide code.

 Your code also omits a check that the current code does of the rank of
 the array.
 
 I don't see any reason for that check because as far as I know byte[,] for 
 example cannot be casted to byte[]. Did I miss something?

It's an extra check because the shared methods will have Array as the
type and they could be misused.

 My only problem is that I don't know how could I effectively obtain a pinned 
 pointer to a managed object (currently Array) using C#. Do you have a good 
 idea?

Until we support precise stack scanning in the GC it's not an issue
and you can use a simple IntPtr. When we'll add that support, the JIT
will be changed to insert an explicit pinning pointer local variable
to store the result of the new internal call.

lupus

-- 
-
[EMAIL PROTECTED] debian/rules
[EMAIL PROTECTED] Monkeys do it better
___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


Re: [Mono-dev] mono/mini/driver.c patch for RHEL3 compatability

2007-12-20 Thread Paolo Molaro
On 12/20/07 C S Vadiraj wrote:
  --- mono/mini/driver.c  2007-12-19 15:04:53.0 -0800
  +++ mono/mini/patched-driver.c  2007-12-19 15:05:20.0 -0800
  @@ -706,8 +706,16 @@
   
   #if HAVE_SCHED_SETAFFINITY
  if (getenv (MONO_NO_SMP)) {
  +#  ifdef GLIBC_RHEL3_SCHED_SETAFFINITY
  +cpu_set_t proc_mask;
  +CPU_ZERO(proc_mask);
  +CPU_SET(0, proc_mask);
  +
  +sched_setaffinity (getpid(), proc_mask);
 
 You sure sched_setaffinity takes only two parameters. I feel the issue is not 
 in here but in 
 glibc.

Older Red Hat shipped with a broken sched_setaffinity() interface.

lupus

-- 
-
[EMAIL PROTECTED] debian/rules
[EMAIL PROTECTED] Monkeys do it better
___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


[Mono-dev] [Patch] System.Web.UI.Page.cs

2007-12-20 Thread Igor Zelmanovich
Attached patch is refactoring only.

It splits method such InternalProcessRequest to several methods.

It is required for implementing alternative hosting under TARGET_J2EE.

Please review.


Regards,
Igor Zelmanovich.

[EMAIL PROTECTED] 

___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


[Mono-dev] [Patch] System.Web.UI.Page.cs

2007-12-20 Thread Igor Zelmanovich
Attached patch is refactoring only.

It splits method such InternalProcessRequest to several methods.

It is required for implementing alternative hosting under TARGET_J2EE.

Please review.


Regards,
Igor Zelmanovich.

[EMAIL PROTECTED] 



Page.patch
Description: Page.patch
___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


Re: [Mono-dev] [Patch] System.Web.UI.Page.cs

2007-12-20 Thread Marek Habersack
On Thu, 20 Dec 2007 04:08:02 -0800, Igor Zelmanovich [EMAIL PROTECTED]
scribbled:

 Attached patch is refactoring only.
 
 It splits method such InternalProcessRequest to several methods.
 
 It is required for implementing alternative hosting under TARGET_J2EE.
 
 Please review.
Please commit, thanks!

best regards,

marek


signature.asc
Description: PGP signature
___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


Re: [Mono-dev] Mono.Addins in Monodoc

2007-12-20 Thread Mario Sopena Novales
Hi,

On 19/12/2007, Miguel de Icaza [EMAIL PROTECTED] wrote:

   * Editing in the ECMA provider is hard, but Mike has a plan for
 that.
  Is there any doc or something we could review?

 No, we only spoke on the phone about it.

 The idea is that Mike wants to switch to use GtkTextView to render the
 documentation, and at the same time, this would allow us to implement
 editing very easily.

 Am not sure how you can block certain sections from being edited, but am
 sure it can be done.

I'm not sure this is a good idea because you will end up with two
paths to render the documentation: the GtkTextView and the Html
(because you will still maintain the web version). And I think the
GtkTextView approach is costly to develop and at the end you will not
get so much benefits from it.

Wouldn't it be better to go only web but improve it to being able to
edit/search/etc.. and do that also offline? This will left us only
with one frontend to worry about.




  This is in some way (maybe not much, I dont have the numbers but just
  an impression) affected by the fact that in monodoc is hard to see how
  the contribution gets back to the contributor. The process is slow.
  I mean, the user cannot install new documentation (only installing a
  new monodoc and that is slow specially if it comes packaged in the
  distro) and the process to review/approve/publish new doc is also
  slow, making at the end that the contributor feels his contributions
  gets lost in the limbo (well, at least, that was what I was told
  several times). The way we have it now discourages contributions.

 Correct, there are many things that we could do to improve the pipeline
 for new documentation.   Some of those ideas are also required for the
 Web edition of Monodoc.

 Having a hammer does not mean that everything is a nail, and for the
 case of documentation updating we should not start with We have
 Mono.Addins, now how do we do updates with it.

 Instead we should be thinking about creating the proper pipeline for
 documentation: what does it look like, what is the process, and then
 implement it.

 If the implementation would benefit from Mono.Addins, that is fine, but
 it should not be the driving force for it.

 Miguel

___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


Re: [Mono-dev] [PATCH] Managed Marshal.Copy implemantations

2007-12-20 Thread Kornél Pál

Attached an update patch to this message.

Please see the comments in
http://lists.ximian.com/pipermail/mono-devel-list/2007-December/026200.html



What is that bug?

Integer overflow when doing the array range check.


Thanks for pointing this out, I believed that my checks were correct but now 
I realized that my version is still insufficient.


I don't see any reason for that check because as far as I know byte[,] 
for

example cannot be casted to byte[]. Did I miss something?

It's an extra check because the shared methods will have Array as the
type and they could be misused.


They are private so I prefer not to be used anywhere else than extra checks. 
(I added comments before these methods about that.)



Until we support precise stack scanning in the GC it's not an issue
and you can use a simple IntPtr. When we'll add that support, the JIT
will be changed to insert an explicit pinning pointer local variable
to store the result of the new internal call.


OK, thanks for the explanation, now I understand how this works.

Kornél 


managed_copy.diff
Description: Binary data
___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


Re: [Mono-dev] FW: [Bug 349875] DictionaryTKey, TValue stores values out of order.

2007-12-20 Thread Zoltan Varga
Hi,

  We do try to mimic MS behaviour but this case is hard to solve, as
what seems to
be the MS behaviour is probably just an accident due to their implementation of
GetHashCode.

Zoltan

On Dec 19, 2007 8:40 PM, Josh Mouch [EMAIL PROTECTED] wrote:
 I recall reading somewhere that when possible, mono will try to mimic the
 behavior of .Net, to make it easier for people to migrate from the later to
 the former.  I can't find that reference now, so maybe it's all in my head.
 :)


 -Original Message-
 From: Juraj Skripsky [mailto:[EMAIL PROTECTED]
 Sent: Wednesday, December 19, 2007 2:17 PM
 To: Josh Mouch
 Cc: mono-devel-list@lists.ximian.com
 Subject: Re: FW: [Bug 349875] DictionaryTKey, TValue stores values out of
 order.

 Hi Josh,

 Mono is support to follow the MS .net _design_ not the _implementation_.
 If the docs don't state that you can depend on the order of the
 elements, you shouldn't do so. I consider an app relying on this order
 to be buggy.

 - Juraj

 PS: please always send a copy of such mails to the mailing lists. Others
 might be interested.


 On Wed, 2007-12-19 at 14:09 -0500, Josh Mouch wrote:
  Isn't mono supposed to mimic MS .Net behavior?
 
  Josh
 
  -Original Message-
  From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
  Sent: Wednesday, December 19, 2007 2:07 PM
  To: [EMAIL PROTECTED]
  Subject: [Bug 349875] DictionaryTKey, TValue stores values out of order.
 
  https://bugzilla.novell.com/show_bug.cgi?id=349875
 
  User [EMAIL PROTECTED] added comment
  https://bugzilla.novell.com/show_bug.cgi?id=349875#c1
 
 
  Juraj Skripsky [EMAIL PROTECTED] changed:
 
 What|Removed |Added
 
 
   CC|
 |[EMAIL PROTECTED]
   Status|NEW
 |RESOLVED
   Resolution|
 |INVALID
 
 
 
 
  --- Comment #1 from Juraj Skripsky [EMAIL PROTECTED]  2007-12-19 12:06:33
 MST ---
  According to MS.NET docs, this behavior is perfectly fine for the Values
  property (see
  http://msdn2.microsoft.com/en-us/library/ekcfxy3x.aspx):
 
  The order of the values in the Dictionary(Of (TKey,
  TValue))..::.ValueCollection is unspecified, but it is the same order as
 the
  associated keys in the Dictionary(Of (TKey, TValue))..::.KeyCollection
  returned by the Keys property.
 
  As for the enumeration of the Dictionary'2 itself, the documentation does
 not
  state a required ordering of the returned elements.
 
  Setting to resolved/fixed.
  Please reopen if the docs support your claim.
 
 

 ___
 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-dev] Mono.Addins in Monodoc

2007-12-20 Thread Lluis Sanchez
Hi!

El dc 19 de 12 del 2007 a les 12:36 -0500, en/na Miguel de Icaza va
escriure: 
   * Editing in the ECMA provider is hard, but Mike has a plan for
 that.
  Is there any doc or something we could review?
 
 No, we only spoke on the phone about it.
 
 The idea is that Mike wants to switch to use GtkTextView to render the
 documentation, and at the same time, this would allow us to implement
 editing very easily.

Even if GtkHtml is very limited, it is much better than GtkTextView in
rendering text. At least it can render tables, borders, change
background colors, etc. GtkTextView can't do that. Maybe implementing
editing would be easier with GtkTextView, but most of people will use
MonoDoc for reading rather than writing documentation. So I don't think
reducing the text rendering capabilities to make it easier to edit
documentation is a good deal.


 Correct, there are many things that we could do to improve the pipeline
 for new documentation.   Some of those ideas are also required for the
 Web edition of Monodoc.
 
 Having a hammer does not mean that everything is a nail, and for the
 case of documentation updating we should not start with We have
 Mono.Addins, now how do we do updates with it.
 
 Instead we should be thinking about creating the proper pipeline for
 documentation: what does it look like, what is the process, and then
 implement it.
 
 If the implementation would benefit from Mono.Addins, that is fine, but
 it should not be the driving force for it.

Fair enough. Just make sure you guys consider Mono.Addins if MonoDoc is
going to include any kind of extensibility support (including support
for third party libraries to extend MonoDoc with new documentation).
Otherwise we'd be reimplementing functionality that M.A. already
provides.

Lluis.


___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


Re: [Mono-dev] [PATCH] System.Threading.Parallel

2007-12-20 Thread Andreas Färber

Am 13.12.2007 um 23:34 schrieb Andreas Färber:

 Attached is a patch adding the System.Threading.Parallel assembly,  
 an optional part of the ECMA-335 standard (Annex G). The initial  
 implementation is single-threaded, as permitted by the standard. All  
 my test cases pass. Please review.

 Am I correct to use the ecma.pub key for this ECMA-only assembly?

 And am I seeing correctly that the ECMA docs do not document  
 protected methods? I used internal protected to be on the safe  
 side for now.

 There are some comments inline, documenting where I needed to  
 interpret the standard. For instance, the standard says an exception  
 should be rethrown in EndRun, which I am doing now, but this of  
 course hides the original source of the exception, so maybe we  
 should not rethrow it but throw some new exception with it as  
 InnerException?

No comments for one week? Can I go ahead and commit the initial  
version then?

Andreas
___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


Re: [Mono-dev] System.Diagnostics.PerformanceCounter.NextValue

2007-12-20 Thread Miguel de Icaza
Hello,

The feature does not exist, so you need to remove all the calls to
PerformanceCounter class.

 Im running mod_mono/1.2.4 and getting a
 The requested feature is not implemented.
 when trying to call System.Diagnostics.PerformanceCounter.NextValue() in a
 method to return the uptime of the server.
 
 Can anyone tell me if this is a problem with my local mono install being
 out of date (im new at this), or if i can get the server uptime by some
 other method.
 
 Method works fine under my winxp machine.
 
 ___
 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-dev] Mono.Addins in Monodoc

2007-12-20 Thread Mike Kestner

On Thu, 2007-12-20 at 14:56 +0100, Lluis Sanchez wrote:

  The idea is that Mike wants to switch to use GtkTextView to render the
  documentation, and at the same time, this would allow us to implement
  editing very easily.
 
 Even if GtkHtml is very limited, it is much better than GtkTextView in
 rendering text. At least it can render tables, borders, change
 background colors, etc. GtkTextView can't do that.

It won't be a TextView, though it may embed one in editing mode if that
makes things easier.  When Miguel and I talked on the phone, I said
Custom Gtk# Widget though I can understand how he could have assumed
it would be a TextView subclass.

  Maybe implementing
 editing would be easier with GtkTextView, but most of people will use
 MonoDoc for reading rather than writing documentation. So I don't think
 reducing the text rendering capabilities to make it easier to edit
 documentation is a good deal.

I don't recall anyone mentioning Reduce Text Rendering Capabilities as
a feature for the revisions.  I'll try to spend some time developing a
plan in the next couple weeks and publish it so everyone can poke holes
in it.

A couple things are fairly clear to me:  

1. Using an HTML widget for monodoc rendering is overkill for the layout
we require, and providing Gecko and GtkHTML on all the platforms we want
to target with monodoc is a PITA.

2. Adding WYSIWYG editing to any tool which is based on an HTML widget
rendering information already passed through an xslt transformation is
going to be problematic.


-- 
Mike Kestner [EMAIL PROTECTED]

___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


Re: [Mono-dev] Mono.Addins in Monodoc

2007-12-20 Thread Lluis Sanchez
El dj 20 de 12 del 2007 a les 10:15 -0600, en/na Mike Kestner va
escriure:
 On Thu, 2007-12-20 at 14:56 +0100, Lluis Sanchez wrote:
 
   The idea is that Mike wants to switch to use GtkTextView to render the
   documentation, and at the same time, this would allow us to implement
   editing very easily.
  
  Even if GtkHtml is very limited, it is much better than GtkTextView in
  rendering text. At least it can render tables, borders, change
  background colors, etc. GtkTextView can't do that.
 
 It won't be a TextView, though it may embed one in editing mode if that
 makes things easier.  When Miguel and I talked on the phone, I said
 Custom Gtk# Widget though I can understand how he could have assumed
 it would be a TextView subclass.
 
   Maybe implementing
  editing would be easier with GtkTextView, but most of people will use
  MonoDoc for reading rather than writing documentation. So I don't think
  reducing the text rendering capabilities to make it easier to edit
  documentation is a good deal.
 
 I don't recall anyone mentioning Reduce Text Rendering Capabilities as
 a feature for the revisions.  

I didn't say that's a feature, but it would be a side affect of using
GtkTextView instead of GtkHtmlView for rendering. Although it's now
clear that you didn't mean to use it in that way, so no problem.

 I'll try to spend some time developing a
 plan in the next couple weeks and publish it so everyone can poke holes
 in it.
 
 A couple things are fairly clear to me:  
 
 1. Using an HTML widget for monodoc rendering is overkill for the layout
 we require, and providing Gecko and GtkHTML on all the platforms we want
 to target with monodoc is a PITA.

Then maybe we should define what we expect MonoDoc to be. If MonoDoc
will be only a class library documentation browser and editor, a custom
widget for rendering class information would be enough. If MonoDoc
intends to be a general purpose documentation browser, which includes
not only class libraries but also documentation about C#, errors,
development tools, user guides, tutorials, etc, then we clearly need
something as generic as HTML.

 
 2. Adding WYSIWYG editing to any tool which is based on an HTML widget
 rendering information already passed through an xslt transformation is
 going to be problematic.
 
 

___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


Re: [Mono-dev] 1.2.6 on mac

2007-12-20 Thread pablosantosluac
Hi Geoff,

It looks like a great work!!

Ok, please take a look at your macos Quartz driver running the most 
beautiful :-P winforms application:

http://www.flickr.com/search/?q=plastic+scm+macos

Unfortunately it is quite unstable on MacOS right now, but David can point 
out many of the issues he's finding, so I guess we can help here.

Basically we've found:

- The different windows easily loose focus and the focus is kept by the 
parent window.
- Each repaint repaints everything on a control, even when a custom control 
is designed to make its own painting. This creates flickering.

Ok, this problems broke the app before we could get further.

We weren't able to run it with the Cocoa driver.

Thanks,

pablo


- Original Message - 
From: Geoff Norton [EMAIL PROTECTED]
To: David Suarez [EMAIL PROTECTED]
Cc: mono-devel-list@lists.ximian.com
Sent: Wednesday, December 19, 2007 8:26 PM
Subject: Re: [Mono-dev] 1.2.6 on mac


 David,

   http://lists.ximian.com/pipermail/mono-list/2007-December/037244.html

 -g

 On 19-Dec-07, at 9:04 AM, David Suarez wrote:

 Hi,

 I'm trying a simple winforms app on macosx (tiger), just a form with a
 picture box inside, with the latest 1.2.6 installer. It keeps saying
 that it
 can't open display (X-Server required...). I understand there is a new
 native driver for winforms on mac on 1.2.6, is there any setting to
 activate
 it?

 I previously had an older mono version, maybe it is getting settings
 from
 that?

 Cheers,

 David

 www.plasticscm.com


 ___
 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


[Mono-dev] mono wrapper for g_cond_wait and g_cond_broadcast

2007-12-20 Thread Travis Miller
This may be somewhat off topic but I'm trying to find the glib-sharp
equivalent of the c glib functions g_cond_wait() and g_cond_broadcast().
These would provide a very clean way of keeping a group of worker threads
in lock step.  Any help would be greatly appreciated.  I looked through
monodoc and couldn't find them (though I was prob looking in the wrong
place).

travis miller
___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


[Mono-dev] Patch for System.Web.HttpApplication

2007-12-20 Thread Vladimir Krasnov
Hello,

Please review and approve attached patch that fixes the following bugs:

1. Response.Redirect does not work from Page_Error error handler,
instead user gets the source exception
2. Context.ClearError does not work in Page_Error error handler
3. Thread.Abort() call initiated from user code is similar to
Response.End() but should return http500 response code

Regards, 
Vladimir


ClearErrorOnError.aspx.patch
Description: ClearErrorOnError.aspx.patch


HttpApplication.cs.patch
Description: HttpApplication.cs.patch


HttpContext.cs.patch
Description: HttpContext.cs.patch


Makefile.patch
Description: Makefile.patch


RedirectOnError.aspx.patch
Description: RedirectOnError.aspx.patch


Page.cs.patch
Description: Page.cs.patch


PageTest.cs.patch
Description: PageTest.cs.patch
___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


[Mono-dev] [PATCH] Sys.Data expressions

2007-12-20 Thread Konstantin Triger
Hello,

Attached a patch for several issues in Sys.Data expression evaluator. Please 
review.

Regards,
Konstantin Triger



jay.patch
Description: jay.patch
___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


[Mono-dev] Kudos Called For

2007-12-20 Thread Jerry Houston
I'm a long-time Win32 veteran who's been working as a
winform/webservice/tools developer since .NET 1.0.  My company adopted
the new paradigm and the C# language for our flagship product
development back when a lot of folks couldn't even spell .NET, let alone
know what it was, and I've been at it full-time for six years now.

When I first heard about mono, I loved the idea of an OS implementation,
but after checking in on its progress from time to time, I got the
feeling that it wasn't going anywhere very fast.  I figured that someday
mono might be useful for writing Linux console apps, using the GNU
equivalent of Microsoft's command-line compiler, but I didn't really
hope to see much more than that.

With vacation time on my hands, and a newly-built x64 system running
openSuSE 10.3 to play with at home, I decided to take another look, and
I have to say that I'm amazed.  Truly amazed. 

I decided to check it out with a fairly substantial winform application
called TimeLine, that I wrote to keep track of time spent on tasks at
work and submit weekly reports to a supervisor.   It's not a trivial
application.  I simply copied the solution from my XP-Pro workstation to
a Samba share on my Linux machine (I didn't have remote cvs set up yet),
told monoDevelop to build solution, and damned if it didn't build
as-is.  And then my application RAN, with only a trivial adjustment
needed to make it perfect.

So congratulations to everyone here who had anything to do with getting
this all to the state where it is today!  I look forward to becoming
personally active in OS development in the coming years -- something
that never really interested me much before now.

Regards,

Jerry Houston
Vertafore Corporation
Bothell, WA

___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


Re: [Mono-dev] [Patch] NameObjectCollectionBase, HttpCookieCollection

2007-12-20 Thread Gert Driesen
Hi Juraj,

I made some adjustments to your tests to get them to pass on both .NET 2.0
(SP1) and .NET 1.1.

I also improved some existing tests that may require additional changes
before they pass on Mono.

Gert

PS. Sorry if the attachment is binary (Outlook, says it all ...).

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Juraj
Skripsky
Sent: donderdag 20 december 2007 10:38
To: Gert Driesen
Cc: mono-devel-list@lists.ximian.com
Subject: Re: [Mono-dev] [Patch]
NameObjectCollectionBase,HttpCookieCollection

Hi Gert,

I'm attaching my patches, updated as per your suggestions.

- Juraj


On Thu, 2007-12-20 at 10:06 +0100, Gert Driesen wrote:
 Hi Juraj,
 
 I'd advise against using ExpectedException when multiple calls are 
 made in the test, as this may lead to false positives.
 
 For example:
 
   [Test]
   [ExpectedException (typeof (ArgumentException))]
   public void CopyTo_NotEnoughSpace () 
   {
   string [] array = new string [4];
   UnitTestNameObjectCollectionBase c = new 
 UnitTestNameObjectCollectionBase ();
   c.Add (1, mono);
   c.Add (2, MoNo);
   c.Add (3, mOnO);
   c.Add (4, MONO);
   ((ICollection)c).CopyTo (array, 2);
   }
 
 If any of the Add methods would lead to an ArgumentException, the test 
 would pass although you explicitly wanted to check if CopyTo resulted 
 in an ArgumentException.
 
 I would advise the following code (which is more bloated, yes):
 
   [Test]
   public void CopyTo_NotEnoughSpace () 
   {
   string [] array = new string [4];
   UnitTestNameObjectCollectionBase c = new 
 UnitTestNameObjectCollectionBase ();
   c.Add (1, mono);
   c.Add (2, MoNo);
   c.Add (3, mOnO);
   c.Add (4, MONO);
   try {
   ((ICollection)c).CopyTo (array, 2);
   Assert.Fail (#1);
   } catch (ArgumentException ex) {
   Assert.AreEqual (typeof (ArgumentException),
ex.GetType (), #2);
   Assert.IsNull (ex.InnerException, #3);
   Assert.IsNotNull (ex.Message, #4);
   Assert.IsNull (ex.ParamName, #5);
   }
   }
 
 This also allows you to perform additional checks (eg. was there an 
 inner exception?).
 
 Gert
 
 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED] On Behalf Of Juraj 
 Skripsky
 Sent: woensdag 19 december 2007 11:27
 To: mono-devel-list@lists.ximian.com
 Subject: [Mono-dev] [Patch] NameObjectCollectionBase, 
 HttpCookieCollection
 
 Hello,
 
 Attached are three small patches for NameObjectCollectionBase.cs, 
 NameObjectCollectionBaseTest.cs and HttpCookieCollection.cs.
 
 All unit tests pass on Mono. Could someone verify that the new unit 
 tests work on MS.NET?
 
 May I commit?
 
 - Juraj
 


NameObjectCollectionBaseTest.patch
Description: Binary data
___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


[Mono-dev] Control-C handler

2007-12-20 Thread pablosantosluac
Hi,

I've found the following code to set a Control-C handler on a .NET 1.1 
application.

http://geekswithblogs.net/mrnat/archive/2004/09/23/11594.aspx

Is there a way to do the same on Linux/Mono?


Thanks,

pablo 

___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


Re: [Mono-dev] 1.2.6 on mac

2007-12-20 Thread Geoff Norton
Pablo,


 Ok, please take a look at your macos Quartz driver running the most  
 beautiful :-P winforms application:

 http://www.flickr.com/search/?q=plastic+scm+macos


Looks great!

 Unfortunately it is quite unstable on MacOS right now, but David can  
 point out many of the issues he's finding, so I guess we can help  
 here.


Are you running 1.2.6 or the updated driver from my blog?

 Basically we've found:

 - The different windows easily loose focus and the focus is kept by  
 the parent window.

If you're running the updated driver from my blog can you make a  
testcase for this and file a bug please?


 - Each repaint repaints everything on a control, even when a custom  
 control is designed to make its own painting. This creates flickering.

This is a known issue

-g

___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


Re: [Mono-dev] Control-C handler

2007-12-20 Thread Jonathan Pryor
On Thu, 2007-12-20 at 18:56 +0100, pablosantosluac wrote:
 I've found the following code to set a Control-C handler on a .NET 1.1 
 application.
 
 http://geekswithblogs.net/mrnat/archive/2004/09/23/11594.aspx
 
 Is there a way to do the same on Linux/Mono?

You can use signal(2), which is helpfully exposed by Mono.Posix.dll.

See the attached program.

 - Jon

// traps Ctrl+C
// To compile: mcs -r:Mono.Posix ctrlc.cs
using System;
using System.Threading;
using Mono.Unix.Native;

class Test {
	static volatile bool ctrl_c_pressed;

	static void handler (int sig)
	{
		ctrl_c_pressed = true;
	}

	public static void Main ()
	{
		Stdlib.signal (Signum.SIGINT, handler);

		Console.WriteLine (Press Ctrl+C to terminate app.);
		while (!ctrl_c_pressed) {
			Thread.Sleep (1);
		}
		Console.WriteLine (Finished.);
	}
}

___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


Re: [Mono-dev] 1.2.6 on mac

2007-12-20 Thread Gavin Landon
Looks a lot better than Surround SCM..   David, are you using Adobe AIR
and/or Flex for the UI?


-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of
pablosantosluac
Sent: Thursday, December 20, 2007 10:57 AM
To: Geoff Norton; David Suarez
Cc: mono-devel-list@lists.ximian.com
Subject: Re: [Mono-dev] 1.2.6 on mac

Hi Geoff,

It looks like a great work!!

Ok, please take a look at your macos Quartz driver running the most
beautiful :-P winforms application:

http://www.flickr.com/search/?q=plastic+scm+macos

Unfortunately it is quite unstable on MacOS right now, but David can
point out many of the issues he's finding, so I guess we can help here.

Basically we've found:

- The different windows easily loose focus and the focus is kept by the
parent window.
- Each repaint repaints everything on a control, even when a custom
control is designed to make its own painting. This creates flickering.

Ok, this problems broke the app before we could get further.

We weren't able to run it with the Cocoa driver.

Thanks,

pablo


- Original Message -
From: Geoff Norton [EMAIL PROTECTED]
To: David Suarez [EMAIL PROTECTED]
Cc: mono-devel-list@lists.ximian.com
Sent: Wednesday, December 19, 2007 8:26 PM
Subject: Re: [Mono-dev] 1.2.6 on mac


 David,


http://lists.ximian.com/pipermail/mono-list/2007-December/037244.html

 -g

 On 19-Dec-07, at 9:04 AM, David Suarez wrote:

 Hi,

 I'm trying a simple winforms app on macosx (tiger), just a form with
a
 picture box inside, with the latest 1.2.6 installer. It keeps saying
 that it
 can't open display (X-Server required...). I understand there is a
new
 native driver for winforms on mac on 1.2.6, is there any setting to
 activate
 it?

 I previously had an older mono version, maybe it is getting settings
 from
 that?

 Cheers,

 David

 www.plasticscm.com


 ___
 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
___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


Re: [Mono-dev] 1.2.6 on mac

2007-12-20 Thread David Suarez
Hi Gavin, 


 Looks a lot better than Surround SCM..   David, are you using Adobe AIR
 and/or Flex for the UI?

Mono winforms only, with several custom controls.


___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


Re: [Mono-dev] 1.2.6 on mac

2007-12-20 Thread Gavin Landon
Wow..  Looks really good.  I've done some development in AIR and that UI
I would have never guessed it wasn't AIR.

-Original Message-
From: David Suarez [mailto:[EMAIL PROTECTED] 
Sent: Thursday, December 20, 2007 12:43 PM
To: Gavin Landon
Cc: mono-devel-list@lists.ximian.com
Subject: RE: [Mono-dev] 1.2.6 on mac

Hi Gavin, 


 Looks a lot better than Surround SCM..   David, are you using Adobe
AIR
 and/or Flex for the UI?

Mono winforms only, with several custom controls.


___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


Re: [Mono-dev] Control-C handler

2007-12-20 Thread Miguel de Icaza
Hello,

 You can use signal(2), which is helpfully exposed by Mono.Posix.dll.
 
 See the attached program.

This actually would corrupt the application state, because the C-c
handler will run the entire JIT at that point and this happens in the
same thread as the executing thread.

A better approach would be to hook this up in C, and set a flag from C
(this could be setting a value in managed land that you can poll)
___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


Re: [Mono-dev] Control-C handler

2007-12-20 Thread Jonathan Pryor
On Thu, 2007-12-20 at 14:16 -0500, Miguel de Icaza wrote:
 Hello,
 
  You can use signal(2), which is helpfully exposed by Mono.Posix.dll.
  
  See the attached program.
 
 This actually would corrupt the application state, because the C-c
 handler will run the entire JIT at that point and this happens in the
 same thread as the executing thread.

Isn't there a method that says JIT this function now?  (I thought
Marshal.Prelink() did that, which is what Stdlib.signal() calls, but I
just re-read the documentation and it doesn't do anything of the sort.)

Before dropping to C, though, there are two alternatives:

1. Call handler() *before* passing it to Stdlib.signal():

handler (-1);
Stdlib.signal (Signum.SIGINT, handler);
/* ... as before ... */

This would require changing handler() to know about this initialization
call and NOT set ctrl_c_pressed if the parameter is -1.

This would also allow a pure C# signal handler, as the method will be
JITed during the first handler() call.

2. Use System.Runtime.ConstrainedExecution.PrePrepareMethodAttribute on
the signal handler method.  This would require that Mono have support
for Constrained Execution regions, which I believe is currently lacking,
but would presumably eventually be supported.

 - Jon


___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


[Mono-dev] gtk# propertygrid question

2007-12-20 Thread [EMAIL PROTECTED]
hi again:

I think that something happend with my previous mail, but in any case 
here is again:

I want to write a gtk# property editor widget, but I don't know if may 
be something like this is allready available or if you have any 
sugestion about some control/code that can be traslated/adapted to gtk#.

any sugestion is apreciate..

Thanks.

___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


[Mono-dev] xsp2 problem

2007-12-20 Thread Anton Andreev

Hi,

I am using the following bat file to execute my website from test 
directory:


@echo off
call d:\PROGRA~1\MONO-1~1.6\bin\setmonopath.bat
cd /D D:\test
xsp2 --root . --port 8088 --applications /:.

and then: http://localhost:8088/

but I get the following error:


   /Path '/' was not found./

*Description: *Error processing request.

*Error Message: *HTTP 404. System.Web.HttpException: Path '/' was not 
found.


*Stack Trace: *

System.Web.HttpException: Path '/' was not found.
 at System.Web.StaticFileHandler.ProcessRequest (System.Web.HttpContext context) [0x0] 
 at System.Web.HttpApplication+c__CompilerGenerated5.MoveNext () [0x0] 



___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


[Mono-dev] mono CodeDom problem

2007-12-20 Thread [EMAIL PROTECTED]
Hi Guys:

I have this code from a example of a simple code generator with CodeDom 
(from here http://www.15seconds.com/issue/020917.htm , I list the code 
at end of the message), but with mono I only get the using and namespace 
declarations...I see in the status page of mono that the codedom is 
allmost complete, do you have some examples?

thanks

Mauricio

using System;
using System.CodeDom;
using System.CodeDom.Compiler;
using System.Reflection;
using System.IO;
using Microsoft.CSharp;
using Microsoft.VisualBasic;

   namespace CodeDomPartOne
  {
   ///
   /// Summary description for Briefcase.
   ///
   public class Briefcase
   {
   //Member Variables  private string m_strFileName;  
private string m_Suffix = .cs;

   public Briefcase(string strFileName)
   {
   m_strFileName = strFileName;  }public void 
CreateCodeDomBriefcase()
   {
//Initialize CodeDom Variables
   //para windows
//Stream s = File.Open(c:\\ + m_strFileName + m_Suffix, 
FileMode.Create);
   //para linux
Stream s = File.Open( + m_strFileName + m_Suffix, FileMode.Create);

   StreamWriter sw = new StreamWriter(s);
  CSharpCodeProvider cscProvider = new CSharpCodeProvider();
ICodeGenerator cscg = cscProvider.CreateGenerator(sw);   
CodeGeneratorOptions cop = new CodeGeneratorOptions();  
//Create Class Using Statements
CodeSnippetCompileUnit csu1 = new CodeSnippetCompileUnit(using 
System);
CodeSnippetCompileUnit csu2 = new CodeSnippetCompileUnit(using 
System.IO);   cscg.GenerateCodeFromCompileUnit(csu1, sw, cop);
cscg.GenerateCodeFromCompileUnit(csu2, sw, cop);
sw.WriteLine();
  //Create Class Namespaces
CodeNamespace cnsCodeDom = new CodeNamespace(CodeDom);
//Create Class Declaration
CodeTypeDeclaration ctd = new CodeTypeDeclaration();
ctd.IsClass = true;   ctd.Name = Briefcase;
ctd.TypeAttributes = TypeAttributes.Public;
  //Create Class Member Fields   
sw.WriteLine();   CodeMemberField cmfBriefcaseName = new 
CodeMemberField(string,m_BriefcaseName);
cmfBriefcaseName.Attributes = 
MemberAttributes.Private;   
ctd.Members.Add(cmfBriefcaseName); 
CodeMemberField cmfBriefcaseTitle = new CodeMemberField(string, 
m_BriefcaseTitle);
cmfBriefcaseTitle.Attributes = MemberAttributes.Private;
ctd.Members.Add(cmfBriefcaseTitle); 
CodeMemberField cmfBriefcaseID = new CodeMemberField(int, 
m_cmfBriefcaseID);
cmfBriefcaseID.Attributes = MemberAttributes.Private;   
ctd.Members.Add(cmfBriefcaseID);

CodeMemberField cmfBriefcaseSectionID = new CodeMemberField(int, 
m_BriefcaseSectionID);
cmfBriefcaseSectionID.Attributes = MemberAttributes.Private;   
ctd.Members.Add(cmfBriefcaseSectionID);

CodeMemberField cmfBriefcaseFolderID = new CodeMemberField(int, 
m_BriefcaseFolderID);
cmfBriefcaseFolderID.Attributes = MemberAttributes.Private;
ctd.Members.Add(cmfBriefcaseFolderID);

CodeMemberField cmfBriefcaseItemID = new CodeMemberField(int, 
m_BriefcaseItemID);
cmfBriefcaseItemID.Attributes = MemberAttributes.Private;
ctd.Members.Add(cmfBriefcaseItemID);  
//Create Class Constructor   CodeConstructor ccon = 
new CodeConstructor();
ccon.Attributes = MemberAttributes.Public;
ccon.Statements.Add(new CodeSnippetStatement(//));
ccon.Statements.Add(new CodeSnippetStatement(// TODO: Add 
constructor logic here));
ccon.Statements.Add(new CodeSnippetStatement(//));
  ctd.Members.Add(ccon);  
//Create Class BriefcaseName Property
CodeMemberProperty mpBriefcaseName = new CodeMemberProperty();
mpBriefcaseName.Attributes = MemberAttributes.Private;
mpBriefcaseName.Type = new CodeTypeReference(string);
mpBriefcaseName.Name = BriefcaseName;   
mpBriefcaseName.HasGet = true;   
mpBriefcaseName.GetStatements.Add(new CodeSnippetExpression(return 
m_BriefcaseName));
mpBriefcaseName.HasSet = true;
mpBriefcaseName.SetStatements.Add(new 
CodeSnippetExpression(m_BriefcaseName = value));
ctd.Members.Add(mpBriefcaseName); //Create 
Class BriefcaseTitle Property
CodeMemberProperty mpBriefcaseTitle = new CodeMemberProperty();
mpBriefcaseTitle.Attributes = MemberAttributes.Private;
mpBriefcaseTitle.Type = new CodeTypeReference(string);
mpBriefcaseTitle.Name = BriefcaseTitle;   
mpBriefcaseTitle.HasGet = true;
 mpBriefcaseTitle.GetStatements.Add(new 
CodeSnippetExpression(return m_BriefcaseTitle));
 mpBriefcaseTitle.HasSet = true;
 mpBriefcaseTitle.SetStatements.Add(new 
CodeSnippetExpression(m_BriefcaseTitle = value));
 ctd.Members.Add(mpBriefcaseTitle);

 

[Mono-dev] xsp2 problem

2007-12-20 Thread Anton Andreev
Hi,

I have this problem to half of my website pages:


  Server Error in '/' Application




/Arg_InsufficientSpace
Parameter name: chars/

*Description: *Error processing request.

*Error Message: *HTTP 500. System.ArgumentException: Arg_InsufficientSpace
Parameter name: chars

*Stack Trace: *

System.ArgumentException: Arg_InsufficientSpace
Parameter name: chars
  at System.Text.UTF8Encoding.InternalGetChars (System.Byte* bytes, Int32 
byteCount, System.Char* chars, Int32 charCount, System.UInt32 leftOverBits, 
System.UInt32 leftOverCount, System.Object provider, 
System.Text.DecoderFallbackBuffer fallbackBuffer, System.Byte[] bufferArg, 
Boolean flush) [0x0] 
  at System.Text.UTF8Encoding.InternalGetChars (System.Byte[] bytes, Int32 
byteIndex, Int32 byteCount, System.Char[] chars, Int32 charIndex, 
System.UInt32 leftOverBits, System.UInt32 leftOverCount, System.Object 
provider, System.Text.DecoderFallbackBuffer fallbackBuffer, System.Byte[] 
bufferArg, Boolean flush) [0x0] 
  at System.Text.UTF8Encoding+UTF8Decoder.GetChars (System.Byte[] bytes, Int32 
byteIndex, Int32 byteCount, System.Char[] chars, Int32 charIndex) [0x0] 
  at System.IO.StreamReader.ReadBuffer () [0x0] 
  at System.IO.StreamReader.Read (System.Char[] dest_buffer, Int32 index, Int32 
count) [0x0] 
  at System.IO.StreamReader.ReadToEnd () [0x0] 
  at System.Web.Compilation.AspParser..ctor (System.String filename, 
System.IO.TextReader input) [0x0] 
  at System.Web.Compilation.AspGenerator.InitParser (System.String filename) 
[0x0] 
  at System.Web.Compilation.AspGenerator.Parse (System.String file) [0x0] 
  at System.Web.Compilation.AspGenerator.Parse () [0x0] 
  at System.Web.Compilation.AspGenerator.GetCompiledType () [0x0] 
  at System.Web.UI.PageParser.CompileIntoType () [0x0] 
  at System.Web.UI.TemplateControlParser.GetCompiledInstance () [0x0] 
  at System.Web.UI.PageParser.GetCompiledPageInstance (System.String 
virtualPath, System.String inputFile, System.Web.HttpContext context) [0x0] 
  at System.Web.UI.PageHandlerFactory.GetHandler (System.Web.HttpContext 
context, System.String requestType, System.String url, System.String path) 
[0x0] 
  at System.Web.HttpApplication.GetHandler (System.Web.HttpContext context) 
[0x0] 
  at System.Web.HttpApplication+c__CompilerGenerated5.MoveNext () [0x0] 



___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


Re: [Mono-dev] gtk# propertygrid question

2007-12-20 Thread Michael Hutchinson
On Dec 20, 2007 3:29 PM, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:
 hi again:

 I think that something happend with my previous mail, but in any case
 here is again:

 I want to write a gtk# property editor widget, but I don't know if may
 be something like this is allready available or if you have any
 sugestion about some control/code that can be traslated/adapted to gtk#.

 any sugestion is apreciate..

There's a MIT/X11-licensed one in MonoDevelop.DesignerSupport.PropertyGrid.*

-- 
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] mono CodeDom problem

2007-12-20 Thread Ivan N. Zlatev
[EMAIL PROTECTED] wrote:
 Hi Guys:
 
 I have this code from a example of a simple code generator with CodeDom 
 (from here http://www.15seconds.com/issue/020917.htm , I list the code 
 at end of the message), but with mono I only get the using and namespace 
 declarations...I see in the status page of mono that the codedom is 
 allmost complete, do you have some examples?
 

I didn't bother to go through the article, but the code sample is wrong
and broken in many aspects. But to answer your question - there is
nothing wrong with Mono's CodeDom C# code generator. It won't generate
anything more than the namespace essentially because the author never
adds the class to the namespace (e.g via: cnsCodeDom.Types.Add (ctd); ).

Based on the code sample I wouldn't recommend this article. A good
starting point is
http://msdn2.microsoft.com/en-us/library/aa720100(VS.71).aspx

Regard,
Ivan Zlatev


 thanks
 
 Mauricio
 
 using System;
 using System.CodeDom;
 using System.CodeDom.Compiler;
 using System.Reflection;
 using System.IO;
 using Microsoft.CSharp;
 using Microsoft.VisualBasic;
 
namespace CodeDomPartOne
   {
///
/// Summary description for Briefcase.
///
public class Briefcase
{
//Member Variables  private string m_strFileName;  
 private string m_Suffix = .cs;
 
public Briefcase(string strFileName)
{
m_strFileName = strFileName;  }public void 
 CreateCodeDomBriefcase()
{
 //Initialize CodeDom Variables
//para windows
 //Stream s = File.Open(c:\\ + m_strFileName + m_Suffix, 
 FileMode.Create);
//para linux
 Stream s = File.Open( + m_strFileName + m_Suffix, FileMode.Create);
 
StreamWriter sw = new StreamWriter(s);
   CSharpCodeProvider cscProvider = new CSharpCodeProvider();
 ICodeGenerator cscg = cscProvider.CreateGenerator(sw);   
 CodeGeneratorOptions cop = new CodeGeneratorOptions();  
 //Create Class Using Statements
 CodeSnippetCompileUnit csu1 = new CodeSnippetCompileUnit(using 
 System);
 CodeSnippetCompileUnit csu2 = new CodeSnippetCompileUnit(using 
 System.IO);   cscg.GenerateCodeFromCompileUnit(csu1, sw, cop);
 cscg.GenerateCodeFromCompileUnit(csu2, sw, cop);
 sw.WriteLine();
   //Create Class Namespaces
 CodeNamespace cnsCodeDom = new CodeNamespace(CodeDom);
 //Create Class Declaration
 CodeTypeDeclaration ctd = new CodeTypeDeclaration();
 ctd.IsClass = true;   ctd.Name = Briefcase;
 ctd.TypeAttributes = TypeAttributes.Public;
   //Create Class Member Fields   
 sw.WriteLine();   CodeMemberField cmfBriefcaseName = new 
 CodeMemberField(string,m_BriefcaseName);
 cmfBriefcaseName.Attributes = 
 MemberAttributes.Private;   
 ctd.Members.Add(cmfBriefcaseName); 
 CodeMemberField cmfBriefcaseTitle = new CodeMemberField(string, 
 m_BriefcaseTitle);
 cmfBriefcaseTitle.Attributes = MemberAttributes.Private;
 ctd.Members.Add(cmfBriefcaseTitle); 
 CodeMemberField cmfBriefcaseID = new CodeMemberField(int, 
 m_cmfBriefcaseID);
 cmfBriefcaseID.Attributes = MemberAttributes.Private;   
 ctd.Members.Add(cmfBriefcaseID);
 
 CodeMemberField cmfBriefcaseSectionID = new CodeMemberField(int, 
 m_BriefcaseSectionID);
 cmfBriefcaseSectionID.Attributes = MemberAttributes.Private;   
 ctd.Members.Add(cmfBriefcaseSectionID);
 
 CodeMemberField cmfBriefcaseFolderID = new CodeMemberField(int, 
 m_BriefcaseFolderID);
 cmfBriefcaseFolderID.Attributes = MemberAttributes.Private;
 ctd.Members.Add(cmfBriefcaseFolderID);
 
 CodeMemberField cmfBriefcaseItemID = new CodeMemberField(int, 
 m_BriefcaseItemID);
 cmfBriefcaseItemID.Attributes = MemberAttributes.Private;
 ctd.Members.Add(cmfBriefcaseItemID);  
 //Create Class Constructor   CodeConstructor ccon = 
 new CodeConstructor();
 ccon.Attributes = MemberAttributes.Public;
 ccon.Statements.Add(new CodeSnippetStatement(//));
 ccon.Statements.Add(new CodeSnippetStatement(// TODO: Add 
 constructor logic here));
 ccon.Statements.Add(new CodeSnippetStatement(//));
   ctd.Members.Add(ccon);  
 //Create Class BriefcaseName Property
 CodeMemberProperty mpBriefcaseName = new CodeMemberProperty();
 mpBriefcaseName.Attributes = MemberAttributes.Private;
 mpBriefcaseName.Type = new CodeTypeReference(string);
 mpBriefcaseName.Name = BriefcaseName;   
 mpBriefcaseName.HasGet = true;   
 mpBriefcaseName.GetStatements.Add(new CodeSnippetExpression(return 
 m_BriefcaseName));
 mpBriefcaseName.HasSet = true;
 mpBriefcaseName.SetStatements.Add(new 
 CodeSnippetExpression(m_BriefcaseName = value));
 

Re: [Mono-dev] mono CodeDom problem

2007-12-20 Thread [EMAIL PROTECTED]
thanks Ivan, bad source info then, the link that you send me is broken, 
but of course I'm going to search for better info on the net..

thanks again.

Mauricio

Ivan N. Zlatev wrote:

 [EMAIL PROTECTED] wrote:
   
 Hi Guys:

 I have this code from a example of a simple code generator with CodeDom 
 (from here http://www.15seconds.com/issue/020917.htm , I list the code 
 at end of the message), but with mono I only get the using and namespace 
 declarations...I see in the status page of mono that the codedom is 
 allmost complete, do you have some examples?

 

 I didn't bother to go through the article, but the code sample is wrong
 and broken in many aspects. But to answer your question - there is
 nothing wrong with Mono's CodeDom C# code generator. It won't generate
 anything more than the namespace essentially because the author never
 adds the class to the namespace (e.g via: cnsCodeDom.Types.Add (ctd); ).

 Based on the code sample I wouldn't recommend this article. A good
 starting point is
 http://msdn2.microsoft.com/en-us/library/aa720100(VS.71).aspx

 Regard,
 Ivan Zlatev


   
 thanks

 Mauricio

 using System;
 using System.CodeDom;
 using System.CodeDom.Compiler;
 using System.Reflection;
 using System.IO;
 using Microsoft.CSharp;
 using Microsoft.VisualBasic;

namespace CodeDomPartOne
   {
///
/// Summary description for Briefcase.
///
public class Briefcase
{
//Member Variables  private string m_strFileName;  
 private string m_Suffix = .cs;

public Briefcase(string strFileName)
{
m_strFileName = strFileName;  }public void 
 CreateCodeDomBriefcase()
{
 //Initialize CodeDom Variables
//para windows
 //Stream s = File.Open(c:\\ + m_strFileName + m_Suffix, 
 FileMode.Create);
//para linux
 Stream s = File.Open( + m_strFileName + m_Suffix, FileMode.Create);

StreamWriter sw = new StreamWriter(s);
   CSharpCodeProvider cscProvider = new CSharpCodeProvider();
 ICodeGenerator cscg = cscProvider.CreateGenerator(sw);   
 CodeGeneratorOptions cop = new CodeGeneratorOptions();  
 //Create Class Using Statements
 CodeSnippetCompileUnit csu1 = new CodeSnippetCompileUnit(using 
 System);
 CodeSnippetCompileUnit csu2 = new CodeSnippetCompileUnit(using 
 System.IO);   cscg.GenerateCodeFromCompileUnit(csu1, sw, cop);
 cscg.GenerateCodeFromCompileUnit(csu2, sw, cop);
 sw.WriteLine();
   //Create Class Namespaces
 CodeNamespace cnsCodeDom = new CodeNamespace(CodeDom);
 //Create Class Declaration
 CodeTypeDeclaration ctd = new CodeTypeDeclaration();
 ctd.IsClass = true;   ctd.Name = Briefcase;
 ctd.TypeAttributes = TypeAttributes.Public;
   //Create Class Member Fields   
 sw.WriteLine();   CodeMemberField cmfBriefcaseName = new 
 CodeMemberField(string,m_BriefcaseName);
 cmfBriefcaseName.Attributes = 
 MemberAttributes.Private;   
 ctd.Members.Add(cmfBriefcaseName); 
 CodeMemberField cmfBriefcaseTitle = new CodeMemberField(string, 
 m_BriefcaseTitle);
 cmfBriefcaseTitle.Attributes = MemberAttributes.Private;
 ctd.Members.Add(cmfBriefcaseTitle); 
 CodeMemberField cmfBriefcaseID = new CodeMemberField(int, 
 m_cmfBriefcaseID);
 cmfBriefcaseID.Attributes = MemberAttributes.Private;   
 ctd.Members.Add(cmfBriefcaseID);

 CodeMemberField cmfBriefcaseSectionID = new CodeMemberField(int, 
 m_BriefcaseSectionID);
 cmfBriefcaseSectionID.Attributes = MemberAttributes.Private;   
 ctd.Members.Add(cmfBriefcaseSectionID);

 CodeMemberField cmfBriefcaseFolderID = new CodeMemberField(int, 
 m_BriefcaseFolderID);
 cmfBriefcaseFolderID.Attributes = MemberAttributes.Private;
 ctd.Members.Add(cmfBriefcaseFolderID);

 CodeMemberField cmfBriefcaseItemID = new CodeMemberField(int, 
 m_BriefcaseItemID);
 cmfBriefcaseItemID.Attributes = MemberAttributes.Private;
 ctd.Members.Add(cmfBriefcaseItemID);  
 //Create Class Constructor   CodeConstructor ccon = 
 new CodeConstructor();
 ccon.Attributes = MemberAttributes.Public;
 ccon.Statements.Add(new CodeSnippetStatement(//));
 ccon.Statements.Add(new CodeSnippetStatement(// TODO: Add 
 constructor logic here));
 ccon.Statements.Add(new CodeSnippetStatement(//));
   ctd.Members.Add(ccon);  
 //Create Class BriefcaseName Property
 CodeMemberProperty mpBriefcaseName = new CodeMemberProperty();
 mpBriefcaseName.Attributes = MemberAttributes.Private;
 mpBriefcaseName.Type = new CodeTypeReference(string);
 mpBriefcaseName.Name = BriefcaseName;   
 mpBriefcaseName.HasGet = true;   
 

Re: [Mono-dev] mono CodeDom problem

2007-12-20 Thread Ivan N. Zlatev
[EMAIL PROTECTED] wrote:
 thanks Ivan, bad source info then, the link that you send me is broken, 
 but of course I'm going to search for better info on the net..
 

The link opens fine here. Try this one -
http://msdn2.microsoft.com/en-us/library/650ax5cx.aspx

 thanks again.
 
 Mauricio
 
 Ivan N. Zlatev wrote:
 
 [EMAIL PROTECTED] wrote:
   
 Hi Guys:

 I have this code from a example of a simple code generator with CodeDom 
 (from here http://www.15seconds.com/issue/020917.htm , I list the code 
 at end of the message), but with mono I only get the using and namespace 
 declarations...I see in the status page of mono that the codedom is 
 allmost complete, do you have some examples?

 
 I didn't bother to go through the article, but the code sample is wrong
 and broken in many aspects. But to answer your question - there is
 nothing wrong with Mono's CodeDom C# code generator. It won't generate
 anything more than the namespace essentially because the author never
 adds the class to the namespace (e.g via: cnsCodeDom.Types.Add (ctd); ).

 Based on the code sample I wouldn't recommend this article. A good
 starting point is
 http://msdn2.microsoft.com/en-us/library/aa720100(VS.71).aspx

 Regard,
 Ivan Zlatev


   
 thanks

 Mauricio

 using System;
 using System.CodeDom;
 using System.CodeDom.Compiler;
 using System.Reflection;
 using System.IO;
 using Microsoft.CSharp;
 using Microsoft.VisualBasic;

namespace CodeDomPartOne
   {
///
/// Summary description for Briefcase.
///
public class Briefcase
{
//Member Variables  private string m_strFileName;  
 private string m_Suffix = .cs;

public Briefcase(string strFileName)
{
m_strFileName = strFileName;  }public void 
 CreateCodeDomBriefcase()
{
 //Initialize CodeDom Variables
//para windows
 //Stream s = File.Open(c:\\ + m_strFileName + m_Suffix, 
 FileMode.Create);
//para linux
 Stream s = File.Open( + m_strFileName + m_Suffix, FileMode.Create);

StreamWriter sw = new StreamWriter(s);
   CSharpCodeProvider cscProvider = new CSharpCodeProvider();
 ICodeGenerator cscg = cscProvider.CreateGenerator(sw);   
 CodeGeneratorOptions cop = new CodeGeneratorOptions();  
 //Create Class Using Statements
 CodeSnippetCompileUnit csu1 = new CodeSnippetCompileUnit(using 
 System);
 CodeSnippetCompileUnit csu2 = new CodeSnippetCompileUnit(using 
 System.IO);   cscg.GenerateCodeFromCompileUnit(csu1, sw, cop);
 cscg.GenerateCodeFromCompileUnit(csu2, sw, cop);
 sw.WriteLine();
   //Create Class Namespaces
 CodeNamespace cnsCodeDom = new CodeNamespace(CodeDom);
 //Create Class Declaration
 CodeTypeDeclaration ctd = new CodeTypeDeclaration();
 ctd.IsClass = true;   ctd.Name = Briefcase;
 ctd.TypeAttributes = TypeAttributes.Public;
   //Create Class Member Fields   
 sw.WriteLine();   CodeMemberField cmfBriefcaseName = new 
 CodeMemberField(string,m_BriefcaseName);
 cmfBriefcaseName.Attributes = 
 MemberAttributes.Private;   
 ctd.Members.Add(cmfBriefcaseName); 
 CodeMemberField cmfBriefcaseTitle = new CodeMemberField(string, 
 m_BriefcaseTitle);
 cmfBriefcaseTitle.Attributes = MemberAttributes.Private;
 ctd.Members.Add(cmfBriefcaseTitle); 
 CodeMemberField cmfBriefcaseID = new CodeMemberField(int, 
 m_cmfBriefcaseID);
 cmfBriefcaseID.Attributes = MemberAttributes.Private;   
 ctd.Members.Add(cmfBriefcaseID);

 CodeMemberField cmfBriefcaseSectionID = new CodeMemberField(int, 
 m_BriefcaseSectionID);
 cmfBriefcaseSectionID.Attributes = MemberAttributes.Private;   
 ctd.Members.Add(cmfBriefcaseSectionID);

 CodeMemberField cmfBriefcaseFolderID = new CodeMemberField(int, 
 m_BriefcaseFolderID);
 cmfBriefcaseFolderID.Attributes = MemberAttributes.Private;
 ctd.Members.Add(cmfBriefcaseFolderID);

 CodeMemberField cmfBriefcaseItemID = new CodeMemberField(int, 
 m_BriefcaseItemID);
 cmfBriefcaseItemID.Attributes = MemberAttributes.Private;
 ctd.Members.Add(cmfBriefcaseItemID);  
 //Create Class Constructor   CodeConstructor ccon = 
 new CodeConstructor();
 ccon.Attributes = MemberAttributes.Public;
 ccon.Statements.Add(new CodeSnippetStatement(//));
 ccon.Statements.Add(new CodeSnippetStatement(// TODO: Add 
 constructor logic here));
 ccon.Statements.Add(new CodeSnippetStatement(//));
   ctd.Members.Add(ccon);  
 //Create Class BriefcaseName Property
 CodeMemberProperty mpBriefcaseName = new CodeMemberProperty();
 mpBriefcaseName.Attributes = MemberAttributes.Private;
 mpBriefcaseName.Type = new 

Re: [Mono-dev] Control-C handler

2007-12-20 Thread pablosantosluac
Ok, I think I got a bit lost here... how should I proceed then?

Thanks,


pablo
- Original Message - 
From: Jonathan Pryor [EMAIL PROTECTED]
To: Miguel de Icaza [EMAIL PROTECTED]
Cc: mono-devel-list@lists.ximian.com
Sent: Thursday, December 20, 2007 8:41 PM
Subject: Re: [Mono-dev] Control-C handler


 On Thu, 2007-12-20 at 14:16 -0500, Miguel de Icaza wrote:
 Hello,
 
  You can use signal(2), which is helpfully exposed by Mono.Posix.dll.
  
  See the attached program.
 
 This actually would corrupt the application state, because the C-c
 handler will run the entire JIT at that point and this happens in the
 same thread as the executing thread.
 
 Isn't there a method that says JIT this function now?  (I thought
 Marshal.Prelink() did that, which is what Stdlib.signal() calls, but I
 just re-read the documentation and it doesn't do anything of the sort.)
 
 Before dropping to C, though, there are two alternatives:
 
 1. Call handler() *before* passing it to Stdlib.signal():
 
 handler (-1);
 Stdlib.signal (Signum.SIGINT, handler);
 /* ... as before ... */
 
 This would require changing handler() to know about this initialization
 call and NOT set ctrl_c_pressed if the parameter is -1.
 
 This would also allow a pure C# signal handler, as the method will be
 JITed during the first handler() call.
 
 2. Use System.Runtime.ConstrainedExecution.PrePrepareMethodAttribute on
 the signal handler method.  This would require that Mono have support
 for Constrained Execution regions, which I believe is currently lacking,
 but would presumably eventually be supported.
 
 - Jon
 
 
 ___
 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-dev] 1.2.6 on mac

2007-12-20 Thread pablosantosluac
Just pure Mono/WinForms... and the results really paid off! So, I think it 
is quite clear there are opportunities to make some great GUI multiplatform 
code with WinForms... so yes, mono is ready for the enterprise 
(http://tirania.org/blog/archive/2007/Dec-06.html), and not only on the 
GUI... also strong server code! :-)


pablo

- Original Message - 
From: Gavin Landon [EMAIL PROTECTED]
To: David Suarez [EMAIL PROTECTED]
Cc: mono-devel-list@lists.ximian.com
Sent: Thursday, December 20, 2007 7:46 PM
Subject: Re: [Mono-dev] 1.2.6 on mac


 Wow..  Looks really good.  I've done some development in AIR and that UI
 I would have never guessed it wasn't AIR.

 -Original Message-
 From: David Suarez [mailto:[EMAIL PROTECTED]
 Sent: Thursday, December 20, 2007 12:43 PM
 To: Gavin Landon
 Cc: mono-devel-list@lists.ximian.com
 Subject: RE: [Mono-dev] 1.2.6 on mac

 Hi Gavin,


 Looks a lot better than Surround SCM..   David, are you using Adobe
 AIR
 and/or Flex for the UI?

 Mono winforms only, with several custom controls.


 ___
 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-dev] 1.2.6 on mac

2007-12-20 Thread pablosantosluac
Ok, it seems the problems arised using your blog driver... We'll try to 
send you some testcases, but it won't be easy because most of the times you 
need a complex app to reproduce the problems...


pablo
- Original Message - 
From: Geoff Norton [EMAIL PROTECTED]
To: pablosantosluac [EMAIL PROTECTED]
Cc: David Suarez [EMAIL PROTECTED]; 
mono-devel-list@lists.ximian.com
Sent: Thursday, December 20, 2007 7:10 PM
Subject: Re: [Mono-dev] 1.2.6 on mac


 Pablo,


 Ok, please take a look at your macos Quartz driver running the most 
 beautiful :-P winforms application:

 http://www.flickr.com/search/?q=plastic+scm+macos


 Looks great!

 Unfortunately it is quite unstable on MacOS right now, but David can 
 point out many of the issues he's finding, so I guess we can help  here.


 Are you running 1.2.6 or the updated driver from my blog?

 Basically we've found:

 - The different windows easily loose focus and the focus is kept by  the 
 parent window.

 If you're running the updated driver from my blog can you make a  testcase 
 for this and file a bug please?


 - Each repaint repaints everything on a control, even when a custom 
 control is designed to make its own painting. This creates flickering.

 This is a known issue

 -g
 

___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list