[Mono-dev] [PATCH] CodeGenerator/CodeDom classes

2008-02-01 Thread Juraj Skripsky
Hi monkeys,

Could somebody please review my patch for the System.CodeDom classes?

This is the fourth time I'm posting this and nobody provided any
feedback so far. I'm sending this via my gmail account now, in case my
previous mails did not reach the list subscribers (they _did_ reach the
list itself).

I've created a enhancement bug which contains the code:
https://bugzilla.novell.com/show_bug.cgi?id=356657

ChangeLog entries are included, all unit tests pass.
Please review (or at least comment...)

- Juraj

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


Re: [Mono-dev] [PATCH] CodeGenerator/CodeDom classes

2008-02-01 Thread Gert Driesen
Hi Juraj,

These changes look fine to me, but I'm not sure if I'm allowed to give you the 
blessing on this one.

Gert

- Original Message - 
From: Juraj Skripsky [EMAIL PROTECTED]
To: mono-devel-list@lists.ximian.com
Cc: Miguel de Icaza [EMAIL PROTECTED]
Sent: Friday, February 01, 2008 10:32 AM
Subject: [Mono-dev] [PATCH] CodeGenerator/CodeDom classes


 Hi monkeys,
 
 Could somebody please review my patch for the System.CodeDom classes?
 
 This is the fourth time I'm posting this and nobody provided any
 feedback so far. I'm sending this via my gmail account now, in case my
 previous mails did not reach the list subscribers (they _did_ reach the
 list itself).
 
 I've created a enhancement bug which contains the code:
 https://bugzilla.novell.com/show_bug.cgi?id=356657
 
 ChangeLog entries are included, all unit tests pass.
 Please review (or at least comment...)
 
 - Juraj
 
 ___
 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] Using IDispatch as an Argument in Invoke.

2008-02-01 Thread Alistair Leslie-Hughes
Hi,
I've embbed mono into an application that Im working on.  The function 
in my Assembly has a IDispatch pointer as its first argument, how can I pass 
this value throught to my mono class?

If it cannot be done, is there any timeframe?

Best Regards
 Alistair Leslie-Hughes 


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


[Mono-dev] Performance problem with System.Data

2008-02-01 Thread Hubert FONGARNAND
I think i've catched a huge perf. problem with System.Data

https://bugzilla.novell.com/show_bug.cgi?id=357947

_

Ce message et les eventuels documents joints peuvent contenir des informations 
confidentielles.
Au cas ou il ne vous serait pas destine, nous vous remercions de bien vouloir 
le supprimer et en aviser immediatement l'expediteur. Toute utilisation de ce 
message non conforme a sa destination, toute diffusion ou publication, totale 
ou partielle et quel qu'en soit le moyen est formellement interdite.
Les communications sur internet n'etant pas securisees, l'integrite de ce 
message n'est pas assuree et la societe emettrice ne peut etre 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


Re: [Mono-dev] System.Collections.Generic.Dictionary`2 bug?

2008-02-01 Thread Jb Evain
Hey,

On 2/1/08, Stefan Noack [EMAIL PROTECTED] wrote:
 So do i have to understand this in the way that i am also not allowed to
 change the values ehen enumerating the keys?

Exactly.

-- 
Jb Evain  [EMAIL PROTECTED]
___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


[Mono-dev] Mono 1.2.6 on Maemo OS2008 help

2008-02-01 Thread Jae Stutzman
I saw in some of the logs that this is currently being worked on by a
few folks. Does anyone know the status of this? I'm thinking I may
have to build it myself, but I'd rather not :)


Thanks,

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


[Mono-dev] System.Collections.Generic.Dictionary`2 bug?

2008-02-01 Thread Stefan Noack
Hi,

I got he following problem: When i change the values of a Dictionary`2
enumerating the keys i get an exception. for example:

Dictionarystring,int test = new Dictionarystring,int ();

test.Add (foo, 2);
test.Add (bar, 3);

foreach (string key in test.Keys) {
test [key] = 5;
}

throws:

System.InvalidOperationException : out of sync
at System.Collections.Generic.Dictionary`2
+Enumerator[System.String,System.Int32].VerifyState () [0x0]
at System.Collections.Generic.Dictionary`2
+Enumerator[System.String,System.Int32].MoveNext () [0x0]
at System.Collections.Generic.Dictionary`2+KeyCollection
+Enumerator[System.String,System.Int32].MoveNext () [0x0]

