Re: [Mono-dev] BIG ASP.NET BUG : SegFault when sending a Response of a size 120Ko

2005-10-19 Thread Hubert FONGARNAND




Le mardi 18 octobre 2005  16:37 +0200, Hubert FONGARNAND a crit :
I confirm it still fails with this test case (updated on bugzilla)



Well, thank you for the fix... 

But it fails now with a length200ko

you can try :

private void MyButton_Click(object sender,EventArgs e)
{
int length=20;
byte[] buffer=new byte[length];
Response.ClearHeaders();
Response.Clear();
Response.AddHeader(Content-Disposition,attachment;
filename=\+essai+\);
Response.AppendHeader(Content-Length,length.ToString());
Response.StatusCode = 200;
Response.OutputStream.Write(buffer,0,length);
Response.End();
Response.Flush();
}

you will get :
[EMAIL PROTECTED] /home/monoapp/WebApplication1 $ xsp
xsp
Listening on port: 8080 (non-secure)
Listening on address: 0.0.0.0
Root directory: /home/monoapp/WebApplication1
Hit Return to stop the server.

** (process:11870): ERROR (recursed) **: file mini-trampolines.c: line
28 (mono_magic_trampoline): assertion failed: (addr)
aborting...
Erreur de segmentation

I've updated the bug report...
thank in advance
hubert


Le lundi 17 octobre 2005  20:49 -0400, Gonzalo Paniagua Javier a crit : 


On Mon, 2005-10-17 at 20:33 -0400, Gonzalo Paniagua Javier wrote:
 On Mon, 2005-10-17 at 11:08 +0200, Hubert FONGARNAND wrote:
  http://bugzilla.ximian.com/show_bug.cgi?id=76460

It's fixed now.

For those of you seeing weird libc errors and xsp dying, please try
http://primates.ximian.com/~gonzalo/System.Web.dll.gz (gunzip + gacutil
-i), as I think it's the same problem as the one reported by Hubert.

Thanks.

-Gonzalo


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


___
Ce message et les ventuels documents joints peuvent contenir des informations confidentielles.
Au cas oa il ne vous serait pas destin, nous vous remercions de bien vouloir le supprimer et en aviser immtdiatement l'expditeur. Toute utilisation de ce message non conforme sa destination, toute diffusion ou publication, totale ou partielle et quel qu'en soit le moyen est formellement interdite.
Les communications sur internet n'tant pas spcurises, l'intrgrit de ce message n'est pas assur e et la socit mettrice ne peut 0tre tenue pour responsable de son contenu. 

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


___Ce message et les éventuels documents joints peuvent contenir des informations confidentielles.Au cas où il ne vous serait pas destiné, nous vous remercions de bien vouloir le supprimer et en aviser immédiatement l'expéditeur. Toute utilisation de ce message non conforme à sa destination, toute diffusion ou publication, totale ou partielle et quel qu'en soit le moyen est formellement interdite.Les communications sur internet n'étant pas sécurisées, l'intégrité de ce message n'est pas assurée et la société émettrice ne peut être tenue pour responsable de son contenu.

Title: Test
<%@ Page language="c#" %>








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


[Mono-dev] ImageList patches r51171 and r51889 are not compatible with MS.NET behaviour

2005-10-19 Thread Kornél Pál

Hi,

MS.NET ImageList creates handle when you first time retrieve or draw any of
it's images. Until that is stores the original image object, after handle
creation it uses a native ImageList. It applies size and color depth when
handle is created. (This is documented in ImageList.cs.)

After handle is created modifying ColorDepth or ImageSize results in handle
recreation and the loss of all images.

As we don't create any handle at all I decided to create it when images are
added and apply size and colordepth when handle is created in other words
when they are added.

Patches r51171 and r51889 are not compatible with MS.NET behaviour as they
don't clear images after handle was created so these modifications should
not be preserved.

I belive that caching the images until using them is a bad idea as we don't
use any native image list and doing time consuming operations at
initializaion is better as if you create an ImageList you do it because you
want to access the images.

If you think caching before handle creation behaviour is important after
considering the above things please let me know and I will implement that
behaviour.

Kornél

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


Re: [Mono-dev] Extern alias patch (latest modifications)

2005-10-19 Thread Marek Safar

Hello Carlos,


Hey, all the remainign issues are fixed now. All my tests are running
fine and that repeated code has been refactored to report the remaining
warnings in the same place.
 


It looks good to me.

Marek




Index: typemanager.cs
===
--- typemanager.cs  (revisión: 51903)
+++ typemanager.cs  (copia de trabajo)
@@ -215,6 +215,8 @@
// /remarks
static Assembly [] assemblies;

+   static Hashtable external_aliases;
+
// remarks
//  Keeps a list of modules. We used this to do lookups
//  on the module using GetType -- needed for arrays
@@ -278,6 +280,7 @@
// Lets get everything clean so that we can collect before 
generating code
assemblies = null;
modules = null;
+   external_aliases = null;
builder_to_declspace = null;
builder_to_member_cache = null;
builder_to_ifaces = null;
@@ -379,6 +382,7 @@
assemblies = new Assembly [0];
modules = null;

+   external_aliases = new Hashtable ();
builder_to_declspace = new PtrHashtable ();
builder_to_member_cache = new PtrHashtable ();
builder_to_method = new PtrHashtable ();
@@ -504,11 +508,22 @@
assemblies = n;
}

+   public static void AddExternAlias (string alias, Assembly a)
+   {
+   // Keep the new as the chosen one
+   external_aliases [alias] = a;
+   }
+
public static Assembly [] GetAssemblies ()
{
return assemblies;
}

+   public static Assembly GetExternAlias (string alias)
+   {
+   return (Assembly) external_aliases [alias];
+   }
+
/// summary
///  Registers a module builder to lookup types from
/// /summary
@@ -578,110 +593,26 @@
return (Type) ret;
}

