dotgnu-pnet
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Pnet-developers] [bugs #10392] Control.ContainsFocus causes an stack ov


From: Rhys Weatherley
Subject: [Pnet-developers] [bugs #10392] Control.ContainsFocus causes an stack overflow
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.1) Gecko/20020826

This mail is an automated notification from the bugs tracker
 of the project: DotGNU Portable.NET.

/**************************************************************************/
[bugs #10392] Latest Modifications:

Changes by: 
                Rhys Weatherley <address@hidden>
'Date: 
                Wed 09/15/2004 at 23:02 (GMT)

            What     | Removed                   | Added
---------------------------------------------------------------------------
          Resolution | None                      | Fixed
              Status | Open                      | Closed


------------------ Additional Follow-up Comments ----------------------------
Fix committed to CVS - 16 Sep 2004






/**************************************************************************/
[bugs #10392] Full Item Snapshot:

URL: <http://savannah.gnu.org/bugs/?func=detailitem&item_id=10392>
Project: DotGNU Portable.NET
Submitted by: 0
On: Wed 09/15/2004 at 07:47

Category:  None
Severity:  5 - Average
Item Group:  None
Resolution:  Fixed
Privacy:  Public
Assigned to:  None
Status:  Closed


Summary:  Control.ContainsFocus causes an stack overflow

Original Submission:  If U derive a class from control and overwrite the get 
property Focused and then call ContainsFocus within this U'll get an 
StackOverflow.
Try this:
public class MyControl : public Control
{
 public override bool Focused
 {
  get
  {
   return this.ContainsFocus;
  }
 }
}

if U call MyControl.Focused -> Stack Overflow.

I did a quickhack in Control.cs:

public bool ContainsFocus
{
get
{
 // Heiko Weiss, do not call Focused, maybe some derived classes overwrite 
Focused 
 if(toolkitWindow != null && toolkitWindow.Focused) return true;

 /* Do not do the following lines
 if (Focused)
 {
  return true;
 }
 */
 for (int i = 0; i < numChildren; i++)
 {
  if (children[i].ContainsFocus)
  {
   return true;
  }
 }
 return false;
 }
}


Follow-up Comments
------------------


-------------------------------------------------------
Date: Wed 09/15/2004 at 23:02       By: Rhys Weatherley <rweather>
Fix committed to CVS - 16 Sep 2004












For detailed info, follow this link:
<http://savannah.gnu.org/bugs/?func=detailitem&item_id=10392>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/





reply via email to

[Prev in Thread] Current Thread [Next in Thread]