Re: [Mono-winforms-list] support for winform?

2006-11-02 Thread Jordi Mas
El dj 02 de 11 del 2006 a les 10:21 +0100, en/na Alexander Olk va
escriure:
> Hi,
> 
> I'm pretty sure that this was fixed last sunday (the fix is not part of
> any release yet). So it would be nice to know if you are running svn
> head or some other mono version.
> 
> But nevertheless, please file a bug at:
> 
> http://bugzilla.ximian.com/

I do not know if this has been planned or not but it will be interesting
to have a release candidate for Mono 1.2 then people can test their apps
against Mono 1.2. Many people does not have the time or knowledge to
build from SVN.

This can help to detect bugs like the reflector's one that I have
detected a few hours back.

Regards,

Jordi,

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


Re: [Mono-winforms-list] support for winform?

2006-11-02 Thread Jordi Mas
El dj 02 de 11 del 2006 a les 10:21 +0100, en/na Alexander Olk va
escriure:
> Hi,
> 
> I'm pretty sure that this was fixed last sunday (the fix is not part of
> any release yet). So it would be nice to know if you are running svn
> head or some other mono version.
> 
> But nevertheless, please file a bug at:
> 
> http://bugzilla.ximian.com/

I do not know if this has been planned or not but it will be interesting
to have a release candidate for Mono 1.2 then people can test their apps
against Mono 1.2. Many people does not have the time or knowledge to
build from SVN.

This can help to detect bugs like the reflector's one that I have
detected a few hours back.

Regards,

Jordi,

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


Re: [Mono-winforms-list] support for winform?

2006-11-02 Thread Jordi Mas
El dj 02 de 11 del 2006 a les 10:21 +0100, en/na Alexander Olk va
escriure:
> Hi,
> 
> I'm pretty sure that this was fixed last sunday (the fix is not part of
> any release yet). So it would be nice to know if you are running svn
> head or some other mono version.
> 
> But nevertheless, please file a bug at:
> 
> http://bugzilla.ximian.com/

I do not know if this has been planned or not but it will be interesting
to have a release candidate for Mono 1.2 then people can test their apps
against Mono 1.2. Many people does not have the time or knowledge to
build from SVN.

This can help to detect bugs like the reflector's one that I have
detected a few hours back.

Regards,

Jordi,

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


[Mono-winforms-list] Font patch for libgdiplus

2006-05-18 Thread Jordi Mas
Hi folks,

This patch removes libgdiplus dependency against Cairo
_cairo_toy_font_face_create API function. This API call is an internal
Cairo API call (not part of the public API). Also, on Cairo 1.2 is no
longer exported.

I have tested the patch with a few SWF apps and the SD font creation
samples and it seems to work fine.

I'll appreciate if you try it before I commit it.

Regards,

Jordi,
Index: font.c
===
--- font.c	(revision 60830)
+++ font.c	(working copy)
@@ -37,12 +37,7 @@
 static int ref_familySansSerif = 0;
 static int ref_familyMonospace = 0;
 
-extern cairo_font_face_t *
-_cairo_toy_font_face_create (const char *family, 
-			 cairo_font_slant_t   slant, 
-			 cairo_font_weight_t  weight);
 
-
 /* Family and collections font functions */
 
 void
@@ -558,7 +553,24 @@
 }
 
 /* Font functions */
