Re: [Mono-dev] [PATCH] corlib GetCustomAttributes for overriden properties bug

2008-02-26 Thread Ivan N. Zlatev
On Tue, Feb 26, 2008 at 5:47 AM, Raja R Harinath [EMAIL PROTECTED] wrote:
 Hi,


  Ivan N. Zlatev [EMAIL PROTECTED] writes:

   On Mon, Feb 25, 2008 at 9:43 PM, Ivan N. Zlatev [EMAIL PROTECTED] wrote:
   Please review the attached patch that fixes our behavior to match MS's
in terms of GetCustomAttributes for overridden attributes on
properties. That is:
 * PropertyInfo.GetCustomAttributes - Inherit parameter is ignored and
behavior defaults to false
 * Attributes.GetCustomAttributes - Inherit parameter is not ignored
 * Attributes.IsDefined - Inherit parameter is not ignored on the 2.0 
 profile.
  
This patch fixes bugs #324472 and #322464. Also now all our Attribute
tests pass on 1.1 and 2.0 profiles(woho!). Please say whether it's
okay to commit and if the fixes should be backported.
  
  
   The previous patch did not handle indexed properties. Attached is an
   updated patch. I did a clean rebuild with the patch applied - no
   breakages. All Attributes tests pass.
  
   Zoltan, what do you think?

  Since this affects reflection, one good testcase is that it doesn't
  break the compiler.  Can you check that this doesn't break

   make compiler-tests

  (you need to run this from the mono/ tree).


Done that and there are no breakages. I talked with Zoltan on IRC last
night and he said the patch looks okay. I am going to commit it.

-- 
Ivan N. Zlatev

Web: http://www.i-nZ.net
It's all some kind of whacked out conspiracy.
___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


Re: [Mono-dev] [PATCH] corlib GetCustomAttributes for overriden properties bug

2008-02-26 Thread Ivan N. Zlatev
On Tue, Feb 26, 2008 at 1:05 PM, Ivan N. Zlatev [EMAIL PROTECTED] wrote:
 On Tue, Feb 26, 2008 at 5:47 AM, Raja R Harinath [EMAIL PROTECTED] wrote:
   Hi,
  
  
Ivan N. Zlatev [EMAIL PROTECTED] writes:
  
 On Mon, Feb 25, 2008 at 9:43 PM, Ivan N. Zlatev [EMAIL PROTECTED] 
 wrote:
 Please review the attached patch that fixes our behavior to match MS's
  in terms of GetCustomAttributes for overridden attributes on
  properties. That is:
   * PropertyInfo.GetCustomAttributes - Inherit parameter is ignored and
  behavior defaults to false
   * Attributes.GetCustomAttributes - Inherit parameter is not ignored
   * Attributes.IsDefined - Inherit parameter is not ignored on the 2.0 
 profile.

  This patch fixes bugs #324472 and #322464. Also now all our Attribute
  tests pass on 1.1 and 2.0 profiles(woho!). Please say whether it's
  okay to commit and if the fixes should be backported.


 The previous patch did not handle indexed properties. Attached is an
 updated patch. I did a clean rebuild with the patch applied - no
 breakages. All Attributes tests pass.

 Zoltan, what do you think?
  
Since this affects reflection, one good testcase is that it doesn't
break the compiler.  Can you check that this doesn't break
  
 make compiler-tests
  
(you need to run this from the mono/ tree).
  

  Done that and there are no breakages. I talked with Zoltan on IRC last
  night and he said the patch looks okay. I am going to commit it.


For the record - committed as revision 96632.

-- 
Ivan N. Zlatev

Web: http://www.i-nZ.net
It's all some kind of whacked out conspiracy.
___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


[Mono-dev] Transparency from GIF files does not show up in BitmapData

2008-02-26 Thread Christian Stümpel
Hi everybody ,

since I got no reply I post this again. Please help...

my program analyzes System.Drawing.Bitmaps. Many pixel formats (all- 
non indexed, some indexed) work fine, but in BitmapData of Bitmaps  
from GIF image files which use transparent color I cannot find the  
transparency information anywhere. From the source code I guessed  
that the transparent index would get transformed into an ColorPalette  
entry which has the alpha component set correctly.  But all palette  
entries  are opaque.

A problem with the GIF decoder maybe? Any ideas?

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


[Mono-dev] [PATCH] System.Uri.EscapeString ()

2008-02-26 Thread Stephane Delcroix
Hey guys,

the System.Uri ctor is sometimes wrong for utf8 strings that need
encoding, as shown is the following code snippet:

SNIP
using System;
public class Test
{
public static void Main()
{
string ok = file:///tmp/x (%232).jpg;
string nok = file:///tmp/ü (%232).jpg;

Console.WriteLine (new Uri (ok).ToString ());
Console.WriteLine (new Uri (nok).ToString ());
}
}
SNAP

