So, I play with MvvmCross and Monotouch.Dialog on iOS, and I have a binding problem when I do something quite trivial - and actually do it almost verbatim in one of the Stuart n + 1 video.
Given the following view:
[Register("FirstView")] public class FirstView : MvxDialogViewController { public override void ViewDidLoad() { base.ViewDidLoad(); var bindings = this.CreateInlineBindingTarget<FirstViewModel>(); Root = new RootElement("Example Root") { new Section("Search") { new EntryElement("SearchString", "Search String").Bind(bindings, vm => vm.SearchString) } }; } }
and this ViewModel:
public class FirstViewModel : MvxViewModel { private string _searchString = "search string"; public string SearchString { get { return _searchString; } set { _searchString = value; RaisePropertyChanged(() => SearchString); } } }
On going to this view, I get the following errors from Mvx:
2013-08-22 14:44:51.766 TestApp[11581:c07] MvxBind:Error: 2.02 Empty binding target passed to MvxTargetBindingFactoryRegistry [0:] MvxBind:Error: 2.02 Empty binding target passed to MvxTargetBindingFactoryRegistry [0:] 2013-08-22 14:44:51.869 TestApp[11581:c07] MvxBind:Warning: 2.10 Failed to create target binding for to [0:] MvxBind:Warning: 2.10 Failed to create target binding for to
I'm not quite sure why the binding does not work. If I set a breakpoint in "Get" for SearchString, I really see how it hits. However, changing the value of an entry does not start Install.
Any thoughts?
Frank source share