ArgumentNullException in Views.ViewParser.CreateEnumerableRoot
Closed this issue · 2 comments
I occasionally get this exception when I'm using the InterestingView sample:
System.ArgumentNullException has been thrown.
Member of class ThemeSampleViewModel must have a value. Parameter name: Themes
at MonoMobile.Views.ViewParser.CreateEnumerableRoot (MonoMobile.Views.Theme theme, System.Reflection.MemberInfo member, System.String caption, System.Object view, System.Collections.Generic.List1 bindings) [0x0005f] in /Users/Emanuele/Projects/RobertKozak-MonoMobile.Views-c9418ed/Dialog/ViewParser.cs:783 at MonoMobile.Views.ViewParser.GetRootElementForMember (MonoMobile.Views.Theme theme, MonoTouch.UIKit.UIView view, System.Reflection.MemberInfo member, System.Collections.Generic.List
1 bindings) [0x00278] in /Users/Emanuele/Projects/RobertKozak-MonoMobile.Views-c9418ed/Dialog/ViewParser.cs:495
at MonoMobile.Views.ViewParser.GetElementForMember (MonoMobile.Views.Theme theme, MonoTouch.UIKit.UIView view, System.Reflection.MemberInfo member, System.Collections.Generic.List`1 bindings) [0x000f8] in /Users/Emanuele/Projects/RobertKozak-MonoMobile.Views-c9418ed/Dialog/ViewParser.cs:407
at MonoMobile.Views.ViewParser.CreateSectionList (MonoTouch.UIKit.UIView view, IRoot root) [0x00197] in /Users/Emanuele/Projects/RobertKozak-MonoMobile.Views-c9418ed/Dialog/ViewParser.cs:257
at MonoMobile.Views.ViewParser.Parse (MonoTouch.UIKit.UIView view, System.String caption, MonoMobile.Views.Theme theme) [0x000fa] in /Users/Emanuele/Projects/RobertKozak-MonoMobile.Views-c9418ed/Dialog/ViewParser.cs:111
at MonoMobile.Views.BindingContext..ctor (MonoTouch.UIKit.UIView view, System.String title, MonoMobile.Views.Theme currentTheme) [0x0001d] in /Users/Emanuele/Projects/RobertKozak-MonoMobile.Views-c9418ed/Dialog/BindingContext.cs:66
at MonoMobile.Views.BindingContext.CreateObjectRoot (IRoot root) [0x000df] in /Users/Emanuele/Projects/RobertKozak-MonoMobile.Views-c9418ed/Dialog/BindingContext.cs:284
at MonoMobile.Views.BindingContext.m__14 (IRoot root) [0x00000] in /Users/Emanuele/Projects/RobertKozak-MonoMobile.Views-c9418ed/Dialog/BindingContext.cs:49
at MonoMobile.Views.BindingContext.CreateRootedView (IRoot root) [0x0000d] in /Users/Emanuele/Projects/RobertKozak-MonoMobile.Views-c9418ed/Dialog/BindingContext.cs:91
at MonoMobile.Views.RootElement.Selected (MonoMobile.Views.DialogViewController dvc, MonoTouch.UIKit.UITableView tableView, MonoTouch.Foundation.NSIndexPath path) [0x00000] in /Users/Emanuele/Projects/RobertKozak-MonoMobile.Views-c9418ed/Dialog/RootElement.cs:409
at MonoMobile.Views.DialogViewController.Selected (MonoTouch.Foundation.NSIndexPath indexPath) [0x0007d] in /Users/Emanuele/Projects/RobertKozak-MonoMobile.Views-c9418ed/Dialog/DialogViewController/DialogViewController.cs:436
at MonoMobile.Views.DialogViewDataSource.RowSelected (MonoTouch.UIKit.UITableView tableView, MonoTouch.Foundation.NSIndexPath indexPath) [0x00000] in /Users/Emanuele/Projects/RobertKozak-MonoMobile.Views-c9418ed/Dialog/DialogViewController/DialogViewDataSource.cs:80
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) [0x00038] in /Developer/MonoTouch/Source/monotouch/monotouch/UIKit/UIApplication.cs:26
at MonoMobile.Views.MonoMobileApplication.Run (System.String title, System.Type mainViewType, System.String[] args) [0x00015] in /Users/Emanuele/Projects/RobertKozak-MonoMobile.Views-c9418ed/Application/MonoMobileApplication.cs:135
at Samples.Application.Main (System.String[] args) [0x00000] in /Users/Emanuele/Projects/RobertKozak-MonoMobile.Views-c9418ed/Samples/Main.cs:9
Looking into it. That was some sample code that I was playing with but I don't remember if I had finished it. Samples is a scratch area for me to test out new ideas. I'll either fix it or remove it.
Thanks for reporting this issue.
The entire framework has been redesigned and this is no longer applicable. I will update the samples soon.