+cairo_font_face_t *
+gdip_face_create (const char *family, 
+			cairo_font_slant_t   slant, 
+			cairo_font_weight_t  weight,
+			cairo_t** ct)
+{
+	cairo_surface_t *surface;
+	cairo_font_face_t *face;
 
+	surface = cairo_image_surface_create_for_data ((unsigned char *)NULL, CAIRO_FORMAT_ARGB32, 0, 0, 0);
+	*ct = cairo_create (surface);
+	cairo_select_font_face (*ct, (const char *) family, slant, weight);
+	face = cairo_get_font_face (*ct);
+	cairo_surface_destroy (surface);
+	return face;
+
+}
+
 GpStatus
 GdipCreateFont (GDIPCONST GpFontFamily* family, float emSize, GpFontStyle style, Unit unit,  GpFont **font)
 {
@@ -590,7 +602,7 @@
 	else
 		slant = CAIRO_FONT_SLANT_NORMAL;
 
-	cairofnt = _cairo_toy_font_face_create ((const char*) str, slant, weight);
+	cairofnt = gdip_face_create ((const char*) str, slant, weight, &result->ct);
 
 	if (cairofnt == NULL) {
 		GdipFree(result);
@@ -632,7 +644,8 @@
 	if (!font)
 		return InvalidParameter;
 
-	cairo_font_face_destroy (font->cairofnt);
+	cairo_destroy (font->ct);
+
 	GdipFree ((void *)font->face);
 	GdipFree ((void *)font);
 	return Ok;	   
@@ -753,7 +766,7 @@
 
 	memcpy(result->face, src_font->face, strlen((char *)src_font->face) + 1);
 
-	result->cairofnt = _cairo_toy_font_face_create ((const char*) src_font->face, slant, weight);
+	result->cairofnt = gdip_face_create ((const char*) src_font->face, slant, weight, &result->ct);
 
 	if (result->cairofnt == NULL) {
 		GdipFree(result);
@@ -841,7 +854,7 @@
 		result->face[LF_FACESIZE - 1] = '\0';
 	}
 
-	result->cairofnt = _cairo_toy_font_face_create ((const char *)result->face, slant, weight);
+	result->cairofnt = gdip_face_create ((const char *)result->face, slant, weight, &result->ct);
 	if (result->cairofnt == NULL) {
 		GdipFree(result);
 		return GenericError;
Index: gdip.h
===
--- gdip.h	(revision 60830)
+++ gdip.h	(working copy)
@@ -890,6 +890,7 @@
 	GpFontFamily	*family;
 	float   emSize;
 	GpUnit  unit;
+	cairo_t*ct;
 } GpFont;
 
 
___
Mono-winforms-list maillist  -  Mono-winforms-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-winforms-list


Re: [Mono-winforms-list] datagrid scrolling patch (fix for bug 78011)

2006-05-12 Thread Jordi Mas
El dv 12 de 05 del 2006 a les 11:31 -0400, en/na Chris Toshok va
escriure:
> The datagrid patch is pretty simple - call XplatUI.ScrollWindow once,
> and don't call invalidate when scrolling, as the generated exposes will
> cause us to redraw the areas that need it.  Turns out removing the
> rectangle code made clear the methods could be substantially simplified,
> so I went ahead and did that too.  This was all that was necessary to
> get vertical scrolling to be fast.
> 
> The theme change keeps us from redrawing the entire row whenever a
> portion of it is exposed (which makes horizontal scrolling as fast as
> vertical.)
> 
> Chris

Chris,

Have you tried the patch on Win32 also? At the time that I wrote that
the were diferences in the way what ScrollWindows functions XplatUI
worked for diferent platforms and that could not be archived. If it
works on both platforms, feel free to commit.

Thanks,

Jordi,

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


Re: [Mono-winforms-list] datagrid layout patch

2006-05-12 Thread Jordi Mas
El dj 11 de 05 del 2006 a les 15:24 -0400, en/na Chris Toshok va
escriure:
> The initial layout of the datagrid (CalcGridAreas in particular) ends up
> recursively calling itself (on one test it was being invoked 5 or 6
> times.)  You can see this happening with a large datagrid by watching
> the vertical scrollbar's slider change size as it lays out.
> 
> This patch calculates the layout/positioning of everything in a single
> pass, which speeds things up quite a bit.
> 
> Chris

Chris, your patch looks to me. Feel free to commit it. Thanks.

Jordi,

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


Re: [Mono-winforms-list] Datagrid TableStyle error

2006-05-04 Thread Jordi Mas
El dc 26 de 04 del 2006 a les 10:52 +0200, en/na Bartosz Mosica va
escriure:
> Hi!
> I've started porting some bigger application to mono, I mean compiling
> using MS .NET and then run under mono, and I've noticed incorrect
> behavior of DataGrid.
> I'm using current stable version of mono 1.1.15, I do not know if it
> is fixed in development branch. 
> Look at code:

Yes, this a bug. Please, fill up a bug report at
http://bugzilla.ximian.com and assign it to me ([EMAIL PROTECTED]) and
I'll look into it. Please, provide also a fully functional simple code
that can be used to reproduce the problem.

Thanks,

Jordi,

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


Re: [Mono-winforms-list] Please approve the patch of bug 76562

2005-11-07 Thread Jordi Mas
El dl 07 de 11 del 2005 a les 12:44 +0100, en/na Kornél Pál va escriure:
> Hi,
> 
> Please look at http://bugzilla.ximian.com/show_bug.cgi?id=76562 and approve
> or commit the patch of the bug unless it has some unwanted effects.

Kornél. This is fine with me.

Jordi,

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


Re: [Mono-winforms-list] Programs compiled on Delphi 2005 using MWF hang on exit

2005-10-09 Thread Jordi Mas
El ds 08 de 10 del 2005 a les 20:14 +0200, en/na Pavel Bansky va
escriure:
> I have also tested Delphi2005 apps on Mono and results was truly 
> unsatisfing - Mono 1.1.4 to 1.1.8.

Our System.Windows.Forms implementation is still under development and
bug fixing. I strongly recommend to upgrade to the latest version of
Mono and libgdiplus (version 1.1.9.2).

We will also appreciate if you report any bug or issue that you run
into.

Thanks Pavel!

-- 
Jordi Mas i Hernàndez - Mono development team - http://www.mono-project.com
Homepage and LiveJournal at http://www.softcatala.org/~jmas


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


Re: [Mono-winforms-list] Re: [Mono-dev] Help contributing tolibgdiplus and Cairo integration

2005-10-05 Thread Jordi Mas

> They are wrappers around native windows but most of them are drawn using
> GDI+ using managed code unless you set FlatStyle to System. These are:
> Button, CheckBox, RadioButton, Label and GroupBox. Look at ControlPaint
> class. In MWF it wraps ThemeEngine but in MS.NET it probably really
> implements drawing and is probably used by the above controls.
> 
> Some more complex controls like ListView are drawn by Windows (in this case
> by comctl32.dll) anyway and there is no FlatStyle property.

There are some, that are implemented on top of System.Drawing (DataGrid
for example also), but most of them are native: ListBox, Menus,
ComboBox, ListView, ScrollBars, StatusBar, ToolBars, Tabs, TreeView,
etc.

Jordi,
-- 
Jordi Mas i Hernàndez - Mono development team - http://www.mono-project.com
Homepage and LiveJournal at http://www.softcatala.org/~jmas


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


Re: [Mono-winforms-list] Re: [Mono-dev] Help contributing to libgdiplus and Cairo integration

2005-10-05 Thread Jordi Mas
El dc 05 de 10 del 2005 a les 12:49 -0500, en/na Jonathan Gilbert va
escriure:

> I don't have much to say about the rest of the e-mail, but this last
> statement is not true. System.Windows.Forms uses System.Drawing for all of
> its drawing needs, and System.Drawing is a relatively thin wrapper of GDI+,

Jonathan,

Microsoft implemented System.Windows.Forms as a thin wrapper on top of
the Win32 API not on top of System.Drawing like we are doing (that's
because we call our implementation managed). Most of Microsoft SWF
controls are native and these ones do not use GDI+.

I hope that this helps to clarify.

Jordi,

-- 
Jordi Mas i Hernàndez - Mono development team - http://www.mono-project.com
Homepage and LiveJournal at http://www.softcatala.org/~jmas


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


[Mono-winforms-list] Help contributing to libgdiplus and Cairo integration

2005-10-05 Thread Jordi Mas
Hi all!

As you probably know Cairo 1.0 includes antialiasing support. This is
something important for libgdiplus because all the drawing operations in
System.Windows.Forms are based on the old Windows GDI and they use no
antialiasing.

After turning antialiasing off in Cairo 1.0 we noticed that DrawLine and
other functions basic drawing functions started to work different that
expected. With antialiasing off in Cairo lines that are supposed to be a
single pixel width have various variations in width. 

This a well-know and documented issue. John Hobby did his PhD on the
solution to this problem. There is a shorten version of PhD findings on
the web:

[Hobby89] John D. Hobby, Rasterizing Curves of Constant Width, JACM
36(2), 1989.
http://cm.bell-labs.com/who/hobby/87_2-04.pdf

In order to fix this problem the best solution is to implement an
algorithm to generate Hobby's "Pen polygons". These respect the desired
width and will make us to look right when AA is off. According to Cairo
hacker's, a hack in cairo-pen.c:_cairo_pen_init with Hobby's algorithm
will fix the problem.

We are looking for someone that wants to contribute to the Mono project
in graphics area and help us implementing Hobby's Pen polygons in Cairo.

Thanks,

Jordi,
-- 
Jordi Mas i Hernàndez - Mono development team - http://www.mono-project.com
Homepage and LiveJournal at http://www.softcatala.org/~jmas


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


Re: [Mono-winforms-list] [PATCH] AsyncMethodResult patch and Question

2005-09-28 Thread Jordi Mas
El dj 22 de 09 del 2005 a les 09:07 +0900, en/na Kazuki Oikawa va
escriure:

> 
> ListBox1.patch
> - Cannot get last index using IndexFromPoint.

This looks good. I have committed the change. See patch revision 50934.

> ListBox2.patch (not good patch...)
> - Improve action when MultiColumn is true.

Please, fill a bug into http://bugzilla.ximian.com describing the
problem, how to reproduce it, and then attach your proposed patch.
It's very important to do it this way. "Improve action when MultiColumn
is true" does not describe what we are trying to archive or fix.

Kazuki, thanks a lot for your work.

Regards,

Jordi,

-- 
Jordi Mas i Hernàndez - Mono development team - http://www.mono-project.com
Homepage and LiveJournal at http://www.softcatala.org/~jmas


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


Re: [Mono-winforms-list] Scrollbar widths

2005-09-19 Thread Jordi Mas
> First of all thanks for your work on SWF. I've been playing with it for 
> a few days and it's very impressive.

Thanks Chris.

> When writing a SWF app how wide should I make the scrollbars? I can't 
> find any kind of variable in the namespace that says how wide the user 
> wants their scrollbars. This can't be hardcoded of course, as it's a 
> user accessible variable in Windows.
> How is SWF itself deciding how wide to make its scrollbars for controls 
> such as TextBox?

In the MS .Net implementation the default value returned by
SystemInformation class is used. In our implementation, we are currently
pulling this value from the Theme class. 

You can change the size of a scrollbar using the Height, Width and Size
properties.

Jordi,

-- 
Jordi Mas i Hernàndez - Mono development team - http://www.mono-project.com
Homepage and LiveJournal at http://www.softcatala.org/~jmas


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


Re: [Mono-winforms-list] Crossplatform project using WinForms (good or bad idea?)

2005-09-16 Thread Jordi Mas
El dv 16 de 09 del 2005 a les 10:38 +0200, en/na Graeme Geldenhuys va
escriure:
> Hi,
> 
> What is the state of WinForms under Mono?  How usable is it?  Could I 
> recommend it above Gtk# for 

You have information about the status at:

http://svn.myrealbox.com/blog/index.php

Jordi,

-- 
Jordi Mas i Hernàndez - Mono development team - http://www.mono-project.com
Homepage and LiveJournal at http://www.softcatala.org/~jmas


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


Re: [Mono-winforms-list] [PATCH] ListBox etc....

2005-09-16 Thread Jordi Mas
El dv 16 de 09 del 2005 a les 00:12 +0900, en/na Kazuki Oikawa va
escriure:
> Kazuki Oikawa

Thanks a lot for your work. It has been committed in SVN revision 50139.

Please, in the future give us an acurrate description of how to
reproduce the problem that you are fixing (e.g.: sample, what to do to
get the error, etc). I know that it's more work, but it makes life more
easy for us also.

Thanks,
-- 
Jordi Mas i Hernàndez - Mono development team - http://www.mono-project.com
Homepage and LiveJournal at http://www.softcatala.org/~jmas


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


Re: [Mono-winforms-list] Implementing file icons on Windows

2005-09-13 Thread Jordi Mas
El dt 13 de 09 del 2005 a les 13:40 +0200, en/na Kornél Pál va escriure:
> Hi,
> 
> Unlike Linux, Windows associates icons based on extension and optionally on
> custom icon handler DLLs and don't care about MIME types.
> 
> I want to implement icon handling using SHGetFileInfo and system image list.
> This meas however that I have to modify ImageList to use and interface based
> multi-implementation design like our theming system because system image
> list is a native Windows image list.
> 
> Is it OK to to so?

Kornél, keep in mind that this is a "managed" Windows implementation of
System.Windows.Forms. We are trying to share as maximum as possible
between platforms.

I think that is better if you come up with a way where adding little
code to the already existing managed implementation you can archive what
you need specifically for Win32. Re-implementing ImageList and having
separate implementations I do not think is an option and will break our
current design.

Can you please explain a bit more that you need, which members and
behaviour of ImageList will affect? 

Thanks Kornél,

Jordi,

-- 
Jordi Mas i Hernàndez - Mono development team - http://www.mono-project.com
Homepage and LiveJournal at http://www.softcatala.org/~jmas


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


Re: [Mono-winforms-list] Commit DataGridView files

2005-09-05 Thread Jordi Mas
El dl 05 de 09 del 2005 a les 10:09 +0200, en/na Pedro Martínez Juliá va
escriure:
> Hi,
> 
> I sent a mail with references about DataGridView, Peter told me to wait
> until Jordi Mas could review my code and tell me if I can commit it. I
> didn't get any response, have you got any problem with it? Should I do
> something before commit?

Pedro,

Your work looks good. Today is my first day of work on a few days
because I have been on holidays.  I'm having problems with my Mono
installation and I cannot run your code right now.

>From what I have seen from the code, there are these main areas that
have to be improved before committing:

a) It's very important to implement clipping specially for controls like
Datagrid that can be very large on the screen. It reduces flickering and
increases speed dramatically. 

b) You should handle scroll using XplatUI.ScrollWindow instead of
Invalidating the whole paint area every time. I'm sure that your control
flickers a lot right now when scrolled and also it's slow when
scrolling. 

