Re: [PATCH] For MouseClick Event in SWF

View: New views
3 Messages — Rating Filter:   Alert me  

Parent Message unknown Re: [PATCH] For MouseClick Event in SWF

by Carlos Alberto :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hey,


I will review the patch later, but there's no need to send the patch to the mono develop list, since the change is related to windows.forms. Also, the mono-patches list is used to receive/catch the changes in svn. Next time send the patch to the winforms list, please.

Carlos.

2009/10/27 Petit Eric <surfzoid@...>
Hi
Mouse Click Event was missing in SWF implementation, here it is a patch to fix that
it is released under MIT/X11 or what ever you want.
Carlos, if you apply the patch, could you think about my "coding for fun" and add my nickname in the log ?
--
Cordially.

Small Eric Quotations of the days:
---------------------------------------------------------------------------
I have no special talents. I am only passionately curious




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

Parent Message unknown Re: [PATCH] For MouseClick Event in SWF

by Petit Eric :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Finally, here it an all in one patch, review from your comments, for the MouseClick Event and the standard context menu for the MaskedTextBox.

2009/10/28 Petit Eric <surfzoid@...>
oki , weired, but i will try to do it;
Effort are duplicate, your comment are really nice and right, i need to took them for next patch, but most of them are to delete some extra data in the patch, after you will review a second time etc :-)

2009/10/28 Carlos Alberto Cortez <calberto.cortez@...>

No dude, you need to do it directly you. That's the usual process all the contributors do: they send a patch, then the maintainer suggests some changes, then the contributor applies those changes.


Carlos.

2009/10/27 Petit Eric <surfzoid@...>
Hum, could you directly modify it ! ?



2009/10/27 Carlos Alberto Cortez <calberto.cortez@...>
Comments below:

-               protected override void OnMouseUp (MouseEventArgs mevent)
-               {
-                       base.OnMouseUp (mevent);
-               }
+        protected override void OnMouseUp(MouseEventArgs mevent)
+        {
+            base.OnMouseUp(mevent);
+        }

+        protected override void OnMouseClick(MouseEventArgs mevent)
+        {
+            base.OnMouseClick(mevent);
+        }
+

Be careful to *not* send changes including style modifications.

+        protected override void OnMouseClick(MouseEventArgs mevent)
+        {
+            if ((mevent.Button & MouseButtons.Left) != 0)
+            {
+                is_pressed = true;
+                Invalidate();
+            }
+
+            base.OnMouseClick(mevent);
+        }
+

In .Net ButtonBase is not overriding this method, so we can't do that. Moreover, we don't need to do this.

-                                       if (!ValidationFailed)
-                                               OnClick (EventArgs.Empty);
+                    if (!ValidationFailed)
+                    {
+                        OnClick(EventArgs.Empty);
+                        OnMouseClick(mevent);
+                    }

This is fine, and this is the only bit we need to fix the issue. Just follow the coding guidelines: http://www.mono-project.com/Guidelines

Re-send me the patch when it's done ;-)

Carlos.


2009/10/27 Carlos Alberto Cortez <calberto.cortez@...>
Hey,



I will review the patch later, but there's no need to send the patch to the mono develop list, since the change is related to windows.forms. Also, the mono-patches list is used to receive/catch the changes in svn. Next time send the patch to the winforms list, please.

Carlos.

2009/10/27 Petit Eric <surfzoid@...>

Hi
Mouse Click Event was missing in SWF implementation, here it is a patch to fix that
it is released under MIT/X11 or what ever you want.
Carlos, if you apply the patch, could you think about my "coding for fun" and add my nickname in the log ?
--
Cordially.

Small Eric Quotations of the days:
---------------------------------------------------------------------------
I have no special talents. I am only passionately curious





--
Cordially.

Small Eric Quotations of the days:
---------------------------------------------------------------------------
I have no special talents. I am only passionately curious




--
Cordially.

Small Eric Quotations of the days:
---------------------------------------------------------------------------
I have no special talents. I am only passionately curious



--
Cordially.

Small Eric Quotations of the days:
---------------------------------------------------------------------------
I have no special talents. I am only passionately curious
Sent from Paris, France



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