-   public static Type LookupTypeReflection (string name, Location loc)
-   {
-   Type found_type = null;
-
-   foreach (Assembly a in assemblies) {
-   Type t = a.GetType (name);
-   if (t == null)
-   continue;
-
-   if (t.IsPointer)
-   throw new InternalErrorException (Use 
GetPointerType() to get a pointer);
-
-   TypeAttributes ta = t.Attributes  
TypeAttributes.VisibilityMask;
-   if (ta != TypeAttributes.NotPublic  ta != 
TypeAttributes.NestedPrivate 
-   ta != TypeAttributes.NestedAssembly  ta != 
TypeAttributes.NestedFamANDAssem) {
-   if (found_type == null) {
-   found_type = t;
-   continue;
-   }
-
-   Report.SymbolRelatedToPreviousError 
(found_type);
-   Report.SymbolRelatedToPreviousError (t);
-   Report.Error (433, loc, The imported type `{0}' is 
defined multiple times, name);
-   return found_type;
-   }
-   }
-
-   foreach (Module mb in modules) {
-   Type t = mb.GetType (name);
-   if (t == null)
-   continue;
-   
-   if (found_type == null) {
-   found_type = t;
-   continue;
-   }
-
-   Report.SymbolRelatedToPreviousError (t);
-   Report.SymbolRelatedToPreviousError (found_type);
-   Report.Warning (436, 2, loc, Ignoring imported type `{0}' 
since the current assembly already has a declaration with the same name,
-   TypeManager.CSharpName (t));
-   return t;
-   }
-
-   return found_type;
-   }
-
/// summary
///   Computes the namespaces that we import from the assemblies we 
reference.
/// /summary
public static void ComputeNamespaces ()
{
-   MethodInfo assembly_get_namespaces = typeof (Assembly).GetMethod 
(GetNamespaces, BindingFlags.Instance|BindingFlags.NonPublic);
+   foreach (Assembly assembly in assemblies)
+   GlobalRootNamespace.Global.AddAssemblyReference 
(assembly);
+   
+   foreach (Module m in modules)
+   GlobalRootNamespace.Global.AddModuleReference (m);

-   Hashtable cache = null;
+   }

-   //
-   // First add the 

[Mono-dev] Re: ImageList patches r51171 and r51889 are not compatible with MS.NET behaviour

2005-10-19 Thread Jackson Harper
On Wed, 2005-10-19 at 11:10 +0200, Kornél Pál wrote:
 Hi,
 
 MS.NET ImageList creates handle when you first time retrieve or draw any of
 it's images. Until that is stores the original image object, after handle
 creation it uses a native ImageList. It applies size and color depth when
 handle is created. (This is documented in ImageList.cs.)
 
 After handle is created modifying ColorDepth or ImageSize results in handle
 recreation and the loss of all images.
 
 As we don't create any handle at all I decided to create it when images are
 added and apply size and colordepth when handle is created in other words
 when they are added.
 
 Patches r51171 and r51889 are not compatible with MS.NET behaviour as they
 don't clear images after handle was created so these modifications should
 not be preserved.

Well what you had broke an existing application that runs fine on
MS.NET, so you aren't entirely right.  I'm writing a test application
now to find out when the images are cleared.

Jackson


 I belive that caching the images until using them is a bad idea as we don't
 use any native image list and doing time consuming operations at
 initializaion is better as if you create an ImageList you do it because you
 want to access the images.
 
 If you think caching before handle creation behaviour is important after
 considering the above things please let me know and I will implement that
 behaviour.
 
 Kornél
 

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


Re: [Mono-dev] Re: ImageList patches r51171 and r51889 are notcompatible with MS.NET behaviour

2005-10-19 Thread Kornél Pál

Hi,

Please read my original message one again.:) I explained the differences
between MS.NET and this implementation. This difference is documented in my
previous message, in ImageList.cs and was documented when the modifications
were approved. And told you that if you think that this difference is
important let me know and I will modify ImageList to match MS.NET behaviour.
I did not say that everything is the same as in MS.NET I only said that I
don't think that MS.NET behaviour should be followed.

Usually it's a bad practicle to add images befor setting ColorDepth and
Images size but if you do so images will be cleared on Mono currently but
will not be cleared on MS.NET if handle was not created yet. Note that on
MS.NET if you modify ImageSize after adding images image strips will be
added incorrectly (if their size matches new size) or exception will be
thrown when creating handle and you will be unable to use the image list.

Your patch should not be retained because images are not modified after
handle was created the list is cleared instead.

And reducing image size without using ReduceColorDepth will result in 32-bit
images because of calculated colors.

Kornél

- Original Message -
From: Jackson Harper [EMAIL PROTECTED]
To: Kornél Pál [EMAIL PROTECTED]
Cc: mono-devel-list@lists.ximian.com
Sent: Wednesday, October 19, 2005 6:27 PM
Subject: [Mono-dev] Re: ImageList patches r51171 and r51889 are
notcompatible with MS.NET behaviour



On Wed, 2005-10-19 at 11:10 +0200, Kornél Pál wrote:

Hi,

MS.NET ImageList creates handle when you first time retrieve or draw any
of
it's images. Until that is stores the original image object, after handle
creation it uses a native ImageList. It applies size and color depth when
handle is created. (This is documented in ImageList.cs.)

After handle is created modifying ColorDepth or ImageSize results in
handle
recreation and the loss of all images.

As we don't create any handle at all I decided to create it when images
are
added and apply size and colordepth when handle is created in other words
when they are added.

Patches r51171 and r51889 are not compatible with MS.NET behaviour as
they
don't clear images after handle was created so these modifications should
not be preserved.


Well what you had broke an existing application that runs fine on
MS.NET, so you aren't entirely right.  I'm writing a test application
now to find out when the images are cleared.

Jackson



I belive that caching the images until using them is a bad idea as we
don't
use any native image list and doing time consuming operations at
initializaion is better as if you create an ImageList you do it because
you
want to access the images.

If you think caching before handle creation behaviour is important after
considering the above things please let me know and I will implement that
behaviour.

Kornél



___
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] Re: ImageList patches r51171 and r51889 are notcompatible with MS.NET behaviour

2005-10-19 Thread Jackson Harper
On Wed, 2005-10-19 at 19:05 +0200, Kornél Pál wrote:
 Hi,
 
 Please read my original message one again.:) I explained the differences
 between MS.NET and this implementation. This difference is documented in my
 previous message, in ImageList.cs and was documented when the modifications
 were approved. And told you that if you think that this difference is
 important let me know and I will modify ImageList to match MS.NET behaviour.
 I did not say that everything is the same as in MS.NET I only said that I
 don't think that MS.NET behaviour should be followed.

Well we need it to be in a state where it does not crash existing
applictions. Please modify it to match the MS behavoir.  Many apps are
closed source and we can't modify them to use best practices, so we have
to match their behavoir as closely as possible.

