Menu

#18 EditableControl throws an exception on MouseDown

open
nobody
None
5
2008-05-16
2008-05-16
Anonymous
No

(Related to EditableControl.cs)

If EditableControl is in the middle of editing, and a MouseDown event is triggered - on some occasions _editNode=null (in EditableControl.HideEditor) executes just before EditableControl.ApplyChanges.

Exception then happens in BindableControl.GetMemberAdapter, first line (if (node.DataNode==null)... <-- node is null here)

IMHO this could fix it:
In EditableControl.cs, public virtual void ApplyChanges()

this line:

DoApplyChanges(_editNode, _editor);

should be changed to:

if (_editNode != null) DoApplyChanges(_editNode, _editor);

just to check if _editNode is non-null before continuing.

Thanks!

VekiPeki

Discussion


Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.