Re: [Mono-dev] Hebrew Calendar

2006-03-21 Thread Yaacov Akiba Slama

Hello Atsushi,

Atsushi Eno wrote:

Oh, so simple fix - I'm unsure whether my guess on long_heshvan()
and short_kislev(),

IMHO, The CCHebrewCalendar class seems to be ok (as in the book).

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


[Mono-dev] Re: [Bug 77447][Min] Changed - XML serialization doesn't work properly on a given class

2006-03-21 Thread Ivano Luberti


Sorry to forward this on the dev list: but I'm in a hurry to get to know
what's going on.
For what I can see lluis seems off line.
There is someone that can explain me what happened with this bug fix
?

At 17.38 19/03/2006, [EMAIL PROTECTED] wrote:
Please do not reply to this
email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.
Changed by [EMAIL PROTECTED]

http://bugzilla.ximian.com/show_bug.cgi?id=77447
---
shadow/77447
2006-02-20
06:55:57.0 -0500
+++
shadow/77447.tmp.30266
2006-03-19 11:38:30.0 -0500
@@ -237,6 +237,14 @@
--- Additional Comments From [EMAIL PROTECTED] 2006-02-16
06:45 ---
The fill will be included in the next release. I don't know when
it
will be available, but it will be soon.

--- Additional Comments From [EMAIL PROTECTED]
2006-02-20 06:55 ---
Ok. Thanks again for the quick solution
+
+--- Additional Comments From [EMAIL PROTECTED] 2006-03-19
11:38 ---
+I have just donwloaded and installed the 1.1.13.4 release of mono
+The bug it's still there .
+Have you included the solution files in the this realese ?
+If no, when do you think a release with the solution will be 
+delivered ?
+

-- 
No virus found in this incoming message.
Checked by AVG Anti-Virus.
Version: 7.1.385 / Virus Database: 268.2.5/284 - Release Date:
17/03/2006

== 
Archimede Informatica NEWS! 
==
Realizzato il Sistema Integrato per la biglietteria della Torre di Pisa:

prenotazione, vendita, pre-vendita ed emissione dei biglietti di ingresso

alla Torre sia online che presso le biglietterie dislocate sulla
piazza:


http://www.opapisa.it/boxoffice
Partner del Progetto Ci-Tel Front
office Telematico per il cittadino 
Ente Coordinatore Comune di Pisa


http://www.comune.pisa.it/doc/e-government.htm

==
dott. Ivano Mario Luberti
Archimede Informatica societa' cooperativa a r. l.
Sede Operativa
Via Gereschi 36 - 56126- Pisa
tel.: +39-050- 580959
tel/fax: +39-050-9711344 
e-mail: [EMAIL PROTECTED] 
web:

http://www.archicoop.it





No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.1.385 / Virus Database: 268.2.6/286 - Release Date: 20/03/2006
___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


[Mono-dev] Re: [Bug 77447][Min] Changed - XML serialization doesn't work properly on a given class

2006-03-21 Thread Robert Jordan

Ivano Luberti wrote:
Sorry to forward this on the dev list: but I'm in a hurry to get to know 
what's going on.


For what I can see lluis seems off line.
There is someone that can explain me what happened with this bug fix ?


Not sure what explanation you want to hear: the bug has
been fixed but it has not been backported to the stable
branch. Even if it were, it probably did't make into the last
stable release either.

I don't know when the next release is scheduled.

Robert




At 17.38 19/03/2006, [EMAIL PROTECTED] wrote:

Please do not reply to this email- if you want to comment on the bug, 
go to the

URL shown below and enter your comments there.

Changed by [EMAIL PROTECTED]

http://bugzilla.ximian.com/show_bug.cgi?id=77447

--- shadow/774472006-02-20 06:55:57.0 -0500
+++ shadow/77447.tmp.30266  2006-03-19 11:38:30.0 -0500
@@ -237,6 +237,14 @@
 --- Additional Comments From [EMAIL PROTECTED]  2006-02-16 06:45 
---

 The fill will be included in the next release. I don't know when it
 will be available, but it will be soon.

 --- Additional Comments From [EMAIL PROTECTED]  2006-02-20 
06:55 ---

 Ok. Thanks again for the quick solution
