Example #1
0
        public override void DidEndEditing(NSNotification notification)
        {
            base.DidEndEditing(notification);

            if (!editing)
            {
                return;
            }

            editing = false;

            cellView.TreeView.OnEndEditing();

            if (cellView is MacDebuggerObjectNameView)
            {
                if (cellView.Node is AddNewExpressionObjectValueNode)
                {
                    if (newValue.Length > 0)
                    {
                        cellView.TreeView.OnExpressionAdded(newValue);
                    }
                }
                else if (newValue != oldValue)
                {
                    cellView.TreeView.OnExpressionEdited(cellView.Node, newValue);
                }
            }
            else if (cellView is MacDebuggerObjectValueView)
            {
                if (newValue != oldValue && cellView.TreeView.GetEditValue(cellView.Node, newValue))
                {
                    var metadata = new Dictionary <string, object> ();
                    metadata["UIElementName"]    = cellView.TreeView.UIElementName;
                    metadata["ObjectValue.Type"] = cellView.Node.TypeName;

                    Counters.EditedValue.Inc(1, null, metadata);
                    cellView.Refresh();
                }
            }

            oldValue = newValue = null;
        }
Example #2
0
        public override void DidEndEditing(NSNotification notification)
        {
            base.DidEndEditing(notification);

            if (!editing)
            {
                return;
            }

            editing = false;

            cellView.TreeView.OnEndEditing();

            if (cellView is MacDebuggerObjectNameView)
            {
                if (cellView.Node is AddNewExpressionObjectValueNode)
                {
                    if (newValue.Length > 0)
                    {
                        cellView.TreeView.OnExpressionAdded(newValue);
                    }
                }
                else if (newValue != oldValue)
                {
                    cellView.TreeView.OnExpressionEdited(cellView.Node, newValue);
                }
            }
            else if (cellView is MacDebuggerObjectValueView)
            {
                if (newValue != oldValue && cellView.TreeView.GetEditValue(cellView.Node, newValue))
                {
                    cellView.Refresh();
                }
            }

            oldValue = newValue = null;
        }