MouseClickEvAndCtxMenu4MaskedTxtBox.patch (5K) Download Attachment

Parent Message unknown Re: [PATCH] For MouseClick Event in SWF

by Petit Eric :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Here they are.
That's folks !

2009/10/28 Carlos Alberto Cortez <calberto.cortez@...>
Patches must be separated logic-wise. In this case, you should send me:

a) a patch for the mouse click thing
b) a patch for the masked textbox thing (yet to be reviewed)

Again: this is the way all the contributors follow: from the one sending a one line fix, to the ones implementing new runtime features.


2009/10/28 Petit Eric <surfzoid@...>
Finally, here it an all in one patch, review from your comments, for the MouseClick Event and the standard context menu for the MaskedTextBox.

2009/10/28 Petit Eric <surfzoid@...>

oki , weired, but i will try to do it;
Effort are duplicate, your comment are really nice and right, i need to took them for next patch, but most of them are to delete some extra data in the patch, after you will review a second time etc :-)

2009/10/28 Carlos Alberto Cortez <calberto.cortez@...>

No dude, you need to do it directly you. That's the usual process all the contributors do: they send a patch, then the maintainer suggests some changes, then the contributor applies those changes.


Carlos.

2009/10/27 Petit Eric <surfzoid@...>
Hum, could you directly modify it ! ?



2009/10/27 Carlos Alberto Cortez <calberto.cortez@...>
Comments below:

-               protected override void OnMouseUp (MouseEventArgs mevent)
-               {
-                       base.OnMouseUp (mevent);
-               }
+        protected override void OnMouseUp(MouseEventArgs mevent)
+        {
+            base.OnMouseUp(mevent);
+        }

+        protected override void OnMouseClick(MouseEventArgs mevent)
+        {
+            base.OnMouseClick(mevent);
+        }
+

Be careful to *not* send changes including style modifications.

+        protected override void OnMouseClick(MouseEventArgs mevent)
+        {
+            if ((mevent.Button & MouseButtons.Left) != 0)
+            {
+                is_pressed = true;
+                Invalidate();
+            }
+
+            base.OnMouseClick(mevent);
+        }
+

In .Net ButtonBase is not overriding this method, so we can't do that. Moreover, we don't need to do this.

-                                       if (!ValidationFailed)
-                                               OnClick (EventArgs.Empty);
+                    if (!ValidationFailed)
+                    {
+                        OnClick(EventArgs.Empty);
+                        OnMouseClick(mevent);
+                    }

This is fine, and this is the only bit we need to fix the issue. Just follow the coding guidelines: http://www.mono-project.com/Guidelines

Re-send me the patch when it's done ;-)

Carlos.


2009/10/27 Carlos Alberto Cortez <calberto.cortez@...>
Hey,



I will review the patch later, but there's no need to send the patch to the mono develop list, since the change is related to windows.forms. Also, the mono-patches list is used to receive/catch the changes in svn. Next time send the patch to the winforms list, please.

Carlos.

2009/10/27 Petit Eric <surfzoid@...>

Hi
Mouse Click Event was missing in SWF implementation, here it is a patch to fix that
it is released under MIT/X11 or what ever you want.
Carlos, if you apply the patch, could you think about my "coding for fun" and add my nickname in the log ?
--
Cordially.

Small Eric Quotations of the days:
---------------------------------------------------------------------------
I have no special talents. I am only passionately curious





--
Cordially.

Small Eric Quotations of the days:
---------------------------------------------------------------------------
I have no special talents. I am only passionately curious




--
Cordially.

Small Eric Quotations of the days:
---------------------------------------------------------------------------
I have no special talents. I am only passionately curious



--
Cordially.

Small Eric Quotations of the days:
---------------------------------------------------------------------------
I have no special talents. I am only passionately curious
Sent from Paris, France




--
Cordially.

Small Eric Quotations of the days:
---------------------------------------------------------------------------
I have no special talents. I am only passionately curious





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

masked textbox thing.patch (4K) Download Attachment
mouse click thing.patch (1K) Download Attachment