+
+--- Additional Comments From [EMAIL PROTECTED]  2006-03-19 
11:38 ---

+I have just donwloaded and installed the 1.1.13.4 release of mono
+The bug it's still there .
+Have you included the solution files in the this realese ?
+If no, when do you think a release with the solution will be
+delivered ?
+



--
No virus found in this incoming message.
Checked by AVG Anti-Virus.
Version: 7.1.385 / Virus Database: 268.2.5/284 - Release Date: 17/03/2006


==
Archimede Informatica NEWS!
==

Realizzato il Sistema Integrato per la biglietteria della Torre di Pisa:
prenotazione, vendita, pre-vendita ed emissione dei biglietti di ingresso
alla Torre sia online che presso le biglietterie dislocate sulla piazza:

http://www.opapisa.it/boxoffice

Partner del Progetto Ci-Tel Front office Telematico per il cittadino
Ente Coordinatore Comune di Pisa

http://www.comune.pisa.it/doc/e-government.htm


==
dott. Ivano Mario Luberti
Archimede Informatica societa' cooperativa a r. l.
Sede Operativa
Via Gereschi 36 - 56126- Pisa
tel.: +39-050- 580959
tel/fax: +39-050-9711344
e-mail: [EMAIL PROTECTED]
web: http://www.archicoop.it








No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.1.385 / Virus Database: 268.2.6/286 - Release Date: 20/03/2006




___
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: [Bug 77447][Min] Changed - XML serialization doesn't work properly on a given class

2006-03-21 Thread Ivano Luberti



At 10.04 21/03/2006, Robert Jordan wrote:
Ivano Luberti wrote:
Sorry to forward this on the dev
list: but I'm in a hurry to get to know what's going on.
For what I can see lluis seems off line.
There is someone that can explain me what happened with this bug fix
?
Not sure what explanation you want to hear: the bug has
been fixed but it has not been backported to the stable
branch. Even if it were, it probably did't make into the last
stable release either.
I don't know when the next release is scheduled.
Robert

Thanks Robert: LLuis wrote on bugzilla that the bug fixing would have
been included in the next stable release.
For what I know the next release it's the 1.1.13.4, but the
bug fix has not been included


== 
Archimede Informatica NEWS! 
==
Realizzato il Sistema Integrato per la biglietteria della Torre di Pisa:

prenotazione, vendita, pre-vendita ed emissione dei biglietti di ingresso

alla Torre sia online che presso le biglietterie dislocate sulla
piazza:


http://www.opapisa.it/boxoffice
Partner del Progetto Ci-Tel Front
office Telematico per il cittadino 
Ente Coordinatore Comune di Pisa


http://www.comune.pisa.it/doc/e-government.htm

==
dott. Ivano Mario Luberti
Archimede Informatica societa' cooperativa a r. l.
Sede Operativa
Via Gereschi 36 - 56126- Pisa
tel.: +39-050- 580959
tel/fax: +39-050-9711344 
e-mail: [EMAIL PROTECTED] 
web:

http://www.archicoop.it





No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.1.385 / Virus Database: 268.2.6/286 - Release Date: 20/03/2006
___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


[Mono-dev] Patch for Mono.Data.SqlExpressions\Aggregation.cs

2006-03-21 Thread Boris Kirzner
Hello all,

Attached is a proposed patch for Mono.Data.SqlExpressions\ggregation.cs
- Avoiding NullReferenceException (in the case rows is initialized to
null)



--
Boris Kirzner
Mono RD team, Mainsoft Corporation.
Blogging at http://boriskirzner.blogspot.com/ 


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


[Mono-dev] Re: [Bug 77447][Min] Changed - XML serialization doesn't work properly on a given class

2006-03-21 Thread Robert Jordan

Ivano Luberti wrote:



At 10.04 21/03/2006, Robert Jordan wrote:


Ivano Luberti wrote:
Sorry to forward this on the dev list: but I'm in a hurry to get to 
know what's going on.

For what I can see lluis seems off line.
There is someone that can explain me what happened with this bug fix ?


Not sure what explanation you want to hear: the bug has
been fixed but it has not been backported to the stable
branch. Even if it were, it probably did't make into the last
stable release either.

I don't know when the next release is scheduled.