It looks like the KeyCollection enumerator uses the Enumerator of the
Dictionary which might invalidate when i change the values, but is this
intended? 

MSDN says:

«The foreach statement is a wrapper around the enumerator, which allows
only reading from the collection, not writing to it.»

So do i have to understand this in the way that i am also not allowed to
change the values ehen enumerating the keys?

If it is a bug, please tll me i will then try to fix it, if not i will
change my code to use a copy of the key list or something.

--
Stefan Noack

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


Re: [Mono-dev] System.Collections.Generic.Dictionary`2 bug?

2008-02-01 Thread Stefan Noack
Thanks :)

I just use the ListT(IEnumerableT) constructor and enumerate the
list now.

On Fri, 2008-02-01 at 15:40 +0100, Jb Evain wrote:
 Hey,
 
 On 2/1/08, Stefan Noack [EMAIL PROTECTED] wrote:
  So do i have to understand this in the way that i am also not allowed to
  change the values ehen enumerating the keys?
 
 Exactly.
 
-- 
Check out my open source .NET physics library project at
http://liblamp.sourceforge.net

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


Re: [Mono-dev] Performance problem with System.Data

2008-02-01 Thread Nagappan A
Hi,

A long pending patch from Senga, which I have to work it soon or Varadhan,
which will change the System.Data code from Array to Red-Black tree
implementation.

It doesn't apply directly with the current tree. Need modifications.

Thanks
Nagappan

2008/2/1 Hubert FONGARNAND [EMAIL PROTECTED]:

  I think i've catched a huge perf. problem with System.Data

 https://bugzilla.novell.com/show_bug.cgi?id=357947
 _
 Ce message et les eventuels documents joints peuvent contenir des
 informations confidentielles. Au cas ou il ne vous serait pas destine, nous
 vous remercions de bien vouloir le supprimer et en aviser immediatement
 l'expediteur. Toute utilisation de ce message non conforme a sa destination,
 toute diffusion ou publication, totale ou partielle et quel qu'en soit le
 moyen est formellement interdite. Les communications sur internet n'etant
 pas securisees, l'integrite de ce message n'est pas assuree et la societe
 emettrice ne peut etre 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




-- 
Linux Desktop Testing Project - http://ldtp.freedesktop.org
http://nagappanal.blogspot.com


rbtree_updated_patch
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] System.Collections.Generic.Dictionary`2 bug?

2008-02-01 Thread Andrew Koryavchenko
Hello

So do i have to understand this in the way that i am also not allowed to
 change the values ehen enumerating the keys?


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


Re: [Mono-dev] [Mono-patches] r94530 - trunk/mcs/class/System.Core/System.Linq.Expressions

2008-02-01 Thread Jb Evain
Hey Olivier,

On 2/1/08, olivier dufour ([EMAIL PROTECTED])
[EMAIL PROTECTED] wrote:
 Author: olivier
 Date: 2008-02-01 12:32:21 -0500 (Fri, 01 Feb 2008)
 New Revision: 94530

Please don't check-in code to System.Linq.Expressions without getting
a review approved.

-- 
Jb Evain  [EMAIL PROTECTED]
___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


[Mono-dev] Questions About Mono in Second Life

2008-02-01 Thread IdeaShape
Hello,
 
May I ask questions about Mono in Second Life as below?1. Which language will 
residents input for script after Mono is applied ?2. I know LSL still works. 
But can it still be inputted as a supported language? 3. Do residents have to 
download software for Mono ? Or just input the language Mono supports as simple 
as what LSL does currently.4. Is the language Mono supports more difficult than 
LSL and thereby most of residents can't work well on it? 
5, May I understand the language is still LSL for residents, but the 
virtual-machine changes into Mono ?
Thanks. 
 
 
Sincerely,
IdeaShape
_
天凉了,添衣了,心动了,“七件”了 
http://get.live.cn___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


