MVVMCross ValueConverter Bool To MvxColor/Color - c#

i was trying to implement the ValueConverter for MVVMCross, but aparently it is not working as i would expect. So at the moment i just got another Property which does the conversion (MvxColor to TextColor) for me and bind it to my Layout.
But ofc i would rather use the value converters, so maybe you have an idea what iam doing wrong:
The binding error iam currently getting:
06-09 16:29:29.820 I/MvxBind (16312): 61,64 Problem seen during binding execution for binding TextColor for Changed - problem InvalidCastException: Specified cast is not valid.
06-09 16:29:29.820 I/MvxBind (16312): at MvvmCross.Plugins.Color.Droid.BindingTargets.MvxTextViewTextColorBinding.SetValueImpl (System.Object target, System.Object value) [0x0000a] in <filename unknown>:0
06-09 16:29:29.820 I/MvxBind (16312): at MvvmCross.Binding.Bindings.Target.MvxConvertingTargetBinding.SetValue (System.Object value) [0x00088] in <filename unknown>:0
06-09 16:29:29.820 I/MvxBind (16312): at MvvmCross.Binding.Bindings.MvxFullBinding.UpdateTargetFromSource (System.Object value) [0x00024] in <filename unknown>:0
MvxBind:Error: 61,64 Problem seen during binding execution for binding TextColor for Changed - problem InvalidCastException: Specified cast is not valid.
06-09 16:29:29.820 I/mono-stdout(16312): MvxBind:Error: 61,64 Problem seen during binding execution for binding TextColor for Changed - problem InvalidCastException: Specified cast is not valid.
06-09 16:29:29.820 I/mono-stdout(16312): at MvvmCross.Plugins.Color.Droid.BindingTargets.MvxTextViewTextColorBinding.SetValueImpl (System.Object target, System.Object value) [0x0000a] in <filename unknown>:0
at MvvmCross.Plugins.Color.Droid.BindingTargets.MvxTextViewTextColorBinding.SetValueImpl (System.Object target, System.Object value) [0x0000a] in <filename unknown>:0
at MvvmCross.Binding.Bindings.Target.MvxConvertingTargetBinding.SetValue (System.Object value) [0x00088] in <filename unknown>:0
06-09 16:29:29.830 I/mono-stdout(16312): at MvvmCross.Binding.Bindings.Target.MvxConvertingTargetBinding.SetValue (System.Object value) [0x00088] in <filename unknown>:0
at MvvmCross.Binding.Bindings.MvxFullBinding.UpdateTargetFromSource (System.Object value) [0x00024] in <filename unknown>:0
06-09 16:29:29.830 I/mono-stdout(16312): at MvvmCross.Binding.Bindings.MvxFullBinding.UpdateTargetFromSource (System.Object value) [0x00024] in <filename unknown>:0
[0:] MvxBind:Error: 61,64 Problem seen during binding execution for binding TextColor for Changed - problem InvalidCastException: Specified cast is not valid.
at MvvmCross.Plugins.Color.Droid.BindingTargets.MvxTextViewTextColorBinding.SetValueImpl (System.Object target, System.Object value) [0x0000a] in <filename unknown>:0
at MvvmCross.Binding.Bindings.Target.MvxConvertingTargetBinding.SetValue (System.Object value) [0x00088] in <filename unknown>:0
at MvvmCross.Binding.Bindings.MvxFullBinding.UpdateTargetFromSource (System.Object value) [0x00024] in <filename unknown>:0
My Layout-Snippet:
<EditText
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:singleLine="true"
android:inputType="numberDecimal|numberSigned"
android:textColor="#color/schaefflerlightgreen"
local:MvxBind="TextColor Changed,Converter=MvxBoolToColorValueConverter" />
The two converter classes i tried out:
public class MvxBoolToMvxColorValueConverter: MvxColorValueConverter<bool>
{
protected override MvxColor Convert(bool value, object parameter, CultureInfo culture)
{
if (value)
{
// FF0000
return new MvxColor(255, 0, 0);
}
//227D41
return new MvxColor(34, 125, 65);
}
}
public class MvxBoolToColorValueConverter : MvxValueConverter<bool, Color>
{
protected override Color Convert(bool value, Type targetType, object parameter, CultureInfo culture)
{
if (value)
{
// FF0000
return new Color(255, 0, 0);
}
//227D41
return new Color(34, 125, 65);
}
}
The thing is the binding is generally working with a MvxColor-Property, just the conversion seems to be an issue. So probably i just missed something.
So thanks for your help.
Edith: And the property...
public bool Changed { get { return m_sValue != m_sSyncValue; } }