Jackson


 Usually it's a bad practicle to add images befor setting ColorDepth and
 Images size but if you do so images will be cleared on Mono currently but
 will not be cleared on MS.NET if handle was not created yet. Note that on
 MS.NET if you modify ImageSize after adding images image strips will be
 added incorrectly (if their size matches new size) or exception will be
 thrown when creating handle and you will be unable to use the image list.
 
 Your patch should not be retained because images are not modified after
 handle was created the list is cleared instead.
 
 And reducing image size without using ReduceColorDepth will result in 32-bit
 images because of calculated colors.
 
 Kornél
 
 - Original Message -
 From: Jackson Harper [EMAIL PROTECTED]
 To: Kornél Pál [EMAIL PROTECTED]
 Cc: mono-devel-list@lists.ximian.com
 Sent: Wednesday, October 19, 2005 6:27 PM
 Subject: [Mono-dev] Re: ImageList patches r51171 and r51889 are
 notcompatible with MS.NET behaviour
 
 
  On Wed, 2005-10-19 at 11:10 +0200, Kornél Pál wrote:
  Hi,
 
  MS.NET ImageList creates handle when you first time retrieve or draw any
  of
  it's images. Until that is stores the original image object, after handle
  creation it uses a native ImageList. It applies size and color depth when
  handle is created. (This is documented in ImageList.cs.)
 
  After handle is created modifying ColorDepth or ImageSize results in
  handle
  recreation and the loss of all images.
 
  As we don't create any handle at all I decided to create it when images
  are
  added and apply size and colordepth when handle is created in other words
  when they are added.
 
  Patches r51171 and r51889 are not compatible with MS.NET behaviour as
  they
  don't clear images after handle was created so these modifications should
  not be preserved.
 
  Well what you had broke an existing application that runs fine on
  MS.NET, so you aren't entirely right.  I'm writing a test application
  now to find out when the images are cleared.
 
  Jackson
 
 
  I belive that caching the images until using them is a bad idea as we
  don't
  use any native image list and doing time consuming operations at
  initializaion is better as if you create an ImageList you do it because
  you
  want to access the images.
 
  If you think caching before handle creation behaviour is important after
  considering the above things please let me know and I will implement that
  behaviour.
 
  Kornél
 
 
  ___
  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] System.Security.Cryptography : TripleDES Issue

2005-10-19 Thread Yogendra Thakur
Sebastien,

I have opened bug for this issue (bug# 76483).
Please see attached file for source code.

To Compile : mcs TestEncryption.cs
To Run : mono TestEncryption.exe

Result :

Unhandled Exception:
System.Security.Cryptography.CryptographicException: IV length cannot be
larger than block size
in 0x000e0 System.Security.Cryptography.SymmetricAlgorithm:set_IV
(System.Byte[] value)
in 0x00020
System.Security.Cryptography.TripleDESCryptoServiceProvider:CreateEncryp
tor (System.Byte[] rgbKey, System.Byte[] rgbIV)
in 0x0013d TestEncryption.TestEncryption:Main (System.String[] args)



Regards,
Yogendra Thakur

-Original Message-
From: Sebastien Pouliot [mailto:[EMAIL PROTECTED] 
Sent: Monday, October 17, 2005 7:18 PM
To: Yogendra Thakur
Cc: mono-devel-list@lists.ximian.com
Subject: Re: [Mono-dev] System.Security.Cryptography : TripleDES Issue

Hello Yogendra,

On Mon, 2005-10-17 at 17:39 -0400, Yogendra Thakur wrote:
 Hello,
 
 Is Triple DES Encryption supported in Mono?

yes

 I have small code which uses Triple DES algorithm to encrypt /Decrypt
 data.
 This works fine in MS .NET. When I run same code on Mono, it throws
IV
 length can not be greater than Block Size exception. 

Sorry I can't help you without more details.

Please open a bug report at http://bugzilla.ximian.com and include a
small source code sample that reproduce the problem. Don't forget to
indicate which version of Mono you are using and on which platform.

 I don't find any entry for this class in documentation. I searched
data
 base but couldn't find anything.

You can access the documentation from http://www.mono-project.com
Click on manuals and docs (icon on top right) then navigate the tree
view to get to the desired class documentation.

Here's a direct link to the TripleDES class
http://www.go-mono.com/docs/monodoc.ashx?link=T%
3aSystem.Security.Cryptography.TripleDES

 Also I see Crypto classes are implemented under two different
namespaces
 System.Security.Cryptography and Mono.Security.Cryptography. What is
the
 difference between them?

System.Security.Cryptography implements the same classes (i.e. same
features/same limites) as MS base class library.

Mono.Security.Cryptography offer extra classes (i.e. not available on
the MS framework).
-- 
Sebastien Pouliot
email: [EMAIL PROTECTED]
blog: http://pages.infinit.net/ctech/


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


[Mono-dev] gmcs patch to fix gcs0310-3.cs test working

2005-10-19 Thread Atsushi Eno
Hi,

I noticed that mcs/errors/gcs0310-3.cs is not rejected as expected.
The attached patch fixes this problem. Does it look OK to commit?

Atsushi Eno
Index: generic.cs
===
--- generic.cs  (revision 51926)
+++ generic.cs  (working copy)
@@ -1395,7 +1395,22 @@
if (TypeManager.IsBuiltinType (atype) || 
atype.IsValueType)
return true;
 
+   if (HasDefaultConstructor (ec, atype))
+   return true;
+
+   Report.Error (310, loc, The type `{0}' must have a 
public  +
+ parameterless constructor in order to 
use it  +
+ as parameter `{1}' in the generic type 
or  +
+ method `{2}', atype, ptype, 
DeclarationName);
+   return false;
+   }
+
+   bool HasDefaultConstructor (EmitContext ec, Type atype)
+   {
if (atype is TypeBuilder) {
+   if (atype.IsAbstract)
+   return false;
+
TypeContainer tc = 
TypeManager.LookupTypeContainer (atype);
foreach (Constructor c in 
tc.InstanceConstructors) {
if ((c.ModFlags  Modifiers.PUBLIC) == 
0)
@@ -1425,10 +1440,6 @@
}
}
 
-   Report.Error (310, loc, The type `{0}' must have a 
public  +
- parameterless constructor in order to 
use it  +
- as parameter `{1}' in the generic type 
or  +
- method `{2}', atype, ptype, 
DeclarationName);
return false;
}
 
Index: ChangeLog
===
--- ChangeLog   (revision 51926)
+++ ChangeLog   (working copy)
@@ -1,3 +1,10 @@
+2005-10-19  Atsushi Enomoto  [EMAIL PROTECTED]
+
+   * generic.cs : (ConstructedType.CheckConstraints) warn CS0310 when
+ 1) new() is specified as generic parameter constraint and 2) the
+ type is TypeBuilder and 3) the type is abstract even if it has a
+ default .ctor(). Now errors/gcs0310-3.cs is correctly rejected.
+
 2005-10-19  Martin Baulig  [EMAIL PROTECTED]
 
* class.cs (TypeContainer.DefineType): Only use ResolveAsTypeStep(),
___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


[Mono-dev] Mono

2005-10-19 Thread Zymmeral
When will there be a C++ compiler for Mono?



__ 
Start your day with Yahoo! - Make it your home page! 
http://www.yahoo.com/r/hs
___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