Re: [Mono-dev] Questions About Mono in Second Life

2008-02-01 Thread Mono
Hello,

I do not speak for Linden, you should direct these questions at
them,   but here are some guesses:

 May I ask questions about Mono in Second Life as below?
 1. Which language will residents input for script after Mono is
 applied ?

LSL.

 2. I know LSL still works. But can it still be inputted as a supported
 language? 

Yes, your LSL code now gets JITed using Mono instead of being
intepreted.

 3. Do residents have to download software for Mono ? Or just input the
 language Mono supports as simple as what LSL does currently.

They can keep doing it in the same way;   My understanding is that you
only need to check a checkbox in the SecondLife viewer, and your LSL
script will be executed with Mono instead of the current LSL engine.

 4. Is the language Mono supports more difficult than LSL and thereby
 most of residents can't work well on it? 

Currently only LSL is supported;   I believe they plan on opening up
SecondLife to new languages in the future.

 5, May I understand the language is still LSL for residents, but the
 virtual-machine changes into Mono ?

Its an internal change that offers more speed for now;   More features
will be available in the future.
___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


[Mono-dev] Monodevelop doesn't run...

2008-02-01 Thread [EMAIL PROTECTED]
Hi to all,
   I'm new to mono and monodevelop.

I've just installed them on my Ubuntu 7.10 from sources:

mono-1.2.6  monodevelop-0.18.1

Everything seemed to be ok, but when I try to run monodevelop, it fails with 
this message:

MonoDevelop failed to start. The following error has been reported: The 
required addin 'MonoDevelop.SourceEditor,0.18.0' is not installed

Running strace and grepping SourceEditor from its output I got these lines:

lstat(/usr/local/lib/monodevelop/AddIns/MonoDevelop.SourceEditor.dll, 
{st_mode=S_IFREG|0644, st_size=184832, ...}) = 0
stat(/usr/local/lib/monodevelop/AddIns/MonoDevelop.SourceEditor.dll, 
{st_mode=S_IFREG|0644, st_size=184832, ...}) = 0
lstat(/usr/local/lib/monodevelop/AddIns/MonoDevelop.SourceEditor.dll, 
{st_mode=S_IFREG|0644, st_size=184832, ...}) = 0
stat(/usr/local/lib/monodevelop/AddIns/MonoDevelop.SourceEditor.dll, 
{st_mode=S_IFREG|0644, st_size=184832, ...}) = 0
lstat(/usr/local/lib/monodevelop/AddIns/MonoDevelop.SourceEditor.dll, 
{st_mode=S_IFREG|0644, st_size=184832, ...}) = 0
lstat(/usr/local/lib/monodevelop/bin/../AddIns/MonoDevelop.SourceEditor.dll, 
{st_mode=S_IFREG|0644, st_size=184832, ...}) = 0
stat(/home/luca/.config/MonoDevelop/addin-db-001/addin-data/1/MonoDevelop.SourceEditor.maddin,
 0x7fffba43aa40) = -1 ENOENT (No such file or directory)
lstat(/home/luca/.config/MonoDevelop/addin-db-001/addin-data/1/MonoDevelop.SourceEditor.maddin,
 0x7fffba43aa40) = -1 ENOENT (No such file or directory)