Strip off the Mvx-prefix and the ValueConverter-suffix from the converter name in your binding:
Change
local:MvxBind="TextColor Changed,Converter=MvxBoolToColorValueConverter" />
to
local:MvxBind="TextColor Changed,Converter=BoolToColor" />
This behaviour is described in the documentation for ValueConverters:
This sweep locates all instanciable classes which implement IMvxValueConverter
within your assemblies creates an instance of each one registers the
instance with the name stripped of any Mvx prefix and any
ValueConverter or Converter postfix. So, for example, the following
class names will all be registered with the same ValueConverter name
of "Foo":
Foo, FooValueConverter, FooConverter, MvxFooValueConverter,
MvxFooConverter

Related

System.Reflection.TargetInvocationException thrown when trying to instantiate new ViewController

I have a storyboard. Because I load a view in code (depending on conditions) I haven't used the segue anymore. Now I want to load another view but I'm getting the following error:
System.Reflection.TargetInvocationException was thrown
Exception has been thrown by the target of an invocation.
ListButton.TouchUpInside += (object sender, EventArgs e) => {
MyListController myListController = this.Storyboard.InstantiateViewController ("MyListController") as MyListController;
myListController.EdgesForExtendedLayout = UIRectEdge.None;
if (myListController != null) {
this.NavigationController.PushViewController (myListController, true);
}
};
When the button (ListButton) is pressed the view should be loaded onto the navigation stack. The error occurs with InstantiateViewController.
How can I solve that?
Edit:
I went into MyListController and if I comment the following out the view gets loaded:
public MyListController (IntPtr handle) : base (handle)
{
TableView.RegisterClassForCellReuse (typeof(UITableViewCell), listCellId);
TableView.Source = new MyListDataSource (this);
MyList = new List<string> ();
}
Log:
System.Reflection.TargetInvocationException: Exception has been thrown
by the target of an invocation. ---> System.Exception: Object
reference not set to an instance of an object at
TestApp.MyListController.ViewDidLoad () [0x0004c] in
/Users/xxx/Projects/TestApp/TestApp/TestApp/MyListController.cs:78
at at (wrapper managed-to-native)
MonoTouch.ObjCRuntime.Messaging:IntPtr_objc_msgSendSuper
(intptr,intptr) at
MonoTouch.UIKit.UITableViewController.get_TableView () [0x00000] in
:0 at TestApp.MyListController..ctor (IntPtr
handle) [0x00009] in
/Users/xxx/Projects/TestApp/TestApp/TestApp/MyListController.cs:17
at at (wrapper managed-to-native)
System.Reflection.MonoCMethod:InternalInvoke
(System.Reflection.MonoCMethod,object,object[],System.Exception&) at
System.Reflection.MonoCMethod.InternalInvoke (System.Object obj,
System.Object[] parameters) [0x00002] in
/Developer/MonoTouch/Source/mono/mcs/class/corlib/System.Reflection/MonoMethod.cs:537
--- End of inner exception stack trace --- at System.Reflection.MonoCMethod.InternalInvoke (System.Object obj,
System.Object[] parameters) [0x00016] in
/Developer/MonoTouch/Source/mono/mcs/class/corlib/System.Reflection/MonoMethod.cs:543
at System.Reflection.MonoCMethod.DoInvoke (System.Object obj,
BindingFlags invokeAttr, System.Reflection.Binder binder,
System.Object[] parameters, System.Globalization.CultureInfo culture)
[0x00095] in
/Developer/MonoTouch/Source/mono/mcs/class/corlib/System.Reflection/MonoMethod.cs:528
at System.Reflection.MonoCMethod.Invoke (BindingFlags invokeAttr,
System.Reflection.Binder binder, System.Object[] parameters,
System.Globalization.CultureInfo culture) [0x00000] in
/Developer/MonoTouch/Source/mono/mcs/class/corlib/System.Reflection/MonoMethod.cs:556
at System.Reflection.ConstructorInfo.Invoke (System.Object[]
parameters) [0x00000] in
/Developer/MonoTouch/Source/mono/mcs/class/corlib/System.Reflection/ConstructorInfo.cs:62
at MonoTouch.ObjCRuntime.Runtime.ConstructNSObject[NSObject] (IntPtr
ptr, System.Type type, MissingCtorResolution missingCtorResolution)
[0x00000] in :0 at
MonoTouch.ObjCRuntime.Runtime.ConstructNSObject (IntPtr ptr, IntPtr
klass, MissingCtorResolution missingCtorResolution) [0x00000] in
:0 at MonoTouch.ObjCRuntime.Runtime.GetNSObject
(IntPtr ptr, MissingCtorResolution missingCtorResolution) [0x00000] in
:0 at MonoTouch.ObjCRuntime.Runtime.GetNSObject
(IntPtr ptr) [0x00000] in :0 at
MonoTouch.UIKit.UIStoryboard.InstantiateViewController (System.String
identifier) [0x00000] in :0 at
TestApp.StartScreenViewController.m__1 (System.Object
sender, System.EventArgs e) [0x0000c] in
/Users/xxx/Projects/TestApp/TestApp/TestApp/StartScreenViewController.cs:57
at MonoTouch.UIKit.UIControlEventProxy.Activated () [0x00000] in
:0 at at (wrapper managed-to-native)
MonoTouch.UIKit.UIApplication:UIApplicationMain
(int,string[],intptr,intptr) at MonoTouch.UIKit.UIApplication.Main
(System.String[] args, System.String principalClassName, System.String
delegateClassName) [0x00000] in :0 at
TestApp.Application.Main (System.String[] args) [0x00008] in
/Users/xxx/Projects/TestApp/TestApp/TestApp/Main.cs:17
Try:
Hmm, now I added a new UITableViewController to the storyboard, changed some classes to public, changed variable names to starting with lower case. Also the old UITableviewController had a problem with an added SearchController. Now I made everything new and the problem only relied in the viewDidLoad but that was not the original problem. It was one of these steps (perhaps the SearchController problem).
Problematic Code:
this.NavigationController.ToolbarHidden = false;
It seems that he can't find the NavigationController ... How do I addd the navigation controller to the new created view?

