[Top][All Lists]

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

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

From: anonymous
Subject: [Pnet-developers] [bugs #10392] Control.ContainsFocus causes an stack overflow
User-agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322)

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

[bugs #10392] Full Item Snapshot:

URL: <>
Project: DotGNU Portable.NET
Submitted by: 0
On: Mit 15.09.2004 at 03:47

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

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 
Try this:
public class MyControl : public Control
 public override bool Focused
   return this.ContainsFocus;

if U call MyControl.Focused -> Stack Overflow.

I did a quickhack in Control.cs:

public bool ContainsFocus
 // Heiko Weiss, do not call Focused, maybe some derived classes overwrite 
 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;

For detailed info, follow this link:

  Message sent via/by Savannah

reply via email to

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