stat(/home/luca/.config/MonoDevelop/addin-db-001/addin-data/global/MonoDevelop.SourceEditor.maddin,
 0x7fffba43aa40) = -1 ENOENT (No such file 
lstat(/usr/local/lib/monodevelop/AddIns/MonoDevelop.SourceEditor.dll, 
{st_mode=S_IFREG|0644, st_size=184832, ...}) = 0


Maybe something is wrong with this 
/home/luca/.config/MonoDevelop/addin-db-001... ? 
Has someone any idea?

Thank'you
Luca

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


[Mono-dev] Problems getting mono running on a Asus Eee

2008-02-01 Thread Peter Ibbotson
Note: I'm a linux newbie and I hope this is on topic for the list and
apologies to folks that have seen this already in the forums at
gotmono.com

Hi, I've been trying to get mono working on an Asus Eee. I can use the
Xandros repository versions of mono without a problem, but I'd like to
move onto 1.2.6 using a tarball compile with the --with-tls=pthread.
Prior to running 'make install' I have removed the Xandros version of
mono with apt-get remove.

The first thing I do with mono after a reboot works fine, the second
hangs, if I set the MONO_LOG_LEVEL to debug then run a simple
helloworld.cs app using mono 'helloworld.exe' then the first time the
trace looks like this:

[snip]
Mono-INFO: Config attempting to parse:
'/usr/etc/mono/assemblies/mscorlib/mscorlib.config'.
Mono-INFO: Config attempting to parse:
'/home/user/.mono/assemblies/mscorlib/mscorlib.config'.
Mono-INFO: Assembly mscorlib 0x821ae80 added to domain helloworld.exe,
ref_count=1
[snip]

If I run it a second time the trace looks like this just before it hangs:

[snip]
Mono-INFO: Config attempting to parse:
'/usr/etc/mono/assemblies/mscorlib/mscorlib.config'.
Mono-INFO: Config attempting to parse:
'/home/user/.mono/assemblies/mscorlib/mscorlib.config'.
^-- shell hangs here

Starting a new instance of the shell doesn't fix the problem, but I
can run 'make check'  which works but it seems to do a lot of messing
with PATHS and stuff and I'm not sure which bits of the mono runtime
it's using.

I'm a complete linux newbie so I'm struggling a bit to figure out what
to do next and how I should go about debugging this with gdb?

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


[Mono-dev] Mono 1.9.0 Preview 1+ is out!!

2008-02-01 Thread Thomas Wiest
Hey Everyone,
We've just released Mono 1.9.0 Preview 1+ today! Please help us out
by giving it a try with your applications.

As always, you can get the preview releases here:
http://mono.ximian.com/monobuild/preview/download-preview/

Please report any bugs that you may find using our Bugs page, AND reply
to this thread with the bug numbers so we can track them!
http://www.mono-project.com/Bugs


The earlier you file the bugs and reply to this message, the more likely
your bugs will get fixed.

Special attention is given to regressions, so if you can tell us a
version of Mono where the bug worked and tag the summary with
[Regression], then it is much more likely your bug will get fixed.


Please help the Mono team to make 1.9.0 the best release of Mono ever.
Thanks again!

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


Re: [Mono-dev] Mono 1.2.6 on Maemo OS2008 help

2008-02-01 Thread Tim Cussins
Hi Jae,

On Fri, 1 Feb 2008 08:54:06 -0600, Jae Stutzman [EMAIL PROTECTED]
said:
 I saw in some of the logs that this is currently being worked on by a
 few folks. Does anyone know the status of this? I'm thinking I may
 have to build it myself, but I'd rather not :)
 

The guy you're after is Everaldo Canuto - you'll find a handful of
interested parties hanging out on irc (mono-maemo) including yours
truly. IIRC he's close to getting it all together...

As far as building goes, it's not as bad as it seems. But still pretty
bad ;P

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


[Mono-dev] Compiling, running mod_mono on OS X (10.5.1)

2008-02-01 Thread Jeremy R. Geerdes
I've been trying for 3 1/2 days to get mod_mono up and running on my  
MacBook running Mac OS X 10.5.1 (detailed specs at end of message).   
The install appears to run smoothly, and files are definitely written  
to the disk, etc., but when I go to restart Apache, I receive the  
following error:

2/1/08 8:41:38 AM org.apache.httpd[7391] httpd: Syntax error on line  
492 of /private/etc/apache2/httpd.conf: Cannot load /opt/local/apache2/ 
modules/mod_mono.so into server: dlopen(/opt/local/apache2/modules/ 
mod_mono.so, 10): image not found

I read a message somewhere about this same message on PPC Macs, but I  
never found a resolution.  And mine is definitely Intel.  My own  
investigations have found that the install script creates a  
mod_mono.so in the correct folder (/opt/local/apache2/modules), but  
that it's a symlink/alias to mod_mono.0.0.0.so, which does not exist.

I have already (apparently successfully) installed and run mono and  
xsp.  At least, they report that they were installed correctly and are  
actively listening, etc.

I have tried installing the DarwinPorts version (which is older and  
never actually completes), as well as the manual install.  Any help  
would be greatly appreciated!


Detailed system specs:
Hardware: MacBook,3,1 (2.2GHz Core 2 Duo (Santa Rosa / x86-64)
OS: Mac OS X 10.5.1 (Leopard)
Apache: Apache/2.2.6 (Unix) mod_ssl/2.2.6 OpenSSL/0.9.7l DAV/2 PHP/ 
5.2.4 mod_fastcgi/2.4.2 mod_perl/2.0.2 Perl/v5.8.8


Jeremy R. Geerdes
Effective website design  development
Des Moines, IA

For more information or a project quote:
http://jgeerdes.home.mchsi.com
[EMAIL PROTECTED]

If you're in the Des Moines, IA, area, check out Debra Heights  
Wesleyan Church!




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


Re: [Mono-dev] Mono 1.9.0 Preview 1+ is out!!

2008-02-01 Thread pablosantosluac
Hi,

Can I find a list of the included issues?


Thanks


pablo
- Original Message - 
From: Thomas Wiest [EMAIL PROTECTED]
To: mono-devel mono-devel-list@lists.ximian.com
Sent: Friday, February 01, 2008 9:40 PM
Subject: [Mono-dev] Mono 1.9.0 Preview 1+ is out!!


 Hey Everyone,
We've just released Mono 1.9.0 Preview 1+ today! Please help us out
 by giving it a try with your applications.
 
 As always, you can get the preview releases here:
 http://mono.ximian.com/monobuild/preview/download-preview/
 
 Please report any bugs that you may find using our Bugs page, AND reply
 to this thread with the bug numbers so we can track them!
 http://www.mono-project.com/Bugs
 
 
 The earlier you file the bugs and reply to this message, the more likely
 your bugs will get fixed.
 
 Special attention is given to regressions, so if you can tell us a
 version of Mono where the bug worked and tag the summary with
 [Regression], then it is much more likely your bug will get fixed.
 
 
 Please help the Mono team to make 1.9.0 the best release of Mono ever.
 Thanks again!
 
 Mono QA
 ___
 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-patches] r94530 - trunk/mcs/class/System.Core/System.Linq.Expressions

2008-02-01 Thread Jb Evain
For the second time, *do not commit code* in System.Core that has not
been reviewed and approved.

On 2/1/08, Jb Evain [EMAIL PROTECTED] wrote:
 Hey Olivier,

 On 2/1/08, olivier dufour ([EMAIL PROTECTED])
 [EMAIL PROTECTED] wrote:
  Author: olivier
  Date: 2008-02-01 12:32:21 -0500 (Fri, 01 Feb 2008)
  New Revision: 94530

 Please don't check-in code to System.Linq.Expressions without getting
 a review approved.

 --
 Jb Evain  [EMAIL PROTECTED]


-- 
Jb Evain  [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 1.9.0 Preview 1+ is out!!

2008-02-01 Thread Brad Taylor

On Fri, 2008-02-01 at 13:40 -0700, Thomas Wiest wrote:
 Hey Everyone,
 We've just released Mono 1.9.0 Preview 1+ today! Please help us out
 by giving it a try with your applications.
 
 As always, you can get the preview releases here:
 http://mono.ximian.com/monobuild/preview/download-preview/
 
 Please report any bugs that you may find using our Bugs page, AND reply
 to this thread with the bug numbers so we can track them!
 http://www.mono-project.com/Bugs

Can you be sure to get the fix for #357547[1] in for the next preview?
It was committed right after the Preview 1+ was rolled.

Thanks!

-Brad

--
[1] https://bugzilla.novell.com/show_bug.cgi?id=357547

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


Re: [Mono-dev] Mono 1.2.6 on Maemo OS2008 help

2008-02-01 Thread Jae Stutzman
 The guy you're after is Everaldo Canuto - you'll find a handful of
 interested parties hanging out on irc (mono-maemo) including yours
 truly. IIRC he's close to getting it all together...

 As far as building goes, it's not as bad as it seems. But still pretty
 bad ;P

 Tim


I've been on the IRC, not much traffic :)

Well, I got a little ways into it! Unfortunately I don't seem to have
what it takes to compile with GC support. The Chinook-Armel scratchbox
target keeps errorring out with the undefined reference
GC_local_maloc. The Chinook-x86 target compiles fine. Any help on
compiling this would be greatly appreciated. It is probably something
small at this point.

Thanks,

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


Re: [Mono-dev] [Mono-patches] r94530 - trunk/mcs/class/System.Core/System.Linq.Expressions

2008-02-01 Thread olivier dufour
When I say no fix on svn, I talk about the first patch. So it date of 5
days.
You have misunderstood...

I have try to find all cosmetic things ( remove/Add space, reorder test to
avoir to repeat things...)

Here is my patch:

Index: Expression.cs
===
--- Expression.cs(révision 94574)
+++ Expression.cs(copie de travail)
@@ -1059,10 +1059,10 @@
 throw new ArgumentNullException (addMethod);
 if (arguments == null)
 throw new ArgumentNullException (arguments);
-if (addMethod.Name.ToLowerInvariant() != add)//case
insensitive
+if (addMethod.Name.ToLowerInvariant () != add)//case
insensitive
 throw new ArgumentException (addMethod);
 if (addMethod.IsStatic)
-throw new ArgumentException (addMethod must be an instance
method, addMethod);
+throw new ArgumentException (AddMethod must be an instance
method, addMethod);

 var args = arguments.ToReadOnlyCollection ();

@@ -1170,7 +1170,7 @@
 if (expression.Type.IsSubclassOf (typeof(Expressionobject)))
{//not sure here
 delegateObj =
((ExpressionSystem.Delegate)expression).Compile
();//not sure here too
 } else if (expression.type.IsSubclassOf (typeof(System.Delegate)))
{
-delegateObj = (System.Delegate)Activator.CreateInstance(
expression.type);
+delegateObj = (System.Delegate)Activator.CreateInstance (
expression.type);
 } else
 throw new ArgumentException (expression);

@@ -1257,7 +1257,7 @@
 else
 throw new ArgumentException (Member must be a field or a
property);

-if (!mbrType.IsSubclassOf(typeof(System.Collections.IEnumerable)))

+if (!mbrType.IsSubclassOf (typeof (
System.Collections.IEnumerable)))
 throw new ArgumentException (Member must inherite from
IEnumerable);

 return new MemberListBinding (member,
initializers.ToReadOnlyCollection ());
@@ -1281,20 +1281,21 @@
 ParameterInfo[] parameters;
 if (propertyAccessor.Name.StartsWith (get_)) {
 parameters = propertyAccessor.GetParameters ();
-if (parameters.Length != 0)
-throw new ArgumentException (PropertyAccessor must
be a property accessor);
-propType = propertyAccessor.ReturnType;
+if (parameters.Length == 0)
+propType = propertyAccessor.ReturnType;
 } else if (propertyAccessor.Name.StartsWith (set_)) {
 parameters = propertyAccessor.GetParameters ();
-if (parameters.Length != 1)
-throw new ArgumentException (PropertyAccessor must
be a property accessor);
-propType = parameters[0].ParameterType;
+if (parameters.Length == 1)
+propType = parameters [0].ParameterType;
 }
-if (!propType.IsSubclassOf(typeof (
System.Collections.IEnumerable)))
-throw new ArgumentException (The type of the property
of propertyAccessor must implement IEnumerable);
-return new MemberListBinding (propertyAccessor,
initializers.ToReadOnlyCollection());
+if (propType != null)
+{
+if (!propType.IsSubclassOf(typeof (
System.Collections.IEnumerable)))
+throw new ArgumentException (The type of the
property of propertyAccessor must implement IEnumerable);
+return new MemberListBinding (propertyAccessor,
initializers.ToReadOnlyCollection());
+}
 }
-throw new ArgumentException (propertyAccessor must be a
property accessor);
+throw new ArgumentException (PropertyAccessor must be a
property accessor);
 }

 [MonoTODO]