c) It seems that keyboard navigation is not implemented. This is
important to implement.

I recommend you to use Win32 when implementing a) and b) since the Linux
layer that supports clipping (libgdiplus) and gcrolling (XplatX11) is
still a work in progress.

Tell me if you need help. 

Thanks for your work. 

Regards,

Jordi,

-- 
Jordi Mas i Hernàndez - Mono development team - http://www.mono-project.com
Homepage and LiveJournal at http://www.softcatala.org/~jmas


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


Re: [Mono-winforms-list] MWF and Cyrillics

2005-09-03 Thread Jordi Mas
El dj 01 de 09 del 2005 a les 12:23 +0300, en/na Vladimir Moushkov va
escriure:
> Hi there again!
> 
> I am trying to run .NET application compiled on Windows with Microsoft
> VB.NET. It is starting ok but the whole application is using cyrillic and
> the display is garbled. Where should I hack to unlock others encodings and
> so on... ?

Are you running your app in Linux or Windows? If you are using Mono,
witch version of libgdiplus?

Can you fill a bug at http://bugzilla.ximian.com report with a small
case that allows the problem to be easily reproduced? A scree ncapture
can be also useful.

Regards,

Jordi,

-- 
Jordi Mas i Hernàndez - Mono development team - http://www.mono-project.com
Homepage and LiveJournal at http://www.softcatala.org/~jmas


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


Re: [Mono-winforms-list] Throwback

2005-08-30 Thread Jordi Mas
El dl 29 de 08 del 2005 a les 12:47 +0200, en/na Kornél Pál va escriure:
> Hi,
> 
> Could you please fix http://bugzilla.ximian.com/show_bug.cgi?id=75508 as
> well. I added all the required information to fix but I have no environment
> to test a modified libgdiplus.

I'm on holidays until next Monday, I'll look into that when I'm back.

Regards,

Jordi,

-- 
Jordi Mas i Hernàndez - Mono development team - http://www.mono-project.com
Homepage and LiveJournal at http://www.softcatala.org/~jmas


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


Re: [Mono-winforms-list] Throwback

2005-08-29 Thread Jordi Mas
Hola Paul,

A change in Graphics.cs done a few days bug exposed a bug that we had in
libgdiplus. I fix that bug in SVN revision 48839 for the new libgdiplus
library but not for the current libgdiplus since it going to be gone in
a few hours. 

You can get the new libgdiplus from the SVN libgdiplus-cairo-upgrade
branch or wait until late today or tomorrow when we will merge the
libgdiplus-cairo-upgrade into the current one.

Regards,

Jordi,