Newtonsoft on Mono 4.0

I am trying to execute a compiled application on Ubuntu and get this error:
Can't find custom attr constructor image: /root/Newtonsoft.Json.dll mtoken: 0x0a000077
Missing method System.Reflection.MethodInfo::CreateDelegate(Type) in assembly /usr/lib/mono/4.0/mscorlib.dll, referenced in assembly /root/Newtonsoft.Json.dll
Method not found: 'System.Reflection.MethodInfo.CreateDelegate'. at Newtonsoft.Json.Serialization.DefaultContractResolver.GetDefaultCreator (System.Type createdType) [0x00000] in <filename unknown>:0
at Newtonsoft.Json.Serialization.DefaultContractResolver.InitializeContract (Newtonsoft.Json.Serialization.JsonContract contract) [0x00000] in <filename unknown>:0
at Newtonsoft.Json.Serialization.DefaultContractResolver.CreateLinqContract (System.Type objectType) [0x00000] in <filename unknown>:0
at Newtonsoft.Json.Serialization.DefaultContractResolver.CreateContract (System.Type objectType) [0x00000] in <filename unknown>:0
at Newtonsoft.Json.Serialization.DefaultContractResolver.ResolveContract (System.Type type) [0x00000] in <filename unknown>:0
at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.GetContractSafe (System.Object value) [0x00000] in <filename unknown>:0
at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.Serialize (Newtonsoft.Json.JsonWriter jsonWriter, System.Object value, System.Type objectType) [0x00000] in <filename unknown>:0
at Newtonsoft.Json.JsonSerializer.SerializeInternal (Newtonsoft.Json.JsonWriter jsonWriter, System.Object value, System.Type objectType) [0x00000] in <filename unknown>:0
at Newtonsoft.Json.JsonSerializer.Serialize (Newtonsoft.Json.JsonWriter jsonWriter, System.Object value, System.Type objectType) [0x00000] in <filename unknown>:0
at Newtonsoft.Json.JsonConvert.SerializeObjectInternal (System.Object value, System.Type type, Newtonsoft.Json.JsonSerializer jsonSerializer) [0x00000] in <filename unknown>:0
at Newtonsoft.Json.JsonConvert.SerializeObject (System.Object value, System.Type type, Newtonsoft.Json.JsonSerializerSettings settings) [0x00000] in <filename unknown>:0
at Newtonsoft.Json.JsonConvert.SerializeObject (System.Object value) [0x00000] in <filename unknown>:0
at Server.Misc.BalanceEconomy.InvokeMethod (System.String a_sMethod, System.Object[] a_params) [0x00000] in <filename unknown>:0
at Server.Misc.BalanceEconomy.RefreshBalances () [0x00000] in <filename unknown>:0
at Server.Misc.BalanceEconomy.OnTick () [0x00000] in <filename unknown>:0
How do I fix this?