[Mono-dev] profiler patch

2005-10-19 Thread Jackson Harper
Anyone have any problems with this small patch so the profiler prints
names correctly when they aren't in a namespace?

Thanks
Jackson


Index: mono/metadata/profiler.c
===
--- mono/metadata/profiler.c	(revision 51942)
+++ mono/metadata/profiler.c	(working copy)
@@ -706,7 +706,8 @@
 	char *sig, *res;
 	
 	sig = mono_signature_get_desc (mono_method_signature (method), FALSE);
-	res = g_strdup_printf (%s.%s::%s(%s), method-klass-name_space, method-klass-name,
+	res = g_strdup_printf (%s%s%s::%s(%s), method-klass-name_space,
+			method-klass-name_space ? . : , method-klass-name,
 		method-name, sig);
 	g_free (sig);
 	return res;
@@ -874,8 +875,8 @@
 			} else {
 isarray = ;
 			}
-			g_snprintf (buf, sizeof (buf), %s.%s%s,
-klass-name_space, klass-name, isarray);
+			g_snprintf (buf, sizeof (buf), %s%%s%s,
+klass-name_space, klass-name_space ? . : , klass-name, isarray);
 			g_print (%8 G_GUINT64_FORMAT  KB %8 G_GUINT64_FORMAT  %-48s\n, (ainfo-mem / 1024), ainfo-count, buf);
 		}
 		/* callers */
___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


Re: [Mono-dev] profiler patch

2005-10-19 Thread Zoltan Varga
This is ok to check in.

On 10/19/05, Jackson Harper [EMAIL PROTECTED] wrote:
 Anyone have any problems with this small patch so the profiler prints
 names correctly when they aren't in a namespace?

 Thanks
 Jackson




 ___
 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] gmcs patch to fix gcs0310-3.cs test working

2005-10-19 Thread Martin Baulig
On Thu, 2005-10-20 at 04:03 +0900, Atsushi Eno wrote:

 I noticed that mcs/errors/gcs0310-3.cs is not rejected as expected.
 The attached patch fixes this problem. Does it look OK to commit?

Hi,

patch looks good, but you may run into conflicts when committing due to
my recent changes.

Cool to have you working on gmcs :-)

Martin

 
 Atsushi Eno
 Plain text document attachment (fix-cs0310-3.patch)
 Index: generic.cs
 ===
 --- generic.cs(revision 51926)
 +++ generic.cs(working copy)
 @@ -1395,7 +1395,22 @@
   if (TypeManager.IsBuiltinType (atype) || 
 atype.IsValueType)
   return true;
  
 + if (HasDefaultConstructor (ec, atype))
 + return true;
 +
 + Report.Error (310, loc, The type `{0}' must have a 
 public  +
 +   parameterless constructor in order to 
 use it  +
 +   as parameter `{1}' in the generic type 
 or  +
 +   method `{2}', atype, ptype, 
 DeclarationName);
 + return false;
 + }
 +
 + bool HasDefaultConstructor (EmitContext ec, Type atype)
 + {
   if (atype is TypeBuilder) {
 + if (atype.IsAbstract)
 + return false;
 +
   TypeContainer tc = 
 TypeManager.LookupTypeContainer (atype);
   foreach (Constructor c in 
 tc.InstanceConstructors) {
   if ((c.ModFlags  Modifiers.PUBLIC) == 
 0)
 @@ -1425,10 +1440,6 @@
   }
   }
  
 - Report.Error (310, loc, The type `{0}' must have a 
 public  +
 -   parameterless constructor in order to 
 use it  +
 -   as parameter `{1}' in the generic type 
 or  +
 -   method `{2}', atype, ptype, 
 DeclarationName);
   return false;
   }
  
 Index: ChangeLog
 ===
 --- ChangeLog (revision 51926)
 +++ ChangeLog (working copy)
 @@ -1,3 +1,10 @@
 +2005-10-19  Atsushi Enomoto  [EMAIL PROTECTED]
 +
 + * generic.cs : (ConstructedType.CheckConstraints) warn CS0310 when
 +   1) new() is specified as generic parameter constraint and 2) the
 +   type is TypeBuilder and 3) the type is abstract even if it has a
 +   default .ctor(). Now errors/gcs0310-3.cs is correctly rejected.
 +
  2005-10-19  Martin Baulig  [EMAIL PROTECTED]
  
   * class.cs (TypeContainer.DefineType): Only use ResolveAsTypeStep(),
 ___
 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] C# and SWT

2005-10-19 Thread Everaldo Canuto
Hi Elan,

Why you dont uses Gtk#? Is a nice toolkit and run under Linux and
Windows (I am not sure about Mac). Some months ago I make a GUI frontend
to OpenVPN and I use GTK# and works fine on Windows and Linux.

http://www.expl0it.de/OpenVPNAdminScreenshots.html
http://www.expl0it.de/wizard.html

The source code is avaliable at SourceForge, take a look at code, maybe
can help you: http://sourceforge.net/projects/openvpnadmin


Best resgards,
Everaldo
[EMAIL PROTECTED]


Em Qua, 2005-10-19 às 20:08 -0700, Elan Feingold escreveu:
 Hi,
  
 I'm working on a C# GUI-based project, which I want to run on
 Windows/Mac/Linux, and with native widgets. It seems my only choice at the
 moment is wxWidgets + C# bindings. What I'd really like to use is SWT, the
 excellent Java GUI toolkit.
  
 Once upon a time, there was a project to port SWT to C#, but that project
 seems to have quietly died. And then there's the IKVM project, which seems
 to be able to run Eclipse (and thus SWT) under Mono's VM -- but I'm not sure
 if that means I can write C# code that uses SWT.
 
 Any ideas or thoughts?
 
 Thanks,
 
 -elan
 
 ___
 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] gmcs patch to fix gcs0310-3.cs test working

2005-10-19 Thread Atsushi Eno
Hi,

 I noticed that mcs/errors/gcs0310-3.cs is not rejected as expected.
 The attached patch fixes this problem. Does it look OK to commit?
 
 Hi,
 
 patch looks good, but you may run into conflicts when committing due to
 my recent changes.

Ok it's in svn now. There was no conflict.

 Cool to have you working on gmcs :-)

My pleasure :-)

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


[Mono-dev] Re: [Mono-list] generic KeyedCollection implementation

2005-10-19 Thread Atsushi Eno

Hi,

I think this patch does what we need - some protected virtual methods
such as SetItem() should be used for every content-changing methods.
Can anyone review it?

Atsushi Eno