El dg 28 de 08 del 2005 a les 11:18 +0100, en/na Paul va escriure:
> Hi,
> 
> This was generated by the simple datetime source posted here yesterday
> or Friday. I am getting something very similar with every MWF based
> application.
> 
> Unhandled Exception: System.NullReferenceException: Object reference not
> set to an instance of an object
> in <0x0> 
> in (wrapper managed-to-native)
> System.Windows.Forms.XplatUIX11:GetFontMetrics (intptr,intptr,int&,int&)
> in <0x00034> System.Windows.Forms.XplatUIX11:GetFontMetrics
> (System.Drawing.Graphics g, System.Drawing.Font font, System.Int32
> ascent, System.Int32 descent)
> in <0x0001e> System.Windows.Forms.XplatUI:GetFontMetrics
> (System.Drawing.Graphics g, System.Drawing.Font font, System.Int32
> ascent, System.Int32 descent)
> in <0x00325> System.Windows.Forms.Line:RecalculateLine
> (System.Drawing.Graphics g, System.Windows.Forms.Document doc)
> in <0x0009c> System.Windows.Forms.Document:RecalculateDocument
> (System.Drawing.Graphics g, Int32 start, Int32 end, Boolean optimize)
> in <0x00017> System.Windows.Forms.Document:RecalculateDocument
> (System.Drawing.Graphics g)
> in <0x00028> System.Windows.Forms.TextBoxBase:CalculateDocument ()
> in <0x00293> System.Windows.Forms.TextBoxBase:set_Text (System.String
> value)
> in <0xd> System.Windows.Forms.TextBox:set_Text (System.String value)
> in <0x00017> System.Windows.Forms.NumericUpDown:set_Text (System.String
> value)
> in <0x000da> System.Windows.Forms.NumericUpDown:UpdateEditText ()
> in <0x00449> System.Windows.Forms.UpDownBase:.ctor ()
> in <0x00010> System.Windows.Forms.NumericUpDown:.ctor ()
> in (wrapper remoting-invoke-with-check)
> System.Windows.Forms.NumericUpDown:.ctor ()
> in <0x005d1> System.Windows.Forms.MonthCalendar:.ctor ()
> in <0x00010> System.Windows.Forms.MonthCalendar:.ctor
> (System.Windows.Forms.DateTimePicker owner)
> in (wrapper remoting-invoke-with-check)
> System.Windows.Forms.MonthCalendar:.ctor
> (System.Windows.Forms.DateTimePicker)
> in <0x00032> System.Windows.Forms.DateTimePicker:.ctor ()
> in (wrapper remoting-invoke-with-check)
> System.Windows.Forms.DateTimePicker:.ctor ()
> in <0x00042> Form1:InitialiseComponent ()
> in <0x00013> Form1:.ctor ()
> in (wrapper remoting-invoke-with-check) Form1:.ctor ()
> in <0x00018> Form1:Main ()
> 
> Given the code and executable worked Saturday morning, something has
> gone really wrong somewhere. As I can only see it with MWF based
> applications, is it safe to assume it's MWF based and bugzilla it?
> 
> TTFN
> 
> Paul
> 
> ___
> Mono-winforms-list maillist  -  Mono-winforms-list@lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-winforms-list
-- 
Jordi Mas i Hernàndez - Mono development team - http://www.mono-project.com
Homepage and LiveJournal at http://www.softcatala.org/~jmas


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


Re: [Mono-winforms-list] Landing: libgdiplus cairo 1.0 update

2005-08-26 Thread Jordi Mas
El dv 26 de 08 del 2005 a les 13:52 +0300, en/na Vladimir Moushkov va
escriure:

> Much much better!! Excelent work!

Thanks!

> But there is still drawing glitches and I think they are MWF related.
> See SWF-Datagrid test in winforms/

We still need to implement clipping in libgdiplus that Datagrid uses
extensively and some other X11 issues.

Jordi,

-- 
Jordi Mas i Hernàndez - Mono development team - http://www.mono-project.com
Homepage and LiveJournal at http://www.softcatala.org/~jmas


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


Re: [Mono-winforms-list] X11 problem with datetime picker

2005-08-22 Thread Jordi Mas
El dl 22 de 08 del 2005 a les 10:26 +0200, en/na Kornél Pál va escriure:
> >From: "Paul" <[EMAIL PROTECTED]>
> >I think I can say then we've hit a bug.
> 
> I tested the code on Windows. Using .NET Framework I get the datetime picker
> window when I drop down the list. Using Mono (on Windows) I get the drop
> down listbox, but I get nothing (no date time picker window) when I drop
> down the list.
> 
> So I'm sure this is a bug.

Someone please fills a bug report in http://bugzilla.ximian.com and we
will look after the issue.

Jordi,

-- 
Jordi Mas i Hernàndez - Mono development team - http://www.mono-project.com
Homepage and LiveJournal at http://www.softcatala.org/~jmas


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


Re: [Mono-winforms-list] Progress on DataGrid and features

2005-08-06 Thread Jordi Mas
El ds 06 de 08 del 2005 a les 13:50 -0600, en/na Jonathan J. Vargas R.
va escriure:
> Greets,
> 
> I am happy you are doing a nice effort for supporting WF on mono.

Thanks Jonathan, we are doing our best.

> I wanted to ask what are the expectations for DataGrid control. I see
> it is included in Mono WF but it is not supporting the Color
> properties included in in teh MS .Net DataGrid.

Which properties are you refering to? As you can see in:
http://svn.myrealbox.com/mwf/class-status-System.Windows.Forms.html 
we have the same API compatibility than MS .Net 1.1 

> Will Mono WF DataGrid include these features? And if so, how long
> should I wait? Are people currently working on this?

The only thing that is not yet implemented is the navigation between
relations. Also, there fixes to be done in X11 that affect performance
and functionality right now. These should be fixed soon.

> I am asking because I plan to migrate soon the GUI layer of a MS .NET
> application to Mono, and it makes use of DataGrid. I know colors are
> not a great aspect, but I would like it could have the same style than
> MS .NET DataGrid so the users don't note the difference.

I will be cool if you do so. I'll be glad to help as much as I can.

Jordi,

-- 
Jordi Mas i Hernàndez - Mono development team - http://www.mono-project.com
Homepage and LiveJournal at http://www.softcatala.org/~jmas


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


Re: [Mono-winforms-list] Timelines

2005-08-04 Thread Jordi Mas
El dc 03 de 08 del 2005 a les 14:27 -0500, en/na David A. Cornelson
(gmail) va escriure:

> When you get to “1g”, then I’m really going to get excited about using
> mono. When will that be?

Regarding installation since we moved from the approach of implementing
SWF using Wine is much much easier. You really have to have very few
problems installing the stuff.

Regarding when we will hit 1a it's difficult to predict, but it's
influenced by how community helps us with bug reports, testing
applications, and bug fixes.

We have not a date, but if you help it will be quicker :)

Jordi,

-- 
Jordi Mas i Hernàndez - Mono development team - http://www.mono-project.com
Homepage and LiveJournal at http://www.softcatala.org/~jmas


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


Re: [Mono-winforms-list] DataGridView