Robert


Thanks Robert: LLuis wrote on bugzilla that the bug fixing would have 
been included in the next stable release.
For what I know the next release it's the 1.1.13.4, but the bug fix 
has not been included


Lluis wrote: `in the next release' and not the next bugfix release.

The 1.1.13 branch must remain stable for a long time, thus developers
are picky and careful about what gets backported to this branch.

I asked him if I may backport the patch, but if he doesn't agree,
there is nothing we can do about but applying the patch locally
and compiling ourself. That's what I'm doing.

Robert

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


Re: [Mono-dev] C++ embedding

2006-03-21 Thread Jonathan Pryor
On Mon, 2006-03-20 at 18:02 +0100, Denis ERCHOFF wrote:
 Hi all,
 
 I am controlling some .Net class from C++ application.
 
 I would like to know if from the C++ context i can add a delegate like 
 to a .Net property.
 I want to catch when a property's getter or a property's setter is 
 called from .Net context.
 I need to do some works when a public/private property is changed in the 
 Net environement.

Something similar to this can be done with the use of events.  See this
(uncompiled but should be reasonably close) example:

class Interesting {
private int property;

public int Property {
get {
EventHandler e = PropertyAccessed;
if (e != null) e (this, new EventArgs
());
return this.property;
}
set {
EventHandler e = PropertyChanged;
if (e != null) e (this, new EventArgs
());
this.property = value;
}
}

// use an event to let code know when Property changed
public event EventHandler PropertyAccessed;

// use an event to let code know when Property changed
public event EventHandler PropertyChanged;
}

class NativeCode {
[DllImport (native)]
public static extern void NativeFunction ();
}

class Test {
public static void Main ()
{
Interesting i = new Interesting ();
i.PropertyChanged += 
delegate {NativeCode.NativeFunction ();}
i.PropertyAccessed +=
delegate {NativeCode.NativeFunction ();}
i.Property = 42;
}
}

You'd probably want to change the type of the events to something more
reasonable (so that you know what the current property value is), and
NativeCode.NativeFunction should probably take some parameters, but
something like that should allow your C/C++ code know when a C# property
is accessed or changes.

The downside is that this requires changes to the C# code.  If you don't
want to do any changes to the C# code, you're basically requiring a
debugger, so you should check out the debugger sources (and try to get
them working)...

 - Jon


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


Re: [Mono-dev] Regression in System.Web

2006-03-21 Thread Joe Audette
Hi Gonzalo,
 
Thanks for the quick response!

Can you try the System.Web.dll and its .mdb from
http://gonzalo.name/System.Web-debug.tar.gz ?

If that one works, I'll revert the offending patch.
Thanks.


I'll give it a try tonight right after work and report back.

Cheers,

Joe







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


Re: [Mono-dev] Patch for Mono.Data.SqlExpressions\Aggregation.cs

2006-03-21 Thread T Senganal
Hi Boris,

 Attached is a proposed patch for
Mono.Data.SqlExpressions\ggregation.cs

I feel the patch can be simplified to : 

Index: Mono.Data.SqlExpressions/Aggregation.cs
===
--- Mono.Data.SqlExpressions/Aggregation.cs (revision 58178)
+++ Mono.Data.SqlExpressions/Aggregation.cs (working copy)
@@ -74,6 +74,9 @@

if (!other.column.Equals (column))
return false;
+
+   if (other.rows == null || rows == null)
+   return (other.rows == rows);

if (other.rows.Length != rows.Length)
return false;

Regards
Senga


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


[Mono-dev] C-C#, exceptions ...

2006-03-21 Thread Jan Vavra

Hello,
I modified  your /mono/samples/embed/test-invoke.c
I call a C# method, that throws an exception.

1) Can I obtain a Message (C#: exception.Message) ?
2) Can I obtain a type of exception. Smthg like get_type_name( MonObject 
*) ?



MonoObject *exception = NULL;
mono_runtime_invoke (fail, NULL, NULL, exception);
if (exception) {
  //I tried this, but no success:
  MonoClass *eklass  = mono_object_get_class(exception);
  if (!eklass) {
  printf(eklass==NULL\n);
  }
  MonoClassField *Message = 
mono_class_get_field_from_name(klass, Message);

  if (!Message) {
  printf(Message==NULL\n);
  }
  MonoString *msg;

  mono_field_get_value(exception, Message, msg);
}

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


Re: [Mono-dev] C++ embedding

2006-03-21 Thread Denis ERCHOFF

Thank you,

As you mentioned, i am not permitted to change the .Net class design ...

I didn't thought about the debugger design ... thank, i will do some 
research in this way :).



Jonathan Pryor a écrit :

On Mon, 2006-03-20 at 18:02 +0100, Denis ERCHOFF wrote:
  

Hi all,

I am controlling some .Net class from C++ application.

I would like to know if from the C++ context i can add a delegate like 
to a .Net property.
I want to catch when a property's getter or a property's setter is 
called from .Net context.
I need to do some works when a public/private property is changed in the 
Net environement.



Something similar to this can be done with the use of events.  See this
(uncompiled but should be reasonably close) example:

class Interesting {
private int property;

public int Property {

get {
EventHandler e = PropertyAccessed;
if (e != null) e (this, new EventArgs
());
return this.property;
}
set {
EventHandler e = PropertyChanged;
if (e != null) e (this, new EventArgs
());
this.property = value;
}
}

// use an event to let code know when Property changed

public event EventHandler PropertyAccessed;

// use an event to let code know when Property changed

public event EventHandler PropertyChanged;
}

class NativeCode {

[DllImport (native)]
public static extern void NativeFunction ();
}

class Test {

public static void Main ()
{
Interesting i = new Interesting ();
i.PropertyChanged += 
	delegate {NativeCode.NativeFunction ();}

i.PropertyAccessed +=
delegate {NativeCode.NativeFunction ();}
i.Property = 42;
}
}

You'd probably want to change the type of the events to something more
reasonable (so that you know what the current property value is), and
NativeCode.NativeFunction should probably take some parameters, but
something like that should allow your C/C++ code know when a C# property
is accessed or changes.

The downside is that this requires changes to the C# code.  If you don't
want to do any changes to the C# code, you're basically requiring a
debugger, so you should check out the debugger sources (and try to get
them working)...

 - Jon




  

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


Re: [Mono-dev] PathInfo problem in System.Web

2006-03-21 Thread Gonzalo Paniagua Javier
On Wed, 2006-03-15 at 06:01 -0800, Vladimir Krasnov wrote:
 Hello,
 
 I've found a problem with retrieving requested URL if path info is added
 to it. I've checked Request.Url and Request.ServerVariables[URL].
 Request.Url returns URL where path info appears twice.
 Request.ServerVariables[URL] returns URL with path info but should
 return without it. 
 The attached example reproduces the problem.
 
 I've attached two patches that fix these problems, please approve.

Hi Vladimir.

I don't remember approving these patches and you commited them anyway. I
have reverted the HttpRequest part The one in ServerVariablesCollection
is ok, but I'm pretty sure that the one in HttpRequest will make an old
bug appear again.

I need a bug report with a test case that fails without your patch. Then
I will try searching bugzilla for the problem I was referring to and
show you how it breaks, which probably means that we need a different
patch.

-Gonzalo


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


[Mono-dev] System.Web.Mail and TLS

2006-03-21 Thread Vladimir Krasnov
Hello,

I'm working now on sending email over SSL connection using
System.Web.Mail API. This feature requires connection to SMTP server to
be changed to SSL connection after EHLO command. I've implemented method
ChangeToSSLSocket (look attached patch), but I always get a
TlsException, even if I have well known certificate from trusted CA.

Unhandled Exception: System.Web.HttpException: The authentication or
decryption has failed. --- System.IO.IOException: The authentication or
decryption has failed. --- Mono.Security.Protocol.Tls.TlsException:
Invalid certificate received form server.

Please take a look at this code and suggest what to do.

Vladimir Krasnov.




SmtpClient.cs.patch
Description: SmtpClient.cs.patch


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


Re: [Mono-dev] System.Web.Mail and TLS

2006-03-21 Thread Sebastien Pouliot
Hello Vladimir,

On Tue, 2006-03-21 at 10:17 -0800, Vladimir Krasnov wrote:
 Hello,
 
 I'm working now on sending email over SSL connection using
 System.Web.Mail API. This feature requires connection to SMTP server to
 be changed to SSL connection after EHLO command. I've implemented method
 ChangeToSSLSocket (look attached patch), 

Nice feature.

 but I always get a
 TlsException, even if I have well known certificate from trusted CA.

This has been a common question on the mailing-list. 
Did you read the FAQ on Mono project wiki ?
http://www.mono-project.com/FAQ:_Security

 Unhandled Exception: System.Web.HttpException: The authentication or
 decryption has failed. --- System.IO.IOException: The authentication or
 decryption has failed. --- Mono.Security.Protocol.Tls.TlsException:
 Invalid certificate received form server.
 
 Please take a look at this code and suggest what to do.
 
 Vladimir Krasnov.
 
 
 ___
 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] Application performance benchmarking

2006-03-21 Thread Lukas Lipka
Hi,

Does anyone know what is the best way to benchmark a C# app? I'm
specifically looking for something, that would tell me which part of the
code takes up lot of time, how long does a specific block of code take
to execute, etc.

Is the method when I note DateTime.Now before the block of code and
after it do a subtraction of the current DateTime.Now to the previous
one accurate?

Best,
Lukas

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


Re: [Mono-dev] Application performance benchmarking

2006-03-21 Thread Joshua Kugler
On Tuesday 21 March 2006 11:51, Lukas Lipka wrote:
 Hi,

 Does anyone know what is the best way to benchmark a C# app? I'm
 specifically looking for something, that would tell me which part of the
 code takes up lot of time, how long does a specific block of code take
 to execute, etc.

I don't have a direct answer, but just to help you in your googling, what 
you're looking for is profiling software.

j- k-

-- 
Joshua Kugler PGP Key: http://pgp.mit.edu/
CDE System Administrator ID 0xDB26D7CE
http://distance.uaf.edu/
___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


RE: [Mono-dev] Application performance benchmarking

2006-03-21 Thread JD Conley
I'm not aware of any profiling software for running under the Mono
runtime. Microsoft ships a fairly limited one with VS 2005 Team Edition
that requires you to use their testing infrastructure. We use
Compuware's DevPartner Profiler for all our profiling. It has been
extremely valuable.

-JD Conley

 On Tuesday 21 March 2006 11:51, Lukas Lipka wrote:
  Hi,
 
  Does anyone know what is the best way to benchmark a C# app? I'm
  specifically looking for something, that would tell me 
 which part of the
  code takes up lot of time, how long does a specific block 
 of code take
  to execute, etc.
 
 I don't have a direct answer, but just to help you in your 
 googling, what 
 you're looking for is profiling software.
 
___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


Re: [Mono-dev] Application performance benchmarking

2006-03-21 Thread Andreas Nahr
If you want to do simple timing then either do the DateTime.Now-StartTime 
that you described or use Environment.TickCount.

These work ok unless you need to time something very short (100ms)
You may also want to try to launch mono with the --profile switch if you 
just want to see which functions take most of the time.


Andreas


Hi,

Does anyone know what is the best way to benchmark a C# app? I'm
specifically looking for something, that would tell me which part of the
code takes up lot of time, how long does a specific block of code take
to execute, etc.

Is the method when I note DateTime.Now before the block of code and
after it do a subtraction of the current DateTime.Now to the previous
one accurate?

Best,
Lukas

___
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] Embedding C

2006-03-21 Thread Rusmin Susanto
Hi all. I have some questions.1.I tried to build and execute the examples in the embed folder. The instruction in file test.c is as follows:/** Very simple mono embedding example.* Compile with:* gcc -o teste teste.c `pkg-config --cflags --libs mono` -lm* mcs test.cs* Run with:* ./teste test.exe*/  I followed the instruction above. But I always get this error:./teste: error while loading shared libraries: libmono.so.0: cannot open shared object file: No such file or directoryThen I tried to find libmono.so.0 file. I copied that libmono.so.0 file to the embed folder (folder where teste and test.exe reside).  But I still got the same error message. Th
 en, I
 run "teste test.exe" from the original folder where libmono.so.0 resides. It still didn't work.  Can anyone tell me what's wrong? What should I do to get it works?  2. Is there any standard library in mono that is implemented in C and executed via internal calls? Basically, I want to know real examples (in the real Mono runtime implementation) that are executed in similar way to the examples in the embed folder.I see a lot of the following code[MethodImplAttribute (MethodImplOptions.InternalCall)]inside the mcs sub-folders. So, I presume there must be some functions in the standard library that are implemented in C For information, I am running Mono 1.1.13.2 under x86 platform. I know that for some functions (eg. in System.Math) the calls to C code are replaced by direct floating poin
 t
 instructions. I am not interested in this. I want examples in the real Mono runtime that are executed in similar way to the examples in the embed folder.  Many thanks for your attention.  Rusmin
	
		 Yahoo! Mail 
Use Photomail to share photos without annoying attachments.___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


Re: [Mono-dev] System.Web.Mail and TLS

2006-03-21 Thread Gonzalo Paniagua Javier
On Tue, 2006-03-21 at 10:17 -0800, Vladimir Krasnov wrote:
 Please take a look at this code and suggest what to do.

In ReadResponse (), note that you should be expecting that Read does not
return all the bytes, even if the stream is not a NetworkStream. Also
the way you're building the string from the received bytes might lead to
different strings depending on how Read() behaves (apart from being a
waste of memory). I would rework that part.

-Gonzalo


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


Re: [Mono-dev] Embedding C

2006-03-21 Thread Zoltan Varga
 Hi,

  Check the output of pkg-config --cflags --libs mono, to see where
libmono should be, then
check why it isn't there, or why gcc can't find it.

 Zoltan

On 3/21/06, Rusmin Susanto [EMAIL PROTECTED] wrote:

 Hi all. I have some questions.

 1. I tried to build and execute the examples in the embed folder. The
 instruction in file test.c is as follows:

 /*
  * Very simple mono embedding example.
  * Compile with:
  *  gcc -o teste teste.c `pkg-config --cflags --libs mono` -lm
  *  mcs test.cs
  * Run with:
  *  ./teste test.exe
  */


 I followed the instruction above. But I always get this error:

 ./teste: error while loading shared libraries: libmono.so.0: cannot open
 shared object file: No such file or directory

 Then I tried to find libmono.so.0 file. I copied that libmono.so.0 file to
 the embed folder (folder where teste and test.exe reside).

 But I still got the same error message. Th en, I run teste test.exe from
 the original folder where libmono.so.0 resides. It still didn't work.
 Can anyone tell me what's wrong? What should I do to get it works?


 2. Is there any standard library in mono that is implemented in C and
 executed via internal calls?  Basically, I want to know real examples (in
 the real Mono runtime implementation) that are executed in similar way to
 the examples in the embed folder.

 I see a lot of the following code

 [MethodImplAttribute (MethodImplOptions.InternalCall)]

 inside the mcs sub-folders. So, I presume there must be some functions in
 the standard library that are implemented in C

 For information, I am running Mono 1.1.13.2 under x86 platform. I know that
 for some functions (eg. in System.Math) the calls to C code are replaced by
 direct floating poin t instructions. I am not interested in this. I want
 examples in the real Mono runtime that are executed in similar way to the
 examples in the embed folder.
 Many thanks for your attention.



 Rusmin


  
  Yahoo! Mail
  Use Photomail to share photos without annoying attachments.


 ___
 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] PathInfo problem in System.Web

2006-03-21 Thread Vladimir Krasnov
Hi Gonzalo,

Sorry for not approved commit, I thought if you've not objected the
patch is ok. I've created a test case that reproduces the problem.

Vladimir Krasnov

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Gonzalo
Paniagua Javier
Sent: Tuesday, March 21, 2006 7:55 PM
To: mono-devel-list@lists.ximian.com
Subject: Re: [Mono-dev] PathInfo problem in System.Web

On Wed, 2006-03-15 at 06:01 -0800, Vladimir Krasnov wrote:
 Hello,
 
 I've found a problem with retrieving requested URL if path info is
added
 to it. I've checked Request.Url and Request.ServerVariables[URL].
 Request.Url returns URL where path info appears twice.
 Request.ServerVariables[URL] returns URL with path info but should
 return without it. 
 The attached example reproduces the problem.
 
 I've attached two patches that fix these problems, please approve.

Hi Vladimir.

I don't remember approving these patches and you commited them anyway. I
have reverted the HttpRequest part The one in ServerVariablesCollection
is ok, but I'm pretty sure that the one in HttpRequest will make an old
bug appear again.

I need a bug report with a test case that fails without your patch. Then
I will try searching bugzilla for the problem I was referring to and
show you how it breaks, which probably means that we need a different
patch.

-Gonzalo


___
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] Re: C-C#, exceptions ...

2006-03-21 Thread Robert Jordan

Hey,


I modified  your /mono/samples/embed/test-invoke.c
I call a C# method, that throws an exception.

1) Can I obtain a Message (C#: exception.Message) ?
2) Can I obtain a type of exception. Smthg like get_type_name( MonObject 
*) ?



MonoObject *exception = NULL;
mono_runtime_invoke (fail, NULL, NULL, exception);
if (exception) {
  //I tried this, but no success:
  MonoClass *eklass  = mono_object_get_class(exception);
  if (!eklass) {
  printf(eklass==NULL\n);
  }
  MonoClassField *Message = 


Exception.Message is a property:

MonoProperty *prop;
MonoMethod *getter;
MonoString *msg;

prop = mono_class_get_property_from_name (eklass, Message);
getter = mono_property_get_get_method (prop);
msg = mono_runtime_invoke (getter, exception, NULL, NULL);




mono_class_get_field_from_name(klass, Message);
  if (!Message) {
  printf(Message==NULL\n);
  }
  MonoString *msg;

  mono_field_get_value(exception, Message, msg);
}

JV



Robert

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


Re: [Mono-dev] Embedding C

2006-03-21 Thread Jonathan Pryor
On Tue, 2006-03-21 at 14:01 -0800, Rusmin Susanto wrote:

 I followed the instruction above. But I always get this error:
  
 ./teste: error while loading shared libraries: libmono.so.0: cannot
 open shared object file: No such file or directory

Where is your libmono.so.0 located?  If it's not in /usr/lib, you may
need to set LD_LIBRARY_PATH to include the directory it's in.

By default, LD_LIBRARY_PATH is empty, and ld.so won't search the current
directory to resolve library dependencies, so copying libmono.so.0 to
the current directory (or elsewhere) won't work.
 
 2. Is there any standard library in mono that is implemented in C and
 executed via internal calls?  Basically, I want to know real examples
 (in the real Mono runtime implementation) that are executed in similar
 way to the examples in the embed folder.

In a superficial manner, most of the methods in System.Math are internal
calls.  I say superficial, as these internal calls *look* like they are
implemented in mono/mono/metadata/sysmath.c (e.g.
ves_icall_System_Math_Sin), but in reality a more optimized version is
inserted during JIT compilation, in
mono/mini/mini-x86.c:mono_arch_get_inst_for_method.

Less confusing examples would be System.String (internal calls
implemented in mono/mono/metadata/string-icalls.c) and
System.Runtime.InteropServices.Marshal (mono/mono/metadata/marshal.c).

The mapping between the C# method name and the C functions are defined
in mono/mono/metadata/icall.c.

 - Jon



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


[Mono-dev] CsGL-Tao Project

2006-03-21 Thread Alejandro Villagomez
Hey guys!!!

I'm Alex, an amateur developer from Quito, Ecuador,
South America, that is developing a thesis for my
bachelor's degree with CsGL to create a computer game
like Space Invaders but 3D.

I did pretty good with all the examples I found in
http://csgl.sourceforge.net/. After a while I learned
that CsGL was outdated and that everything had been
remade in Tao. So now I'm working with Tao on this
project.

I've made some discoveries on my own, like the use of
the BASS library (bass.dll) to add sound (wav and mp3)
to my project. I'd love to give it to you after I'm
done with it. It's a whole bachelor's degree thesis
about the use of OpenGL, CsGL, an Tao in the
development of computer games with C#, with the use of
patterns as a methodology. It also looks at the
history of computer, arcade and console games.

I'd love to get some help too, so if there's a way you
can help me out I'd appreciate it.

Best Regards

Alejandro Villagomez
Amateur Software Developer
With CsGL  Tao

__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 
___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list