Carlo Kok wrote:
Attached to this email an incremental patch for the KeyedCollection ( to 
be applied in the \mcs\class\corlib\System.Collections.ObjectModel 
directory. Also included is a testcase, tested with both Beta2 and my 
own implementation.


I followed the existing testcases I could find in SVN. The two almost 
idental guides on the wiki seem to be out of date:


http://www.mono-project.com/Test_Suite
http://www.mono-project.com/Mono_Contribution_HOWTO

comments?

I used the SVN Patch ability of tortoisesvn, if I did that wrong, please 
tell me what I should use instead.


--
Carlo Kok

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


Re: [Mono-list] Mono and MS Office suite

2005-10-19 Thread tom potts
I'm not sure about this but I would imagine .NET calls
Office thru its COM/COM+ layer thru wrapper
dll's/PInvoke. 
Mono should be able to do the same.
If you only need to access a few functions then it
could be quick to write the PInvokes.
If you could make those publicly available then others
could add their requirements and soon Mono would be
able to do it all as well...
 



___ 
To help you stay safe and secure online, we've developed the all new Yahoo! 
Security Centre. http://uk.security.yahoo.com
___
Mono-list maillist  -  Mono-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list


[Mono-list] generic KeyedCollection implementation

2005-10-19 Thread Carlo Kok
Attached to this email an incremental patch for the KeyedCollection ( to 
be applied in the \mcs\class\corlib\System.Collections.ObjectModel 
directory. Also included is a testcase, tested with both Beta2 and my 
own implementation.


I followed the existing testcases I could find in SVN. The two almost 
idental guides on the wiki seem to be out of date:


http://www.mono-project.com/Test_Suite
http://www.mono-project.com/Mono_Contribution_HOWTO

comments?

I used the SVN Patch ability of tortoisesvn, if I did that wrong, please 
tell me what I should use instead.


--
Carlo Kok
Index: Collection.cs
===
--- Collection.cs   (revision 51865)
+++ Collection.cs   (working copy)
@@ -68,11 +68,17 @@
 
public void Add (T item)
{
-   list.Add (item);
+   int idx = list.Count;
+   InsertItem (idx, item);
}
 
public void Clear ()
{
+   ClearItems ();
+   }
+
+   protected virtual void ClearItems ()
+   {
list.Clear ();
}
 
@@ -98,16 +104,32 @@
 
public void Insert (int index, T item)
{
+   InsertItem (index, item);
+   }
+
+   protected virtual void InsertItem (int index, T item)
+   {
list.Insert (index, item);
}
 
public bool Remove (T item)
{
-   return list.Remove (item);
+   int idx = IndexOf (item);
+   if (idx == -1) 
+   return false;
+   
+   RemoveItem (idx);
+   
+   return true;
}
 
public void RemoveAt (int index)
{
+   RemoveItem (index);
+   }
+
+   protected virtual void RemoveItem (int index)
+   {
list.RemoveAt (index);
}
 
@@ -117,12 +139,18 @@
 
public virtual T this [int index] {
get { return list [index]; }
-   set { list [index] = value; }
+   set { SetItem (index, value); }
}
 
public bool IsReadOnly {
get { return list.IsReadOnly; }
}
+
+   protected virtual void SetItem (int index, T item)
+   {
+   list[index] = item;
+   }
+

 #region Helper methods for non-generic interfaces

@@ -173,8 +201,9 @@

int IList.Add (object item)
{
-   list.Add (ConvertItem (item));
-   return list.Count - 1;
+   int idx = list.Count;
+   InsertItem (idx, ConvertItem (item));
+   return idx;
}

bool IList.Contains (object item)
@@ -193,13 +222,16 @@

void IList.Insert (int index, object item)
{
-   list.Insert (index, ConvertItem (item));
+   InsertItem (index, ConvertItem (item));
}

void IList.Remove (object item)
{
CheckWritable (list);
-   list.Remove (ConvertItem (item));
+
+   int idx = IndexOf (ConvertItem (item));
+
+   RemoveItem (idx);
}

bool ICollection.IsSynchronized {
@@ -219,7 +251,7 @@

object IList.this [int index] {
get { return list [index]; }
-   set { list [index] = ConvertItem (value); }
+   set { SetItem (index, ConvertItem (value)); }
}
 #endregion
}
Index: KeyedCollection.cs
===
--- KeyedCollection.cs  (revision 51865)
+++ KeyedCollection.cs  (working copy)
@@ -42,58 +42,167 @@
[Serializable]
public abstract class KeyedCollectionTKey, TItem : CollectionTItem
{
+   private DictionaryTKey, TItem dictionary;
+   private IEqualityComparerTKey comparer;
+   private int dictionaryCreationThreshold;
+
+   protected KeyedCollection ()
+   : this (null, 0)
+   { 
+   }
+
+   protected KeyedCollection (IEqualityComparerTKey comparer)
+   : this(comparer, 0)
+ 

[Mono-list] Reflection odd exception

2005-10-19 Thread Carlos Ble
Hi!
Iam working with reflection by loading some clases dinamically. This is
a piece of pseudo code:
System.Object[] paramsObj = new System.Object[] {...params...};
Assembly assembly = Assembly.GetExecutingAssembly();
System.Object childWin =   
  AppDomain.CurrentDomain.CreateInstanceAndUnwrap(assembly.FullName,
  managerClass,true, BindingFlags.Instance|BindingFlags.Public,
  null, paramsObj, null, null, null);

Everything works fine but one of the classes to load has this method:

bool OnWinDeleteEvent (Gdk.Event e) // Instead of (object o, EventArgs
e).
{
  ...
  return true;
}

I can compile all successfull but in runtime, CreateInstanceAndUnwrap
call launchs this exception: 

Exception has been thrown by the target of an invocation.
in 0x0010e System.Reflection.MonoCMethod:Invoke (System.Object obj,
BindingFlags invokeAttr, System.Reflection.Binder binder,
System.Object[] parameters, System.Globalization.CultureInfo culture)
in 0x0001c System.Reflection.MonoCMethod:Invoke (BindingFlags
invokeAttr, System.Reflection.Binder binder, System.Object[] parameters,
System.Globalization.CultureInfo culture)
in 0x00200 System.Activator:CreateInstance (System.Type type,
BindingFlags bindingAttr, System.Reflection.Binder binder,
System.Object[] args, System.Globalization.CultureInfo culture,
System.Object[] activationAttributes)
in 0x0005b System.Activator:CreateInstance (System.String
assemblyName, System.String typeName, Boolean ignoreCase, BindingFlags
bindingAttr, System.Reflection.Binder binder, System.Object[] args,
System.Globalization.CultureInfo culture, System.Object[]
activationAttributes, System.Security.Policy.Evidence securityInfo)
in 0x0002d System.AppDomain:CreateInstance (System.String
assemblyName, System.String typeName, Boolean ignoreCase, BindingFlags
bindingAttr, System.Reflection.Binder binder, System.Object[] args,
System.Globalization.CultureInfo culture, System.Object[]
activationAttributes, System.Security.Policy.Evidence
securityAttributes)
in (wrapper remoting-invoke-with-check) System.AppDomain:CreateInstance
(string,string,bool,System.Reflection.BindingFlags,System.Reflection.Binder,object[],System.Globalization.CultureInfo,object[],System.Security.Policy.Evidence)
in 0x0002e System.AppDomain:CreateInstanceAndUnwrap (System.String
assemblyName, System.String typeName, Boolean ignoreCase, BindingFlags
bindingAttr, System.Reflection.Binder binder, System.Object[] args,
System.Globalization.CultureInfo culture, System.Object[]
activationAttributes, System.Security.Policy.Evidence
securityAttributes)
in (wrapper remoting-invoke-with-check)
System.AppDomain:CreateInstanceAndUnwrap
(string,string,bool,System.Reflection.BindingFlags,System.Reflection.Binder,object[],System.Globalization.CultureInfo,object[],System.Security.Policy.Evidence)

If I change arguments to (object o, EventArgs e), it works fine. Can
somebody write some comments about this behaviour?.

Thanks


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


Re: [Mono-list] Reflection odd exception

2005-10-19 Thread Elliott Draper
I'd hazard a guess and say it's because you don't have a reference to 
the relevant Gdk assemblies, or they can't be found in the path, gac 
etc. As such when it's creating this object, it's coming unstuck because 
that class is using a type that it can't find, hence when you change it 
to using types it can find (object, EventArgs), there's no problem.


Either way, you can check the inner exception of that exception to get 
the exact error. It'll tell you in there what the problem is, and 
whether it is in fact a problem with the call using that type, or 
whether I'm way off the mark and it's something completely different :-)


Let me know how you get on.

Cheers,
-= El =-

Carlos Ble wrote:


Hi!
Iam working with reflection by loading some clases dinamically. This is
a piece of pseudo code:
System.Object[] paramsObj = new System.Object[] {...params...};
Assembly assembly = Assembly.GetExecutingAssembly();
System.Object childWin =   
 AppDomain.CurrentDomain.CreateInstanceAndUnwrap(assembly.FullName,
 managerClass,true, BindingFlags.Instance|BindingFlags.Public,

 null, paramsObj, null, null, null);

Everything works fine but one of the classes to load has this method:

bool OnWinDeleteEvent (Gdk.Event e) // Instead of (object o, EventArgs
e).
{
 ...
 return true;
}