2005-08-03 Thread Jordi Mas
El dc 03 de 08 del 2005 a les 11:17 +0200, en/na Pedro Martínez Juliá va
escriure:
> Hello,
> 
> I'm very lost in DataGridView lines painting. I don't know where paints
> the lines, the possible places are:
> 
> - Inside the cell bounds, each cell should paint its four border lines.
> - Painted by DataGridView, the cell bounds are inside the border lines
> (they don't paint the lines).
> - Fifty-fifty, some lines (for example, bottom+right) are painted by the
> cell and the other lines are painted by the DataGridView or other cells
> because the bottom line for a cell can be top line for other cell.
> 
> I'm looking for this issue in MSDN2 pages and I don't see anything.

The method that I used for cases like this is to create a sample that
makes Datagrid paint in a DC that belongs to a bitmap for every paint
method or to override them and just return (no painting) to see visually
what every Paint method was responsible for painting. 

Jordi,


-- 
Jordi Mas i Hernàndez - Mono development team - http://www.mono-project.com
Homepage and LiveJournal at http://www.softcatala.org/~jmas


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


Re: [Mono-winforms-list] Bugzilla

2005-08-02 Thread Jordi Mas
El dt 02 de 08 del 2005 a les 17:36 +0100, en/na Paul va escriure:
> Hi,
> 
> Is it too early to start putting SWF bugs into bugzilla? I have found
> one using ListBox which causes a corruption.

Generally speaking, report any bug on any component listed in green
colour in this table:

http://svn.myrealbox.com/mwf/owners.html

I wrote ListBox control, then please fill a bug and assign it to me and
I'll look into it.

Thanks Paul

-- 
Jordi Mas i Hernàndez - Mono development team - http://www.mono-project.com
Homepage and LiveJournal at http://www.softcatala.org/~jmas


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


Re: [Mono-winforms-list] Theming in MWF

2005-07-29 Thread Jordi Mas
El dv 29 de 07 del 2005 a les 14:38 +0200, en/na Kornél Pál va escriure:

Hi Kornél,

> As I know MWF uses a single theme and it draws everything using
> System.Drawing and does not use any native control representations.
> On Windows it is possible to let the system draw controls. If it possible
> under X11 and OS X as well?

Well, that you are asking is that Microsoft have done for SWF, a light
wrapper on the Win32 API (including controls). 

To archive what you want you will need a new SWF implementation, cannot
be done with the current model or at least easily.

> On Windows there are system colors that could be used to color controls. Is
> the something equivalent on X11 and OS X?

System Colors and MWF  are in our TODO list... we have not started on
that yet.

Jordi,

-- 
Jordi Mas i Hernàndez - Mono development team - http://www.mono-project.com
Homepage and LiveJournal at http://www.softcatala.org/~jmas


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


Re: [Mono-winforms-list] Theming in MWF

2005-07-29 Thread Jordi Mas
El dv 29 de 07 del 2005 a les 14:20 +0200, en/na Pedro Martínez Juliá va
escriure:
> But we have a theming implementation in MWF. If we want to be 100%
> compatible with MS.NET, we need to get out that theming implementation
> and put it as an optional patch...

Pedro,

The fact that we have some extra features for our SWF implementation
that does NOT break the API level compatibility with the Microsoft
stack. What is important is that we expose the same public API and its
behaviour matches the Microsoft one as much as possible.

Regards,

Jordi,

-- 
Jordi Mas i Hernàndez - Mono development team - http://www.mono-project.com
Homepage and LiveJournal at http://www.softcatala.org/~jmas


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


Re: [Mono-winforms-list] Theming in MWF

2005-07-29 Thread Jordi Mas
El dv 29 de 07 del 2005 a les 12:31 +0200, en/na Pedro Martínez Juliá va
escriure:

Hola Pedro,

> I've seen the implementation of themes in MWF and I'm not agree at all
> of having theming in this stage of the development. I know that MS.NET
> has themes but I think that themes are implemented in Windows because I
> didn't see anything related in MSDN documentation.

That's right, MS .NET System.Windows.Forms uses Windows Theme API.

> I saw that Theme.cs has a lot of painting logic and I think it shouldn't
> be there. For example, DataGridPaintRows iterates the rows of a datagrid
> to paint each one. I think that it should be in DataGrid and not in the
> theme class.

You right, ThemeWin32Classic.cs has sometime logic that should be
somewhere else, in this case clearly in the internal
DataGridDrawingLogic class. I'll review those methods.

> The problems I see in this issue is that I can implement a Theme that
> changes the view of any control and in the other hand, this theming
> engine doesn't allow a user to easily download and install a theme.
> At the end, we have only Win32Classic theme maintained and it adds one
> level to the indirection at the time to paint any control.
> For all of this I think we can redesign now the theming. It's only an
> idea.

The original idea behind the Theme API was to isolate in a single place
all the decorations, colours, and things that were suitable to be
themed. For my taste, ThemeWin32Classic.cs has become too heavy. We
should review that.

Thanks for your comments Pedro,

Jordi,

-- 
Jordi Mas i Hernàndez - Mono development team - http://www.mono-project.com
Homepage and LiveJournal at http://www.softcatala.org/~jmas


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


Re: [Mono-winforms-list] DataGridView

2005-07-26 Thread Jordi Mas
El dt 26 de 07 del 2005 a les 15:22 +0200, en/na Pedro Martínez Juliá va
escriure:
> Hi,
> 
> I'm working in DataGridView (related to Summer of Code) and I want to
> know how you think I should implement the scrolling. My fist idea is to
> have one ScrolllableControl inside the DataGridView and use other object
> to host the drawing and to parent the cell editors (such as TextBox).
> 
> I don't know the impact of this implementation to the grdid clients.
> Have you any other idea?

Hello Pedro,

I wrote the Datagrid control that is the grid control in .Net 1.1. I
decided to go handle the scroll myself and do not use the
ScrollableControl class because I think that it brings little benefit to
the needs.

My suggestions are:

a) Write samples to understand exactly all the features that the grid
has. Grids are fairly complex controls and if you miss a property or a
feature that may break your design in a few weeks when you just realise
this new feature.

b) In the DataGrid control in .Net 1.1 the cells are painted using the
paint methods of DataGridColumnStyle derivated classes. You should only
create the editors only when need it. 

c) Look in SVN at the files DataGrid.cs DataGridDrawingLogic.cs located
at mcs/class/Managed.Windows.Forms/System.Windows.Forms to see how the
old DataGrid was implemented. It works pretty well on Win32 but on X11
we still need to do some fixes.

Good luck

Jordi,
-- 
Jordi Mas i Hernàndez - Mono development team - http://www.mono-project.com
Homepage and LiveJournal at http://www.softcatala.org/~jmas


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


Re: [Mono-winforms-list] SWF and datasets problem

2005-07-19 Thread Jordi Mas
El dt 19 de 07 del 2005 a les 13:33 +0100, en/na Paul F. Johnson va
escriure:
> Hi,

Hello Paul

> Can someone please check some code I'm playing with? It compiles fine with the
> current developer branch, but fails to run giving a pile of errors (it works
> fine under VS.NET). The errors include the annoying
> 
> TextBox.cs(1175) Invalidate called in CalculateDocument

Well, that's not an error. It's a debugging message. It's not indicating
any error. We are still working on MWF, then it's normal to find
messages like that.

> The source can be grabbed from
> 
> http://www.all-the-johnsons/mono/testing/dataset.cs

The URL was wrong. I found this to be the right one:

http://www.all-the-johnsons.co.uk/mono/testing/dataset.cs

> 
> I compiled it at about 11am GMT after doing a checkout and full rebuild (make
> distclean etc).