returns:

file:///tmp/x (%232).jpg
file:///tmp/ü (%25232).jpg

which is wrong.

The culprit being the (internal) EscapeString which iterates on a byte[] but 
check (and then replace) 
for IsHexEncoding on the String itself. For multibyte encodings (like utf8) the 
index can be out of sync.

I attached a patch, please review.

regards

Stephane
Index: System/Uri.cs
===
--- System/Uri.cs	(revision 96651)
+++ System/Uri.cs	(working copy)
@@ -1074,12 +1074,9 @@
 			if (str == null)
 return String.Empty;
 			
-			byte [] data = Encoding.UTF8.GetBytes (str);
 			StringBuilder s = new StringBuilder ();
-			int len = data.Length;	
+			int len = str.Length;	
 			for (int i = 0; i  len; i++) {
-char c = (char) data [i];
-// reserved= ; | / | ? | : | @ |  | = | + | $ | ,
 // mark= - | _ | . | ! | ~ | * | ' | ( | )
 // control = US-ASCII coded characters 00-1F and 7F hexadecimal
 // space   = US-ASCII coded character 20 hexadecimal
@@ -1090,26 +1087,28 @@
 // i.e. for encoding that follows the pattern 
 // %hexhex in a string, where hex is a digit from 0-9 
 // or a letter from A-F (case-insensitive).
-if('%' == c  IsHexEncoding(str,i))
-{
+if (IsHexEncoding (str,i)) {
 	// if ,yes , copy it as is
-	s.Append(c);
-	s.Append(str[++i]);
-	s.Append(str[++i]);
+	s.Append(str.Substring (i, 3));
+	i += 2;
 	continue;
 }
 
-if ((c = 0x20) || (c = 0x7f) || 
-(%\{}|\\^`.IndexOf (c) != -1) ||
-(escapeHex  (c == '#')) ||
-(escapeBrackets  (c == '[' || c == ']')) ||
-(escapeReserved  (;/?:@=+$,.IndexOf (c) != -1))) {
-	s.Append (HexEscape (c));
-	continue;
+byte [] data = Encoding.UTF8.GetBytes (new char[] {str[i]});
+int length = data.Length;
+for (int j = 0; j  length; j++) {
+	char c = (char) data [j];
+	// reserved= ; | / | ? | : | @ |  | = | + | $ | ,
+	if ((c = 0x20) || (c = 0x7f) || 
+	(%\{}|\\^`.IndexOf (c) != -1) ||
+	(escapeHex  (c == '#')) ||
+	(escapeBrackets  (c == '[' || c == ']')) ||
+	(escapeReserved  (;/?:@=+$,.IndexOf (c) != -1))) {
+		s.Append (HexEscape (c));
+		continue;
+	}	
+	s.Append (c);
 }
-
-	
-s.Append (c);
 			}
 			
 			return s.ToString ();
___
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 3 is out - mono 1.9 pre3 / gtk# 2.10.3 not working on Win32

2008-02-26 Thread Brad Taylor
Hey,

 I'm not sure if there is a bug for this or not.
 
 The gtk# 2.10.3 that comes with the mono 1.9.0 preview
 3 windows installer is broken.  In particular, setting
 or getting a value from a tree model.  

Weird, we at Medsphere haven't had any issues with this installer when
running applications that make extensive use of TreeView.  Do you have a
test case you can provide for this issue?

Best,

-Brad

___
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 3 is out - mono 1.9 pre3 / gtk# 2.10.3 not working on Win32

2008-02-26 Thread Jonathan Pobst
I filed this bug, which I think is the same issue:

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

Jonathan


Brad Taylor wrote:
 Hey,
 
 I'm not sure if there is a bug for this or not.

 The gtk# 2.10.3 that comes with the mono 1.9.0 preview
 3 windows installer is broken.  In particular, setting
 or getting a value from a tree model.  
 
 Weird, we at Medsphere haven't had any issues with this installer when
 running applications that make extensive use of TreeView.  Do you have a
 test case you can provide for this issue?
 
 Best,
 
 -Brad
 
 ___
 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] Tweak for instructions on Web site

2008-02-26 Thread Rusty Howell
Thanks for the tip!  Completely forgot about the keyboard.
Your instructions have been added to the wiki page.

Rusty Howell