I can compile all successfull but in runtime, CreateInstanceAndUnwrap
call launchs this exception: 


Exception has been thrown by the target of an invocation.
in 0x0010e System.Reflection.MonoCMethod:Invoke (System.Object obj,
BindingFlags invokeAttr, System.Reflection.Binder binder,
System.Object[] parameters, System.Globalization.CultureInfo culture)
in 0x0001c System.Reflection.MonoCMethod:Invoke (BindingFlags
invokeAttr, System.Reflection.Binder binder, System.Object[] parameters,
System.Globalization.CultureInfo culture)
in 0x00200 System.Activator:CreateInstance (System.Type type,
BindingFlags bindingAttr, System.Reflection.Binder binder,
System.Object[] args, System.Globalization.CultureInfo culture,
System.Object[] activationAttributes)
in 0x0005b System.Activator:CreateInstance (System.String
assemblyName, System.String typeName, Boolean ignoreCase, BindingFlags
bindingAttr, System.Reflection.Binder binder, System.Object[] args,
System.Globalization.CultureInfo culture, System.Object[]
activationAttributes, System.Security.Policy.Evidence securityInfo)
in 0x0002d System.AppDomain:CreateInstance (System.String
assemblyName, System.String typeName, Boolean ignoreCase, BindingFlags
bindingAttr, System.Reflection.Binder binder, System.Object[] args,
System.Globalization.CultureInfo culture, System.Object[]
activationAttributes, System.Security.Policy.Evidence
securityAttributes)
in (wrapper remoting-invoke-with-check) System.AppDomain:CreateInstance
(string,string,bool,System.Reflection.BindingFlags,System.Reflection.Binder,object[],System.Globalization.CultureInfo,object[],System.Security.Policy.Evidence)
in 0x0002e System.AppDomain:CreateInstanceAndUnwrap (System.String
assemblyName, System.String typeName, Boolean ignoreCase, BindingFlags
bindingAttr, System.Reflection.Binder binder, System.Object[] args,
System.Globalization.CultureInfo culture, System.Object[]
activationAttributes, System.Security.Policy.Evidence
securityAttributes)
in (wrapper remoting-invoke-with-check)
System.AppDomain:CreateInstanceAndUnwrap
(string,string,bool,System.Reflection.BindingFlags,System.Reflection.Binder,object[],System.Globalization.CultureInfo,object[],System.Security.Policy.Evidence)

If I change arguments to (object o, EventArgs e), it works fine. Can
somebody write some comments about this behaviour?.

Thanks


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



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


Re: [Mono-list] Reflection odd exception

2005-10-19 Thread Carlos Ble
Thanks Elliott.
Following the InnerException I have noticed that the exception is
normal, the problem is simple. When trying to Autoconnect (because im
using glade) it searchs for OnWinDeleteEvent(object o, EventArgs e) and 
doesnt find it. So the problem is not in reflection neither assemblies, 
is my error; When you define signals on glade they must be implemented
in code with expected arguments. 
Sorry.

