Browse Source

String setting not supported

git-svn-id: svn://svn.sharpdevelop.net/sharpdevelop/trunk@2871 1ccf3a8d-04fe-1044-b7c0-cef0b8235c61
shortcuts
David Srbecký 18 years ago
parent
commit
9a45e1f6c7
  1. 2
      src/AddIns/Misc/Debugger/Debugger.AddIn/Project/Src/TreeModel/ValueNode.cs
  2. 17
      src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Values/Value.Primitive.cs

2
src/AddIns/Misc/Debugger/Debugger.AddIn/Project/Src/TreeModel/ValueNode.cs

@ -32,7 +32,7 @@ namespace Debugger.AddIn.TreeModel @@ -32,7 +32,7 @@ namespace Debugger.AddIn.TreeModel
this.expression = val.Expression;
canSetText = false;
if (val.IsPrimitive) {
if (val.IsInteger) {
canSetText =
(val.Expression is LocalVariableIdentifierExpression) ||
(val.Expression is ParameterIdentifierExpression) ||

17
src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Values/Value.Primitive.cs

@ -56,17 +56,16 @@ namespace Debugger @@ -56,17 +56,16 @@ namespace Debugger
}
}
set {
object newValue;
TypeConverter converter = TypeDescriptor.GetConverter(this.Type.ManagedType);
try {
newValue = converter.ConvertFrom(value);
} catch {
throw new NotSupportedException("Can not convert " + value.GetType().ToString() + " to " + this.Type.ManagedType.ToString());
}
if (CorType == CorElementType.STRING) {
throw new NotSupportedException();
throw new NotImplementedException();
} else {
object newValue;
TypeConverter converter = TypeDescriptor.GetConverter(this.Type.ManagedType);
try {
newValue = converter.ConvertFrom(value);
} catch {
throw new NotSupportedException("Can not convert " + value.GetType().ToString() + " to " + this.Type.ManagedType.ToString());
}
CorGenericValue.Value = newValue;
}
}

Loading…
Cancel
Save