Dennis Hayes wrote:
 At the end of the unsupported downloads there is a link to the German
 Ubantu VM.
 The VM is set up for German, but Mono has easy instructions on how to
 switch it to English.
 Great!
 But the keyboard is still in German.
  
 could someone add
  
 Then change the keyboard to English.
  * Click System
  * Click Preferences
  * Click Keyboard
  * Select the Layout Tab
  * Click + Add
  * Select your language (U.S.English) from the layout drop down
  * Click on the Default radio button to make English the default layout.
  * Click close
  
 We might also want to meantion that this VM include the Mono source
 code, so it can be used to develop Mono as well as testing apps.
  
 I assume that I should NOT add this to bugzillia? If that is
 preferred, I can do that as well.
  
 I am going to ask Daniel Nauck if eh will include instructions or
 batch files for anonymous check out compile and diff creation.
  
  
 Thanks
 Dennis
  
 http://www.mono-project.com/Other_Downloads

 
 Never miss a thing. Make Yahoo your homepage.
 http://us.rd.yahoo.com/evt=51438/*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-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 3 is out - mono 1.9 pre3 / gtk# 2.10.3 not working on Win32

2008-02-26 Thread Daniel Morgan
Thanks Jonathan and Mike.  The exception you see in
bug# 364881 is what I get.  I am running Vista Home
Premium 32-bit.  So, was this bug due to running gtk#
on Vista?   

I was running the samples that come with the Windows
Installer to see if they still worked.  And if they
didn't, I wanted to fix them.  Some samples do not
work  and some do.  The samples which used a tree
model failed. 

On a different topic, I need to fix SQL# For GTK#
sample to use gmcs instead of mcs because of an API
correction.  The correction was for IDbDataAdapter
Fill(DataTable, IDbReader) which only exists in .NET
fx 2.0.  

Does anyone have any hints or suggestions for building
mono and gtk# from svn on cygwin on Vista?  Cygwin
runs strangely on Vista.

--- Jonathan Pobst [EMAIL PROTECTED] wrote:

 I filed this bug, which I think is the same issue:
 
 https://bugzilla.novell.com/show_bug.cgi?id=364881
 
 Jonathan
 
 
 Brad Taylor wrote:
  Hey,
  
  I'm not sure if there is a bug for this or not.
 
  The gtk# 2.10.3 that comes with the mono 1.9.0
 preview
  3 windows installer is broken.  In particular,
 setting
  or getting a value from a tree model.  
  
  Weird, we at Medsphere haven't had any issues with
 this installer when
  running applications that make extensive use of
 TreeView.  Do you have a
  test case you can provide for this issue?
  
  Best,
  
  -Brad
  


  

Be a better friend, newshound, and 
know-it-all with Yahoo! Mobile.  Try it now.  
http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ 

___
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 3 is out - mono 1.9 pre3 / gtk# 2.10.3 not working on Win32

2008-02-26 Thread Daniel Morgan
Will the gtk# fix that Mike Kestner did make it into
the Mono 1.9 windows installer?

--- Jonathan Pobst [EMAIL PROTECTED] wrote:

 I filed this bug, which I think is the same issue:
 
 https://bugzilla.novell.com/show_bug.cgi?id=364881
 
 Jonathan
 
 
 Brad Taylor wrote:
  Hey,
  
  I'm not sure if there is a bug for this or not.
 
  The gtk# 2.10.3 that comes with the mono 1.9.0
 preview
  3 windows installer is broken.  In particular,
 setting
  or getting a value from a tree model.  
  
  Weird, we at Medsphere haven't had any issues with
 this installer when
  running applications that make extensive use of
 TreeView.  Do you have a
  test case you can provide for this issue?
  
  Best,
  
  -Brad
  
  ___
  Mono-devel-list mailing list
  Mono-devel-list@lists.ximian.com
 

http://lists.ximian.com/mailman/listinfo/mono-devel-list
  
  
 
 



  

Never miss a thing.  Make Yahoo 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


Re: [Mono-dev] Mono 1.9.0 Preview 3 is out - mono 1.9 pre3 / gtk# 2.10.3 not working on Win32

2008-02-26 Thread Jonathan Pobst
Yes, I think they are going to make a 2.10.4 to ship with Mono 1.9.

Jonathan


Daniel Morgan wrote:
 Will the gtk# fix that Mike Kestner did make it into
 the Mono 1.9 windows installer?
 
 --- Jonathan Pobst [EMAIL PROTECTED] wrote:
 
 I filed this bug, which I think is the same issue:

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

 Jonathan


 Brad Taylor wrote:
 Hey,

 I'm not sure if there is a bug for this or not.

 The gtk# 2.10.3 that comes with the mono 1.9.0
 preview
 3 windows installer is broken.  In particular,
 setting
 or getting a value from a tree model.  
 Weird, we at Medsphere haven't had any issues with
 this installer when
 running applications that make extensive use of
 TreeView.  Do you have a
 test case you can provide for this issue?

 Best,

 -Brad

 ___
 Mono-devel-list mailing list
 Mono-devel-list@lists.ximian.com

 http://lists.ximian.com/mailman/listinfo/mono-devel-list


 
 
 
   
 
 Never miss a thing.  Make Yahoo 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