ValueConverters in plataform projects

I want create a classic BooleanToVisibilityConverter for android, I follow this https://github.com/slodge/NPlus1DaysOfMvvmCross/tree/master/N-04-ValueConverters, but in this sample all the converters are in Core project. I create my converter in Droid project and doesn't work.
My ValueConverter code:
public class BoolToVisibilityValueConverter : MvxValueConverter<bool, ViewStates>
{
protected override ViewStates Convert(bool value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
{
if (value == true)
{
return ViewStates.Visible;
}
else
{
return ViewStates.Gone;
}
}
protected override bool ConvertBack(ViewStates value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
{
if (value == ViewStates.Gone)
{
return false;
}
else if (value == ViewStates.Invisible)
{
return false;
}
else
{
return true;
}
}
}
And my layout where I use this converter.
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:local="http://schemas.android.com/apk/res-auto"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="#ffffff">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
local:MvxBind="Text Message" />
<ProgressBar
android:layout_width="100dp"
android:layout_height="100dp"
android:indeterminate="true"
android:layout_gravity="bottom|center_horizontal"
local:MvxBind="Visibility ProgressBarVisibility,Converter=BoolToVisibility" />
</LinearLayout>
Thanks!
Edit:
Debug trace.
09-26 16:11:34.300 I/mono-stdout(18362): Parameter name: value
09-26 16:11:34.300 I/mono-stdout(18362): at (wrapper managed-to-native) System.Enum:ToObject (System.Type,object)
[0:] MvxBind:Error: 99.25 Problem seen during binding execution for to Visibility - problem ArgumentException: The value passed in must be an enum base or an underlying type for an enum, such as an Int32.
Parameter name: value
at (wrapper managed-to-native) System.Enum:ToObject (System.Type,object)
at Cirrious.MvvmCross.Binding.ExtensionMethods.MvxTypeExtensions.MakeSafeValue (System.Type propertyType, System.Object value) [0x00000] in :0
at Cirrious.MvvmCross.Binding.Bindings.Target.MvxPropertyInfoTargetBinding.MakeSafeValue (System.Object value) [0x00000] in :0
at Cirrious.MvvmCross.Binding.Bindings.Target.MvxPropertyInfoTargetBinding.SetValue (System.Object value) [0x00000] in :0
at Cirrious.MvvmCross.Binding.Bindings.MvxFullBinding.UpdateTargetFromSource (Boolean isAvailable, System.Object value) [0x00000] in :0
09-26 16:11:34.300 I/mono-stdout(18362): at Cirrious.MvvmCross.Binding.ExtensionMethods.MvxTypeExtensions.MakeSafeValue (System.Type propertyType, System.Object value) [0x00000] in :0
09-26 16:11:34.300 I/mono-stdout(18362): at Cirrious.MvvmCross.Binding.Bindings.Target.MvxPropertyInfoTargetBinding.MakeSafeValue (System.Object value) [0x00000] in :0
09-26 16:11:34.300 I/mono-stdout(18362): at Cirrious.MvvmCross.Binding.Bindings.Target.MvxPropertyInfoTargetBinding.SetValue (System.Object value) [0x00000] in :0
09-26 16:11:34.300 I/mono-stdout(18362): at Cirrious.MvvmCross.Binding.Bindings.MvxFullBinding.UpdateTargetFromSource (Boolean isAvailable, System.Object value) [0x00000] in :0
El programa 'Mono' terminó con código 0 (0x0).
You will need to register that ValueConverter in your Setup.cs file, by overriding ValueConverterAssemblies.
protected override List<Assembly> ValueConverterAssemblies
{
get
{
var toReturn = base.ValueConverterAssemblies;
toReturn.Add(typeof(BoolToVisibilityValueConverter).Assembly);
return toReturn;
}
}
You can read more about it here: https://github.com/slodge/MvvmCross/wiki/Value-Converters#referencing-value-converters-in-touch-and-droid

JavaScriptSerializer: Object reference not set to an instance of an object

What am I doing wrong here?
using System.Web.Script.Serialization;
string json = "{\"numbers\":[{\"one\":\"1\"},{\"two\":\"2\"},{\"three\":\"3\"}]}";
dynamic dictionary = new JavaScriptSerializer().Deserialize<dynamic>(json);
Assert.AreEqual(3, dictionary["numbers"].Count);
System.NullReferenceException : Object reference not set to an instance of an object
at System.Web.Script.Serialization.JavaScriptSerializer.ConvertToObject (IDictionary`2 dict, System.Type type) [0x00000] in <filename unknown>:0
at System.Web.Script.Serialization.JavaScriptSerializer.ConvertToType (System.Type type, System.Object obj) [0x00000] in <filename unknown>:0
at System.Web.Script.Serialization.JavaScriptSerializer.ConvertToList (System.Collections.ArrayList col, System.Type type) [0x00000] in <filename unknown>:0
at System.Web.Script.Serialization.JavaScriptSerializer.ConvertToType (System.Type type, System.Object obj) [0x00000] in <filename unknown>:0
at System.Web.Script.Serialization.JavaScriptSerializer.ConvertToObject (IDictionary`2 dict, System.Type type) [0x00000] in <filename unknown>:0
at System.Web.Script.Serialization.JavaScriptSerializer.ConvertToType (System.Type type, System.Object obj) [0x00000] in <filename unknown>:0
at System.Web.Script.Serialization.JavaScriptSerializer.ConvertToType[Object] (System.Object obj) [0x00000] in <filename unknown>:0
at System.Web.Script.Serialization.JavaScriptSerializer.Deserialize[Object] (System.String input) [0x00000] in <filename unknown>:0
As I see no problems with your code, apart from the use of the count property, and since the code is breaking when the json is being deserialized, I would advise you to use the static type definition instead, just to narrow the changes of problems with your code:
string json = "{\"numbers\":[{\"one\":\"1\"},{\"two\":\"2\"},{\"three\":\"3\"}]}";
var dictionary = new JavaScriptSerializer().Deserialize<Dictionary<string, object>>(json);
Maybe just maybe there is an issue with using dynamic types with the JavaScriptSerializer and if there is indeed a problem with the JavaScriptSerializer you can always report that to MSFT.
Since I could not make Dictionary<string, object> work, I've decided to drop it and use static types instead. BTW, this online tool is quite handy for generating C# classes from JSON.

Monotouch with Newtonsoft not working

I am very new to Monotouch/iOS development. I'm using
==========
MonoDevelop 2.8.8.4
Installation UUID: 0d3db625-7df9-4282-9aa6-177c25a46d07
Runtime:
Mono 2.10.9 (tarball Tue Mar 20 15:31:37 EDT 2012)
GTK 2.24.10
GTK# (2.12.0.0)
Mono for Android not installed
Apple Developer Tools:
Xcode 4.2.1 (834)
Build 4D502
Monotouch: 5.2.10 (Evaluation)
==========
I am trying to serialize object to json string using Newtonsoft 3.5 all.
Very simple code but not working.. Can anybody can please help me ...
partial void Action_Clicked (MonoTouch.Foundation.NSObject sender)
{
myDTO test = new myDTO();
string teststring = ObjToJSON(test);
}
public string ObjToJSON(myDTO oObject) //Old function name is ObjToJSON_WithWrapper
{
string sJSON = "";
sJSON = Newtonsoft.Json.JsonConvert.SerializeObject(oObject);
return sJSON;
}
public myDTO JSONToObj(String JSONString) //Old function name is JSONToObjNew
{
myDTO deseri = JsonConvert.DeserializeObject<myDTO>(JSONString);
return deseri;
}
public class myDTO
{
public myDTO()
{
}
public string StringObject {get; set;}
}
Above is my simple test code but it's giving me error when it's run Newtonsoft.Json.JsonConvert.SerializeObject(oObject);
*** ERROR***
{System.TypeLoadException: A type load exception has occurred.
at Newtonsoft.Json.Utilities.ThreadSafeStore`2[System.Type,System.Type].AddValue System.Type key) [0x00000] in <filename unknown>:0
at Newtonsoft.Json.Utilities.ThreadSafeStore`2[System.Type,System.Type].Get (System.Type key) [0x00000] in <filename unknown>:0
at Newtonsoft.Json.Serialization.JsonTypeReflector.GetAssociatedMetadataType (System.Type type) [0x00000] in <filename unknown>:0
at Newtonsoft.Json.Serialization.JsonTypeReflector.GetAttribute[JsonContainerAttribute] (System.Type type) [0x00000] in <filename unknown>:0
at Newtonsoft.Json.Serialization.JsonTypeReflector.GetAttribute[JsonContainerAttribute] (ICustomAttributeProvider attributeProvider) [0x00000] in <filename unknown>:0
at Newtonsoft.Json.Utilities.ThreadSafeStore`2[System.Reflection.ICustomAttributeProvider,Newtonsoft.Json.JsonContainerAttribute].AddValue (ICustomAttributeProvider key) [0x00000] in <filename unknown>:0
at Newtonsoft.Json.Utilities.ThreadSafeStore`2[System.Reflection.ICustomAttributeProvider,Newtonsoft.Json.JsonContainerAttribute].Get (ICustomAttributeProvider key) [0x00000] in <filename unknown>:0
at Newtonsoft.Json.Serialization.CachedAttributeGetter`1[Newtonsoft.Json.JsonContainerAttribute].GetAttribute (ICustomAttributeProvider type) [0x00000] in <filename unknown>:0
at Newtonsoft.Json.Serialization.JsonTypeReflector.GetJsonContainerAttribute (System.Type type) [0x00000] in <filename unknown>:0
at Newtonsoft.Json.Serialization.JsonTypeReflector.GetJsonObjectAttribute (System.Type type) [0x00000] in <filename unknown>:0
at Newtonsoft.Json.Serialization.DefaultContractResolver.CreateContract (System.Type objectType) [0x00000] in <filename unknown>:0
at Newtonsoft.Json.Serialization.DefaultContractResolver.ResolveContract (System.Type type) [0x00000] in <filename unknown>:0
at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.GetContractSafe (System.Object value) [0x00000] in <filename unknown>:0
at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.Serialize (Newtonsoft.Json.JsonWriter jsonWriter, System.Object value) [0x00000] in <filename unknown>:0
at Newtonsoft.Json.JsonSerializer.SerializeInternal (Newtonsoft.Json.JsonWriter jsonWriter, System.Object value) [0x00000] in <filename unknown>:0
at Newtonsoft.Json.JsonSerializer.Serialize (Newtonsoft.Json.JsonWriter jsonWriter, System.Object value) [0x00000] in <filename unknown>:0
at Newtonsoft.Json.JsonConvert.SerializeObject (System.Object value, Formatting formatting, Newtonsoft.Json.JsonSerializerSettings settings) [0x00000] in <filename unknown>:0
at Newtonsoft.Json.JsonConvert.SerializeObject (System.Object value) [0x00000] in <filename unknown>:0
at JSONTest1.JSONTest1ViewController.ObjToJSON (JSONTest1.myDTO oObject) [0x00006] in /Users/developer/Projects/JSONTest1/JSONTest1/JSONTest1ViewController.cs:61
at JSONTest1.JSONTest1ViewController.Action_Clicked (MonoTouch.Foundation.NSObject sender) [0x00006] in /Users/developer/Projects/JSONTest1/JSONTest1/JSONTest1ViewController.cs:52 at (wrapper managed-to-native) MonoTouch.UIKit.UIApplication:UIApplicationMain (int,string[],intptr,intptr)
at MonoTouch.UIKit.UIApplication.Main (System.String[] args, System.String principalClassName, System.String delegateClassName) [0x00042] in /Developer/MonoTouch/Source/monotouch/src/UIKit/UIApplication.cs:29
at JSONTest1.Application.Main (System.String[] args) [0x00000] in /Users/developer/Projects/JSONTest1/JSONTest1/Main.cs:17 }
You need this version of Newtonsoft for MonoTouch:
https://github.com/ayoung/Newtonsoft.Json

Categories

Resources