The sample does not even run on Microsoft .Net. It fires an exception
indicating that you are adding an already existing row. 

I fixed the sample and I made it work. The relations' navigation is not
implemented yet, then that grid control is not shown properly and I also
fixed a small problem in SVN a few minutes before. 

Thanks,

Jordi,

-- 
Jordi Mas i Hernàndez - Mono development team - http://www.mono-project.com
Homepage and LiveJournal at http://www.softcatala.org/~jmas


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


Re: [Mono-winforms-list] MWF Status?

2005-07-19 Thread Jordi Mas
El dt 19 de 07 del 2005 a les 16:08 +0100, en/na Vladimir Lushnikov va
escriure:
> Hi,
> 
> I've been looking at Windows.Forms in Mono and (surprise surprise)
> came to the conclusion that I couldn't find a central location for the
> status of the Windows.Forms implementation for Mono (latest branch).
> So is there some kind of central resource for finding out about
> windows forms implementation or is it simply (undocumented) "work is
> progress"?

Hi Vladimir!

Here you have a break down of the components and the people that is
working on the and their status:

http://svn.myrealbox.com/mwf/owners.html

Here you have the current completion's status of the
System.Windows.Forms namespace:

http://svn.myrealbox.com/mwf/class-status-System.Windows.Forms.html

Regards,

Jordi,

-- 
Jordi Mas i Hernàndez - Mono development team - http://www.mono-project.com
Homepage and LiveJournal at http://www.softcatala.org/~jmas


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


Re: [Mono-winforms-list] Datagrid.SetDataBinding bug

2005-07-18 Thread Jordi Mas
El dl 18 de 07 del 2005 a les 16:33 +0300, en/na [EMAIL PROTECTED]
va escriure:
> Hi there, small bug:
> SetDataSource method must be called before setDataMember, or SetDataMember
> will try to reach uninitated yet dataSource:
> --- DataGrid.cs.orig2005-07-15 18:37:42.0 +0300
> +++ DataGrid.cs 2005-07-18 16:31:58.0 +0300

Thanks for the patch. It has been already committed. Revision 47385.

Jordi,

-- 
Jordi Mas i Hernàndez - Mono development team - http://www.mono-project.com
Homepage and LiveJournal at http://www.softcatala.org/~jmas


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


Re: [Mono-winforms-list] Cairo, libgdiplus, System.Drawing on Windows

2005-06-15 Thread Jordi Mas
El dc 15 de 06 del 2005 a les 14:15 +0200, en/na Kornél Pál va escriure:
> Hi,
> 
> Is it possible to use libgdiplus with System.Drawing on Windows instead of
> GDI+?
> 
> It could be usefull for testing applications on Windows with libgdiplus.

libgdiplus is a Unix library. It depends on Cairo and in some specific
Unix stuff.

There is people porting Cairo to Win32, then it should be possible to do
it. Also, you may need to get rid of the FontConfig and other Unix
specific dependencies. I think that it may be a few days hack.

Jordi,
-- 
Jordi Mas i Hernàndez - Mono development team - http://www.mono-project.com
Homepage and LiveJournal at http://www.softcatala.org/~jmas


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


Re: [Mono-winforms-list] could someone please send me the latest

2005-05-21 Thread Jordi Mas
El ds 21 de 05 del 2005 a les 04:56 -0400, en/na Ricardo Stuven va
escriure:

> Peter Dennis Bartok <[EMAIL PROTECTED]> wrote:
> > Please also update System.Drawing.
> 
> Sorry, I forgot to mention that one. In fact, the error message is
> thrown from CheckStatus called by the new
> System.Drawing.Image:InitFromStream.

Kornél Pál has contributed very recently the support for loading images
from COM streams under Win32. You really have to have a very recent
version of System.Drawing for having this supported, in fact, he is
still making enhancements.

My suggestion is to download and install a daily build from yesterday or
so.

If you still have a problem, please post here a piece of code that can
be used to reproduce the problem or fill a bug in
http://bugzilla.ximian.com

Thanks,

Jordi,

-- 
Jordi Mas i Hernàndez - Mono development team - http://www.mono-project.com
Homepage and LiveJournal at http://www.softcatala.org/~jmas


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


Re: [Mono-winforms-list] No updates on http://mwf.mono-project.com/

2005-05-15 Thread Jordi Mas
El dg 15 de 05 del 2005 a les 18:12 +0600, en/na Dmitriy va escriure:

> Image.FromStream - is also absent (i hope 1.1.8 fixes this bug too).

Hi Dmitriy,

Image.FromStream was missing working on 1.1.7 on Linux but not in Win32.
Kornél Pál did contribute the necessary code to Mono's System.Drawing to
make it also work on 32 using Com streams. That's something that is
already in SVN and you will see in the next Mono release.

MWF is still an on-going effort.

Regards,

-- 
Jordi Mas i Hernàndez - Mono development team - http://www.mono-project.com
Homepage and LiveJournal at http://www.softcatala.org/~jmas


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


Re: [Mono-winforms-list] I cannot install libgdiplus-1.0.6

2005-05-02 Thread Jordi Mas
El dl 02 de 05 del 2005 a les 11:56 +, en/na Adnan ONCEVARLIK va
escriure:
> Hi,
> I am a beginner MONO programmer. I want to explain my problem.
> When I try to example (on documentation) helloworld.cs with system.drawing, 
> Mono generate error like "system.drawing connot find bla. bla." After, I 
> have searched about these problem I found a libgdi-1.0.6.tar.gz file to use 
> winforms and system.drawing units.
> 
> I have downloaded this file and I have tried to ./configure (It's ok, no 
> problem at this point) after configure when I try to make install I have 
> recieved too many errors and warning, (these errors and warnings as fallows)
> what is wrong? What can I do?
> 
> Thanx a lot,
> 
> Adnan ONCEVARLIK
> 
> ps : My english not so good. If anybody understand my problem please help me 
> :)
> ps2: is there any forum or platform to discuss problems and ideas (except 
> than this email list?)

Which version of Linux and gcc are you using? gcc4 is not supported for
libgdiplus 1.0.6

Jordi,

-- 
Jordi Mas i Hernàndez - Mono development team - http://www.mono-project.com
Homepage and LiveJournal at http://www.softcatala.org/~jmas


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


Re: [Mono-winforms-list] Loading a bitmap into PictureBox

2005-04-29 Thread Jordi Mas
El dj 28 de 04 del 2005 a les 20:22 +, en/na diana nichici va
escriure:
> Hello Jordi,
> Thank you for your answer.
> I logged the bug at bugzilla as you said, and  I understand that the problem 
> was meanwhile fixed in SVT. Can you please explain me how to 
> identify/download the corresponding Mono patch at 
> http://lists.ximian.com/archives/public/mono-patches/, and how to install it 
> into my actual Mono release ? Do I have to first download/install all Mono 
> patches released since the last 1.1.6 official version ? Are the patches 
> always available for both Windows and Linux platforms ?

Well, if to retrieve the source code from SVN and compiling it from
there it sounds too complicated you can also download a Mono daily build
that has been built after the patch date (at least one day after). You
have the daily builds at:

http://mono.ximian.com/daily/

They are not intend for this but they can be used if you cannot wait
until the next Mono release. Take into account that these are daily
builds and not official a release and they have not been passed the same
testing procedures.

Jordi,

-- 
Jordi Mas i Hernàndez - Mono development team - http://www.mono-project.com
Homepage and LiveJournal at http://www.softcatala.org/~jmas


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


Re: [Mono-winforms-list] Loading a bitmap into PictureBox

2005-04-25 Thread Jordi Mas
El dt 26 de 04 del 2005 a les 05:10 +, en/na diana nichici va
escriure:
> Hi,
> I am using Mono 1.1.6 on Windows XP and experienced the following
> problem. I have a form with some PictureBox controls. I tried to draw
> some rectangles and load some bitmaps into the PictureBox, but both
> didnt work, as nothing appears into the PictureBox. These features
> work when I use them directly with .NET, could be that they are not
> yet implemented in Mono ?
> Thanks in advance.
> Diana Nichici

Hello Diana,

Can you please log a bug in http://bugzilla.ximian.com including a copy
of the source code of the small example that you try to run? We will
look after the error.

Jordi,

-- 
Jordi Mas i Hernàndez - Mono development team - http://www.mono-project.com
Homepage and LiveJournal at http://www.softcatala.org/~jmas


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


Re: [Mono-winforms-list] Some basic questions on Winforms.

2005-04-13 Thread Jordi Mas
El dt 12 de 04 del 2005 a les 19:25 -0400, en/na Wei Weng va escriure:

> 
> 2: How do I bind a shortcut key to an action/function without using the
> setting the shortcut key in MainMenu/ContextMenu? (Can not set menu in my 
> current mono setup either. Always complains about set_Menu method, throwing 
> a NullReferenceException)

There was a problem that I have just fixed in SVN. You have to compile
mono yourself to get the fix or wait to the next release.

You can set the shortcut assigned to a MenuItem using the constructor of
the object (two accept the shortcut as parameter) or the Shortcut
property. Both should work.

Jordi,
-- 
Jordi Mas i Hernàndez - Mono development team - http://www.mono-project.com
Homepage and LiveJournal at http://www.softcatala.org/~jmas


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


Re: [Mono-winforms-list] Some basic questions on Winforms.

2005-04-13 Thread Jordi Mas

> 2: How do I bind a shortcut key to an action/function without using the
> setting the shortcut key in MainMenu/ContextMenu? (Can not set menu in my 
> current mono setup either. Always complains about set_Menu method, throwing 
> a NullReferenceException)

Hello Wei,

Can you provide a small sample that reproduces this problem?

Thanks!

-- 
Jordi Mas i Hernàndez - Mono development team - http://www.mono-project.com
Homepage and LiveJournal at http://www.softcatala.org/~jmas


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


Re: [Mono-winforms-list] simple animation

2005-04-11 Thread Jordi Mas
El dg 10 de 04 del 2005 a les 14:29 -0700, en/na Jon Heiner va escriure:
> Excellent. That did it. Thanks for the assistance.
> 
> Now to remove the bugs and get rid of the flickering.
> 
> I noticed that the timer object "should" be triggering at 60 FPS, but  
> it's not even close. Is there some considerable overhead to using  
> timers? Down the line, I'm planning on running the updates in a  

There was a problem with the timer object. If you were setting the
interval after enabling it was using always the default. This particular
sample was hitting this problem, quite noticeable if you run the sample
with MS Net runtime and Mono. I had just fixed the problem in SVN.

Regards,

Jordi,

-- 
Jordi Mas i Hernàndez - Mono development team - http://www.mono-project.com
Homepage and LiveJournal at http://www.softcatala.org/~jmas


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


Re: [Mono-winforms-list] GDI Problem