El mié, 19-10-2005 a las 11:42 +0100, Elliott Draper escribió:
 I'd hazard a guess and say it's because you don't have a reference to 
 the relevant Gdk assemblies, or they can't be found in the path, gac 
 etc. As such when it's creating this object, it's coming unstuck because 
 that class is using a type that it can't find, hence when you change it 
 to using types it can find (object, EventArgs), there's no problem.
 
 Either way, you can check the inner exception of that exception to get 
 the exact error. It'll tell you in there what the problem is, and 
 whether it is in fact a problem with the call using that type, or 
 whether I'm way off the mark and it's something completely different :-)
 
 Let me know how you get on.
 
 Cheers,
 -= El =-
 
 Carlos Ble wrote:
 
 Hi!
 Iam working with reflection by loading some clases dinamically. This is
 a piece of pseudo code:
 System.Object[] paramsObj = new System.Object[] {...params...};
 Assembly assembly = Assembly.GetExecutingAssembly();
 System.Object childWin =   
   AppDomain.CurrentDomain.CreateInstanceAndUnwrap(assembly.FullName,
   managerClass,true, BindingFlags.Instance|BindingFlags.Public,
   null, paramsObj, null, null, null);
 
 Everything works fine but one of the classes to load has this method:
 
 bool OnWinDeleteEvent (Gdk.Event e) // Instead of (object o, EventArgs
 e).
 {
   ...
   return true;
 }
 
 I can compile all successfull but in runtime, CreateInstanceAndUnwrap
 call launchs this exception: 
 
 Exception has been thrown by the target of an invocation.
 in 0x0010e System.Reflection.MonoCMethod:Invoke (System.Object obj,
 BindingFlags invokeAttr, System.Reflection.Binder binder,
 System.Object[] parameters, System.Globalization.CultureInfo culture)
 in 0x0001c System.Reflection.MonoCMethod:Invoke (BindingFlags
 invokeAttr, System.Reflection.Binder binder, System.Object[] parameters,
 System.Globalization.CultureInfo culture)
 in 0x00200 System.Activator:CreateInstance (System.Type type,
 BindingFlags bindingAttr, System.Reflection.Binder binder,
 System.Object[] args, System.Globalization.CultureInfo culture,
 System.Object[] activationAttributes)
 in 0x0005b System.Activator:CreateInstance (System.String
 assemblyName, System.String typeName, Boolean ignoreCase, BindingFlags
 bindingAttr, System.Reflection.Binder binder, System.Object[] args,
 System.Globalization.CultureInfo culture, System.Object[]
 activationAttributes, System.Security.Policy.Evidence securityInfo)
 in 0x0002d System.AppDomain:CreateInstance (System.String
 assemblyName, System.String typeName, Boolean ignoreCase, BindingFlags
 bindingAttr, System.Reflection.Binder binder, System.Object[] args,
 System.Globalization.CultureInfo culture, System.Object[]
 activationAttributes, System.Security.Policy.Evidence
 securityAttributes)
 in (wrapper remoting-invoke-with-check) System.AppDomain:CreateInstance
 (string,string,bool,System.Reflection.BindingFlags,System.Reflection.Binder,object[],System.Globalization.CultureInfo,object[],System.Security.Policy.Evidence)
 in 0x0002e System.AppDomain:CreateInstanceAndUnwrap (System.String
 assemblyName, System.String typeName, Boolean ignoreCase, BindingFlags
 bindingAttr, System.Reflection.Binder binder, System.Object[] args,
 System.Globalization.CultureInfo culture, System.Object[]
 activationAttributes, System.Security.Policy.Evidence
 securityAttributes)
 in (wrapper remoting-invoke-with-check)
 System.AppDomain:CreateInstanceAndUnwrap
 (string,string,bool,System.Reflection.BindingFlags,System.Reflection.Binder,object[],System.Globalization.CultureInfo,object[],System.Security.Policy.Evidence)
 
 If I change arguments to (object o, EventArgs e), it works fine. Can
 somebody write some comments about this behaviour?.
 
 Thanks
 
 
 ___
 Mono-list maillist  -  Mono-list@lists.ximian.com
 http://lists.ximian.com/mailman/listinfo/mono-list
   
 
 
 
 

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


Re: [Mono-list] Mono and MS Office suite

2005-10-19 Thread Vincent Arnoux
Hi,

Le Mardi 18 Octobre 2005 19:37, Miguel de Icaza a écrit :
 Hello,
 We do not support COM in Mono.

 You need to use .NET

This is a novice remark:
Ruby looks to have such a communication protocol. Ruby being written in C, 
wouldn't it be possible to borrow their code, or is it too simplistic ?

Vincent
___
Mono-list maillist  -  Mono-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list


Re: [Mono-list] Mono and MS Office suite

2005-10-19 Thread Miguel de Icaza
Hello,

  Hello,
  We do not support COM in Mono.
 
  You need to use .NET
 
 This is a novice remark:
 Ruby looks to have such a communication protocol. Ruby being written in C, 
 wouldn't it be possible to borrow their code, or is it too simplistic ?

You can certainly do that, and P/Invoke into the glue layer.

But integrating it in the proper places in .NET where COM is handled
automatically is a different story.
___
Mono-list maillist  -  Mono-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list


[Mono-list] mono runtime error

2005-10-19 Thread Bob



I have downloaded and installed the latest Fedora 3 
binaries from the Mono website. This machine has a gig of ram and no real CPU 
load so I don't think that it could be a resource issue.

Does anyone know whyI receive the following error 
when I attempt to load and run this program? This is a simple windows form 
application with only one command button, nothing more. It was compiled 
using Visual Studio 2003 using standard MS assemblies.What am I doing 
wrong that this application will not run. I was under the impression that it 
should work on mono without being recompiled, was I wrong?

-Bob
Unhandled Exception: System.TypeLoadException: Cannot load 
type 'System.Globalization.DateTimeFormatFlags'in 0x0 
unknown methodin (wrapper managed-to-native) 
System.Type:internal_from_name (string,bool,bool)in 0x00021 
System.Type:GetType (System.String typeName, Boolean throwOnError)in 
0x0008b 
System.Runtime.Serialization.Formatters.Binary.ObjectReader:ReadType 
(System.IO.BinaryReader reader, TypeTag code)in 0x001dd 
System.Runtime.Serialization.Formatters.Binary.ObjectReader:ReadTypeMetadata 
(System.IO.BinaryReader reader, Boolean isRuntimeObject, Boolean 
hasTypeInfo)in 0x00040 
System.Runtime.Serialization.Formatters.Binary.ObjectReader:ReadObjectInstance 
(System.IO.BinaryReader reader, Boolean isRuntimeObject, Boolean hasTypeInfo, 
System.Int64 objectId, System.Object value, 
System.Runtime.Serialization.SerializationInfo info)in 0x00097 
System.Runtime.Serialization.Formatters.Binary.ObjectReader:ReadObject 
(BinaryElement element, System.IO.BinaryReader reader, System.Int64 objectId, 
System.Object value, System.Runtime.Serialization.SerializationInfo info)in 
0x00072 
System.Runtime.Serialization.Formatters.Binary.ObjectReader:ReadNextObject 
(System.IO.BinaryReader reader)in 0x000b4 
System.Runtime.Serialization.Formatters.Binary.ObjectReader:ReadObjectGraph 
(System.IO.BinaryReader reader, Boolean readHeaders, System.Object result, 
System.Runtime.Remoting.Messaging.Header[] headers)in 0x0011f 
System.Runtime.Serialization.Formatters.Binary.BinaryFormatter:Deserialize 
(System.IO.Stream serializationStream, 
System.Runtime.Remoting.Messaging.HeaderHandler handler)in 0x00012 
System.Runtime.Serialization.Formatters.Binary.BinaryFormatter:Deserialize 
(System.IO.Stream serializationStream)in 0x00035 
System.Resources.ResourceReader:ReadNonPredefinedValue (System.Type 
exp_type)in 0x00321 System.Resources.ResourceReader:ReadValueVer1 
(System.Type type)in 0x00167 
System.Resources.ResourceReader:ResourceValue (Int32 index)in 
0x00028 System.Resources.ResourceReader+ResourceEnumerator:get_Value 
()in 0x0008c System.Resources.ResourceSet:ReadResources ()in 
0x00049 System.Resources.ResourceSet:GetObject (System.String name, 
Boolean ignoreCase)in 0x0007f 
System.Resources.ResourceManager:GetObject (System.String name, 
System.Globalization.CultureInfo culture)in 0x00010 
System.Resources.ResourceManager:GetObject (System.String name)in 
0x001bc LinuxTest.Form1:InitializeComponent ()in 0x00020 
LinuxTest.Form1:.ctor ()in (wrapper remoting-invoke-with-check) 
LinuxTest.Form1:.ctor ()in 0x00018 LinuxTest.Form1:Main 
()
___
Mono-list maillist  -  Mono-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list