2008/2/2, Jb Evain [EMAIL PROTECTED]:

 On 2/2/08, olivier dufour [EMAIL PROTECTED] wrote:
  I have seen no fix on svn.

 I have other things to do on a friday night than correcting your mistakes.

  So, I do not see where I am wrong and not following the code convention.

 Then I can't help much.

  All the expression class contain readonly things with only getter an
 nothing
  to set it. In all other expression inherited class we have the same
  behaviour and same system. So it is quite easy to add what is missing.

 And you managed to propose wrong constructors in the patch you sent to
 the list. So it's maybe not that easy you know?

 Anyway, I don't see much interest in pursuing this conversation.

 --
 Jb Evain  [EMAIL PROTECTED]

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


[Mono-dev] Lang Theory Question

2008-02-01 Thread Scott Peterson
I'm a sucker for syntactic sugar. There is one little trick which I've
been trying and failing to do - it turns about to be impossible - but
as a language theory exercise, I thought I'd work out what would be
needed to let me do this thing.

One nice thing about nullable types is the non-standard behavior of
the assignment (=) operator. For example:

int? val = 5;
val = 6;

is shorthand for:

Nullableint val = new Nullableint (5);
val.Value = 6;

I am working with a struc similar to Nullable and I'd like to be able
to use the assignment operator in a similar way. Unfortunately, the
assignment (=) operator cannot be overloaded. The struct, SchemaEntry,
is used to store and retrieve configuration data from some backend
(gconf, the Windows registry, an XML file, c.). Here's essentially
how I currently use the struct:

SchemaEntryint entry = new SchemaEntryint (DbVersion);
int version = entry.Get ();
if (version  2) {
MigrateDb ();
entry.Set (2);
}

I would like to be able to do the above with this code:

SchemaEntryint entry = new SchemaEntryint (DbVersion);
int version = entry;
if (version  2) {
MigrateDb ();
entry = 2;
}

This is how I envision writing the code to allow me to do that:

public struct SchemaEntryT
{
public SchemaEntry (string name)
{
//...
}

//...

public static SchemaEntryT operator =(SchemaEntryT entry, T value)
{
entry.Set (value);
return entry;
}

public static implicit operator T (SchemaEntryT entry)
{
return entry.Get ();
}
}

This is obviously not possible because C# forbids overloading =. A
potential problem is as follows:

SchemaEntryint entry = 5;

As you can see in the outline of SchemaEntry above, there is no
parameterless constructor, so this code is clearly problematic. One
solution to treat this as:

SchemaEntryint entry.Set(5);

and throw a use of unassigned variable compiler error. If you wanted
to allow this syntax (in the way that Nullable uses this syntax), you
could allow for overloading of the new operator like so:

public static NullableT operator new(T value)
{
return new NullableT(value);
}

Another problem is allowing overloading assignment between the same type:

public class Foo
{
public static Foo operator =(Foo f1, Foo f2)
{
f1 = f2; // recursive fail
}
}

I can think of a few possible solutions:
1) Require that the two parameters to the overload function be of
different types. This would still allow the safe use of generics (as
with SchemaEntry).
2) Stipulate that any use of the assignment operator inside of an
assignment operator overload function will perform a standard bitwise
copy.
3) I had other solutions, but I actually think these two cover it pretty nicely.

I prefer solution 1. I've given it a little think and no problems jump
out at me. So I post this to solicit counter cases. If you'd like to
tell me that this kind of syntax is a) confusing, b) unnecessary, c)
evil, d) all of the above, have at me, but I am more interested in
disastrous corner case in my above proposal. And if you too yearn to
save yourself precious parenthesis, feel free to chime in too!

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


[Mono-dev] Mono 1.9 (r94604) Stalls on Exits?

2008-02-01 Thread Dan Shechter
I've compiled Mono 1.9 r94604 from source on an ubuntu gutsy amd 64
machine today.

I've encountered some wierdness where my application will stall on exit,
sometimes up to 10 seconds, sometimes not at all.
At various times I've seen this message after/while it manages to exit...:
./a.sh: line 3: 22356 Real-time signal 1  mono a.exe $@

Does this make any sense?
Naturally if I call Application.Exit(0); the application exits cleanly
EVERY TIME.
___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list