2005-04-01 Thread Jordi Mas
El dj 31 de 03 del 2005 a les 20:02 +1000, en/na Benjamin Dittes va
escriure:
> Hi,
>  
> I've been trying to get mono-1.1.5 running for two days now, still got
> the following problem:
>  
> - Building libgdiplus-1.1.5 goes without problems, but testgdi says:
> got st: -1073744776 expected Ok
> ** (process:13730): CRITICAL **: GdipDrawImageRect: assertion `image-
> >type == imageBitmap' failed
> got st: 1079018640 expected Okfree(): invalid pointer 0x40508490!
> jpg drawn 
> got st: -1073744776 expected OkSegmentation fault
> 
> - Building mono-1.1.5 runs smoothly too, but running a WinForms app
> says, that System.Drawing.GDIPlus.dll is missing.
>  
> Any ideas?

There is a possible bug. Please, fill a bug report into
http://bugzilla.ximian.com and assign the bug to me. I'll look into that
next week.

Thanks!

-- 
Jordi Mas i Hernàndez - Mono development team - http://www.mono-project.com
Homepage and LiveJournal at http://www.softcatala.org/~jmas


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


Re: [Mono-winforms-list] Newbie Windows Question

2005-03-24 Thread Jordi Mas
El dj 24 de 03 del 2005 a les 16:20 +0100, en/na Luc Andre va escriure:
> Hi,
> 
> I'm new to mono and I'm investigating mono to see if it can help writing
> true cross platform applications for Windows/MacOSX/Linux.
> 
> I tried to compile a sample GUI C# Application with mcs under Windows and I
> got the error:
> 
> $ mcs DoughnutMachine.cs
> DoughnutMachine.cs(44) error CS0234: The type or namespace name `Windows'
> could not be found in name space `System'
> 
> The line involved is:
>   private System.Windows.Forms.Timer timer1;
> 
> 
> It seems that mcs does not handle System.Windows.Forms but it was supposed
> to (I installed version 1.1.4).
> 
> Does anybody knows what I'm doing wrong ?
> 
Try:

mcs DoughnutMachine.cs -r:System.Windows.Forms -r:System.Drawing

I added also the System.Drawing reference just in case the app uses also
classes from that namespace.

Jordi,

-- 
Jordi Mas i Hernàndez - Mono development team - http://www.mono-project.com
Homepage and LiveJournal at http://www.softcatala.org/~jmas


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


Re: [Mono-winforms-list] Mono 1.1.5 on SuSE 9.2

2005-03-24 Thread Jordi Mas
El dj 24 de 03 del 2005 a les 15:42 +0100, en/na Arnhoffer Károly va
escriure:
> I installed SuSE 9.2 (not full) with Mono (1.1.4 first 1.1.5 after). I had 
> got several easy problems and then two hard remained.

Can you post in a place publically accessible in Internet the source
code of this sample that is giving you trouble?

Jordi,

-- 
Jordi Mas i Hernàndez - Mono development team - http://www.mono-project.com
Homepage and LiveJournal at http://www.softcatala.org/~jmas


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


Re: [Mono-winforms-list] Matrix memory management in GDI+ bug

2005-03-16 Thread Jordi Mas
El ds 12 de 03 del 2005 a les 13:15 -0500, en/na Jonathan Gilbert va
escriure:

> If Microsoft's implementation allows the Matrix to be used after it has
> been Dispose()d, this would tend to indicate that they are actually storing
> the matrix in managed memory, and that while a System.Drawing.Graphics has
> an unmanaged matrix involved with the GDI+ operations, a
> System.Drawing.Drawing2D.Matrix simply duplicates the matrix data in
> managed memory. Changing mono to behave this way would be a lot more
> logical than changing Dispose() to not perform its task.
> 
> This is probably something I could do myself :-) Jordi?
> 

Microsoft implementation does NOT allow to use a disposed Matrix. What
happens is that before disposing it was assigned to Graphics.Transform
and we had a bug there at libgdiplus level that was causing the matrix
to be point it to instead of copied. Also, I fixed a few issues with
some dispose methods.

This should be correct in HEAD now.

Jordi,

-- 
Jordi Mas i Hernàndez - Mono development team - http://www.mono-project.com
Homepage and LiveJournal at http://www.softcatala.org/~jmas


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


Re: [Mono-winforms-list] Matrix memory management in GDI+ bug

2005-03-14 Thread Jordi Mas

> Also I don't think the user expect the framework to duplicate the
> matrix in both the managed and unmanaged worlds.

Laurent,

Can you please send to the list a small sample (test case) that allow to
reproduce the problem? 

Jordi,
-- 
Jordi Mas i Hernàndez - Mono development team - http://www.mono-project.com
Homepage and LiveJournal at http://www.softcatala.org/~jmas


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


Re: [Mono-winforms-list] Matrix memory management in GDI+ bug

2005-03-12 Thread Jordi Mas
El ds 12 de 03 del 2005 a les 11:18 +0100, en/na Laurent Debacker va
escriure:
> Hi,
> 
> There's is a bug in the way mono manage the unmanaged matrix in libgdiplus.
> 
> What I wanted to do is to save the transform matrix used in a Graphics
> object, save it in a global variable to reuse it later in other
> Graphics objects. It's just for optimization purpose.
> 
> However Mono's System.Drawing.Drawing2D.Matrix doesn't behave like
> Microsoft's one.
> 
> With Microsoft I can take the transform matrix from a matrix, even
> Dispose() it, then give it to another Graphics object, and it still
> works. I know it's tricky to Dispose() there, but I wanted to do
> futher research.
> 
> In Mono, Matrix.Dipose() (see source code
> http://svn.myrealbox.com/viewcvs/trunk/mcs/class/System.Drawing/System.Drawing.Drawing2D/Matrix.cs?rev=31166&view=auto
>  just always call GdipDeleteMatrix in libgdiplus
> (http://svn.myrealbox.com/viewcvs/trunk/libgdiplus/src/matrix.c?rev=39075&view=auto),
> which in turn calls cairo_matrix_destroy
> (http://svn.myrealbox.com/viewcvs/trunk/libgdiplus/cairo/src/cairo_matrix.c?rev=39488&view=auto),
> which simply do a free().
> 
> So your implementation is logic, but isn't compatible with Microsoft's one.
> 
> I would recommand you to call GdipDeleteMatrix in the destructor of
> System.Drawing.Drawing2D.Matrix, and leave Dipose() empty. That way as
> long as the managed Matrix lives, the unmanaged one will also.
> 
> The error message I got with my code was "mono in free(): error: chunk
> is already free" under FreeBSD 5.3-RELEASE, and libgdiplus-devel,
> mono-devel (1.1.4) from the BSD# project
> (http://forge.novell.com/modules/xfmod/project/?bsd-sharp).

Laurent,

If you call Dispose the resource should be freed, as users will expect.
Also, Microsoft does works this way.

Attached you have a patch that fixes our Dispose method. Please, if this
still do not work for you, send me the sample and I'll look into it.

Thanks for your feedback Laurent,

Jordi,

-- 
Jordi Mas i Hernàndez - Mono development team - http://www.mono-project.com
Homepage and LiveJournal at http://www.softcatala.org/~jmas

Index: Matrix.cs
===
--- Matrix.cs	(revision 41526)
+++ Matrix.cs	(working copy)
@@ -131,8 +131,13 @@
 
 public void Dispose ()
 {
-			Status status = GDIPlus.GdipDeleteMatrix (nativeMatrix);
-			GDIPlus.CheckStatus (status);
+			if (nativeMatrix != IntPtr.Zero) {
+Status status = GDIPlus.GdipDeleteMatrix (nativeMatrix);
+GDIPlus.CheckStatus (status);
+nativeMatrix = IntPtr.Zero;
+			}
+
+			GC.SuppressFinalize (true);
 }   
 
 public override bool Equals (object obj)


Re: [Mono-winforms-list] libgdiplus/System.Drawing patch: native support for indexed Bitmaps

2005-03-07 Thread Jordi Mas
El dl 07 de 03 del 2005 a les 14:22 -0500, en/na kangaroo va escriure:
> Do we have new testcases for these patches?
> 
> jordi,
>   If you could hold off on the commit for a day or two while I have time 
> to test the new functions on PPC for endianess it would be appreciated.

There are some test cases Test/System.Drawing.Imaging in. But, there are
no cases for the new code. If Jonathan can provide then it will be cool,
if not, I'll write them. 

Regards,

Jordi,
-- 
Jordi Mas i Hernàndez - Mono development team - http://www.mono-project.com
Homepage and LiveJournal at http://www.softcatala.org/~jmas


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


Re: [Mono-winforms-list] Solaris 10 - libgdiplus troubles...

2005-03-07 Thread Jordi Mas
El dl 07 de 03 del 2005 a les 20:40 +0100, en/na Laurent Debacker va
escriure:
> Okay, it worked, libgdiplus compiled just fine!
> 
> Shall I fill a bug report, and give the solution provided by Timotheus 
> Pokorra?
> Or does the maintainer of libgdiplus read this list?
> 
> Now my adventure will continue with the compilation of mono
> 
> And thank you very much Timotheus!!! :D

Hi Laurent,

Long time, no talk. I did fix some issues time ago to make libgdiplus
standard ANSI complaint.

Can you please send me or to this list the changes that you have made
into libgdiplus in order to make it compile on Solaris 10? We are very
interested in looking into them and fixing it in SVN.

Thanks!

Jordi,

-- 
Jordi Mas i Hernàndez - Mono development team - http://www.mono-project.com
Homepage and LiveJournal at http://www.softcatala.org/~jmas


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


Re: [Mono-winforms-list] libgdiplus/System.Drawing patch: native support for indexed Bitmaps

2005-03-07 Thread Jordi Mas
El dl 07 de 03 del 2005 a les 00:41 -0500, en/na Miguel de Icaza va
escriure:

> Jordi, Peter, do you have any objections on getting this into the tree?
> 
> In any case, the code looks very solid, I would like to offer you an SVN
> account as well.

Good work Johnathan!

One small thing. At bitmap.c, line number 425, the following function
call:

+   if (!gdip_is_an_indexed_pixelformat) {

does not have the parameter need for the call, that looks like it has to
be (srcData->PixelFormat)

It looks fine to me also. A part of that I ran some regression testings
and it passes them. 

I can commit it if no one objects.

Jordi,

-- 
Jordi Mas i Hernàndez - Mono development team - http://www.mono-project.com
Homepage and LiveJournal at http://www.softcatala.org/~jmas


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