RE: [Mono-list] mono runtime error

2005-10-19 Thread Chris Aitken
 I have downloaded and installed the latest Fedora 3 binaries 
 from the Mono website. This machine has a gig of ram and no 
 real CPU load so I don't think that it could be a resource issue.
  
 Does anyone know why I receive the following error when I 
 attempt to load and run this program?  This is a simple 
 windows form application with only one command button, 
 nothing more.  It was compiled using Visual Studio 2003 using 
 standard MS assemblies. What am I doing wrong that this 
 application will not run. I was under the impression that it 
 should work on mono without being recompiled, was I wrong?

Have you tried recompiling it with the mono C# compiler mcs?

Chris


-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.

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


[Mono-list] Good ASP.NET Treeview component

2005-10-19 Thread Hubert FONGARNAND




Does someone know if there's a good ASP.NET Treeview component that work with ASP.NET 1.1 on mono?
Is there a .NET 1.1 of the ASP.NET 2 Treeview component?
thanks
Hubert
___Ce message et les éventuels documents joints peuvent contenir des informations confidentielles.Au cas où il ne vous serait pas destiné, nous vous remercions de bien vouloir le supprimer et en aviser immédiatement l'expéditeur. Toute utilisation de ce message non conforme à sa destination, toute diffusion ou publication, totale ou partielle et quel qu'en soit le moyen est formellement interdite.Les communications sur internet n'étant pas sécurisées, l'intégrité de ce message n'est pas assurée et la société émettrice ne peut être tenue pour responsable de son contenu.

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


[Mono-list] Parameter passing using PInvoke

2005-10-19 Thread Shankari
Hello,

I had the following question regarding parameter
passing in PInvoke:

If I pass a reference to a structure VIA PINVOKE how
do I know the size of the struct in Mono (at
emit_native_wrapper ). 

Mono pushes the address on to the stack but is there
a way to retrieve the size of the struct pointed to by
the address.

mono_marshal_type_size doesnt seem to be the right
function..( I am not sure).

I dereferenced the pointer at the emit_native_wrapper
level  as *(sig-params[i])-data.klass and the
instance size is shown as 24. where as my structre is
just has 4 integer values i.e 16 (obtained using
sizeof() in C# code) 


If I need to copy this structure by value ...what size
should I be using = 16 or instance size of 24??
If it is 16 : How can we get this in *mono* (not at
the C# program level).


Also, If I pass a structure or class by reference
through Pinvoke, it would be visible as such to the
unmanaged code (without any marshalling). So, if at
all Pinvoke does padding , the unmanaged code would
access the datamembers as such. Is this correct?

Thanks,



__ 
Yahoo! Music Unlimited 
Access over 1 million songs. Try it free.
http://music.yahoo.com/unlimited/
___
Mono-list maillist  -  Mono-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list


[Mono-list] Jon's reply : Parameter passing using PInvoke

2005-10-19 Thread Shankari
here is Jon's answer to my queries. Any more insights
or clarifications are welcome.

   : I have a structure in my C# code. If
 in my invocation, I pass a reference to this
 structure.  I want to know the size of the struct in
 mono. I guess it pushes the address on to the
stack.
 But I want the size of the struct pointed to by the
 address.
 
 Is there any way to get this.

System.Runtime.InteropServices.Marshal.SizeOf(). :-)

Though there's an important question: is this through
P/Invoke or
through an icall interface?  And is it a C# struct or
a C# class?

For P/Invoke it doesn't matter, but for icalls the
class will have the
standard object header, which is 8 bytes in size IIRC.

 mono_marshal_type_size doesnt seem to be the right
 function..

Why not?

 I dereferenced the pointer at the
emit_native_wrapper
 level  as *(sig-params[i])-data.klass and the
 instance size is shown as 24. where as my structre
is
 just has 4 in values i.e 16.

Either your structure has padding issues, or you're
within an icall
interface passing a reference type, thus you'd have
the object header 
to
contend with.

 If I need to copy this structure by value ...what
size
 should I be using = 16 or instance size of 24??
 If it is 16 : How can we get this in *mono* (not at
 the C# program level).

I lack the knowledge to answer this.

 - Jon




__ 
Yahoo! Music Unlimited 
Access over 1 million songs. Try it free.
http://music.yahoo.com/unlimited/
___
Mono-list maillist  -  Mono-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list


Re: [Mono-list] generic KeyedCollection implementation

2005-10-19 Thread Atsushi Eno

Hi,

I think this patch does what we need - some protected virtual methods
such as SetItem() should be used for every content-changing methods.
Can anyone review it?

Atsushi Eno

Carlo Kok wrote:
Attached to this email an incremental patch for the KeyedCollection ( to 
be applied in the \mcs\class\corlib\System.Collections.ObjectModel 
directory. Also included is a testcase, tested with both Beta2 and my 
own implementation.


I followed the existing testcases I could find in SVN. The two almost 
idental guides on the wiki seem to be out of date:


http://www.mono-project.com/Test_Suite
http://www.mono-project.com/Mono_Contribution_HOWTO

comments?

I used the SVN Patch ability of tortoisesvn, if I did that wrong, please 
tell me what I should use instead.


--
Carlo Kok

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


[Mono-list] SSL and WebServices

2005-10-19 Thread Gayan Perera
i'm trying to run a webservice in apachee with SSL enabled. when i call
the method in the test form the following error is displayed as the
result.

Error getting response stream 
(Write): SendFailure

can any body tell me the reason for this ?
Gayan.
___
Mono-list maillist  -  Mono-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list