Beispiel #1
0
        public void tableView_setObjectValue_forTableColumn_row(NSTableView table, NSObject value, NSTableColumn col, int row)
        {
            Contract.Requires(row >= 0, "row is negative");
            Contract.Requires(row < m_globs.Count, "row is too big");

            switch (col.identifier().description())
            {
                case "1":
                    m_globs[row] = Tuple.Create(value.description(), m_globs[row].Item2);
                    break;

                case "2":
                    m_globs[row] = Tuple.Create(m_globs[row].Item1, value.Call("intValue").To<int>());
                    break;

                default:
                    Contract.Assert(false, "bad col: " + col.identifier());
                    break;
            }

            DoSyncPref();
        }
 public void outlineView_setObjectValue_forTableColumn_byItem(NSTableView table, NSObject value, NSTableColumn col, TableItem item)
 {
     string newName = value.description();
     DoRename(item, newName);
 }
 // Developers aren't always nice enough to name threads so we'll let people
 // do it in the debugger.
 public void tableView_setObjectValue_forTableColumn_row(NSTableView table, NSObject value, NSTableColumn col, int row)
 {
     ThreadMirror thread = m_threads[row];
     m_names[thread.Id] = value.description();
 }
        public void outlineView_setObjectValue_forTableColumn_byItem(NSTableView table, NSObject value, NSTableColumn col, VariableItem item)
        {
            try
            {
                string text = value.description();
                Value newValue = ParseValue.Invoke(m_frame.Thread, item, item.Value, text);

                SetValue.Invoke(m_frame.Thread, item, item.Parent.Value, item.Key, newValue);
                item.RefreshValue(m_frame.Thread, newValue);			// if we're setting a (non-auto) property we might also want to refresh all fields for that type
            }
            catch (Exception e)
            {
                Boss boss = ObjectModel.Create("Application");
                var transcript = boss.Get<ITranscript>();
            //				transcript.Show();
            //				transcript.WriteLine(Output.Error, "{0}", e);
                transcript.WriteLine(Output.Error, "{0}", e.Message);
                if (e.InnerException != null)
                    transcript.WriteLine(Output.Error, "   {0}", e.InnerException.Message);
            }
        }