Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Impossible to bind property named Mode #713

Closed
ze-pequeno opened this issue Jun 6, 2014 · 2 comments
Closed

Impossible to bind property named Mode #713

ze-pequeno opened this issue Jun 6, 2014 · 2 comments

Comments

@ze-pequeno
Copy link

I have a MvxSpinner with ItemsSource and SelectedItem binding :

<Mvx.MvxSpinner
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    local:MvxBind="ItemsSource Modes; SelectedItem Mode"
    local:MvxItemTemplate="@layout/mode_item"  
    local:MvxDropDownItemTemplate="@layout/mode_dropdown_item" />

When I start application, binding is not working. I see this exception on output window :

MvxBind:Error: 49.35 Problem parsing binding MvxException: Cannot terminate binding expression during option Mode in ItemsSource Modes; SelectedItem Mode
06-06 18:16:35.490 I/mono-stdout( 1804): MvxBind:Error: 49.35 Problem parsing binding MvxException: Cannot terminate binding expression during option Mode in ItemsSource Modes; SelectedItem Mode

      at Cirrious.MvvmCross.Binding.Parse.Binding.MvxBindingParser.ParseEquals (System.String block) [0x00000] in <filename unknown>:0 
06-06 18:16:35.490 I/mono-stdout( 1804):      at Cirrious.MvvmCross.Binding.Parse.Binding.MvxBindingParser.ParseEquals (System.String block) [0x00000] in <filename unknown>:0 
  at Cirrious.MvvmCross.Binding.Parse.Binding.Swiss.MvxSwissBindingParser.ParseNextBindingDescriptionOptionInto (Cirrious.MvvmCross.Binding.Parse.Binding.MvxSerializableBindingDescription description) [0x00000] in <filename unknown>:0 
  at Cirrious.MvvmCross.Binding.Parse.Binding.Tibet.MvxTibetBindingParser.ParseNextBindingDescriptionOptionInto (Cirrious.MvvmCross.Binding.Parse.Binding.MvxSerializableBindingDescription description) [0x00000] in <filename unknown>:0 
[0:] MvxBind:Error: 49.35 Problem parsing binding MvxException: Cannot terminate binding expression during option Mode in ItemsSource Modes; SelectedItem Mode
      at Cirrious.MvvmCross.Binding.Parse.Binding.MvxBindingParser.ParseEquals (System.String block) [0x00000] in <filename unknown>:0 
  at Cirrious.MvvmCross.Binding.Parse.Binding.Swiss.MvxSwissBindingParser.ParseNextBindingDescriptionOptionInto (Cirrious.MvvmCross.Binding.Parse.Binding.MvxSerializableBindingDescription description) [0x00000] in <filename unknown>:0 
  at Cirrious.MvvmCross.Binding.Parse.Binding.Tibet.MvxTibetBindingParser.ParseNextBindingDescriptionOptionInto (Cirrious.MvvmCross.Binding.Parse.Binding.MvxSerializableBindingDescription description) [0x00000] in <filename unknown>:0 
  at Cirrious.MvvmCross.Binding.Parse.Binding.Swiss.MvxSwissBindingParser.ParseBindingDescription (ParentIsLookingForComma parentIsLookingForComma) [0x00000] in <filename unknown>:0 
  at Cirrious.MvvmCross.Binding.Parse.Binding.Swiss.MvxSwissBindingParser.ParseBindingDescription () [0x00000] in <filename unknown>:0 
  at Cirrious.MvvmCross.Binding.Parse.Binding.MvxBindingParser.ParseTargetPropertyNameAndDescription () [0x00000] in <filename unknown>:0 
  at Cirrious.MvvmCross.Binding.Parse.Binding.MvxBindingParser.TryParseBindingSpecification (System.String text, Cirrious.MvvmCross.Binding.Parse.Binding.MvxSerializableBindingSpecification& requestedBindings) [0x00000] in <filename unknown>:0 
06-06 18:16:35.490 I/mono-stdout( 1804):   at Cirrious.MvvmCross.Binding.Parse.Binding.Swiss.MvxSwissBindingParser.ParseNextBindingDescriptionOptionInto (Cirrious.MvvmCross.Binding.Parse.Binding.MvxSerializableBindingDescription description) [0x00000] in <filename unknown>:0 
  at Cirrious.MvvmCross.Binding.Parse.Binding.Swiss.MvxSwissBindingParser.ParseBindingDescription (ParentIsLookingForComma parentIsLookingForComma) [0x00000] in <filename unknown>:0 
  at Cirrious.MvvmCross.Binding.Parse.Binding.Swiss.MvxSwissBindingParser.ParseBindingDescription () [0x00000] in <filename unknown>:0 
  at Cirrious.MvvmCross.Binding.Parse.Binding.MvxBindingParser.ParseTargetPropertyNameAndDescription () [0x00000] in <filename unknown>:0 
  at Cirrious.MvvmCross.Binding.Parse.Binding.MvxBindingParser.TryParseBindingSpecification (System.String text, Cirrious.MvvmCross.Binding.Parse.Binding.MvxSerializableBindingSpecification& requestedBindings) [0x00000] in <filename unknown>:0 
06-06 18:16:35.498 I/mono-stdout( 1804):   at Cirrious.MvvmCross.Binding.Parse.Binding.Tibet.MvxTibetBindingParser.ParseNextBindingDescriptionOptionInto (Cirrious.MvvmCross.Binding.Parse.Binding.MvxSerializableBindingDescription description) [0x00000] in <filename unknown>:0 
[0:] 
06-06 18:16:35.498 I/mono-stdout( 1804):   at Cirrious.MvvmCross.Binding.Parse.Binding.Swiss.MvxSwissBindingParser.ParseBindingDescription (ParentIsLookingForComma parentIsLookingForComma) [0x00000] in <filename unknown>:0 
06-06 18:16:35.502 I/mono-stdout( 1804):   at Cirrious.MvvmCross.Binding.Parse.Binding.Swiss.MvxSwissBindingParser.ParseBindingDescription () [0x00000] in <filename unknown>:0 
06-06 18:16:35.510 I/mono-stdout( 1804):   at Cirrious.MvvmCross.Binding.Parse.Binding.MvxBindingParser.ParseTargetPropertyNameAndDescription () [0x00000] in <filename unknown>:0 
MvxBind:Error: 49.45 Failed to parse binding specification starting with ItemsSource Modes; S
[0:] MvxBind:Error: 49.45 Failed to parse binding specification starting with ItemsSource Modes; S
06-06 18:16:35.510 I/mono-stdout( 1804):   at Cirrious.MvvmCross.Binding.Parse.Binding.MvxBindingParser.TryParseBindingSpecification (System.String text, Cirrious.MvvmCross.Binding.Parse.Binding.MvxSerializableBindingSpecification& requestedBindings) [0x00000] in <filename unknown>:0 
06-06 18:16:35.550 I/mono-stdout( 1804): MvxBind:Error: 49.45 Failed to parse binding specification starting with ItemsSource Modes; S

I think it's because SelectedItem property is named Mode and it conflicts with the binding mode feature ? I don't know if it's a voluntary choice or a bug. So I renamed my property.

@slodge
Copy link
Contributor

slodge commented Jun 6, 2014

Mode is a reserved work.

So maybe add another reserved word - try Path=Mode

@ze-pequeno
Copy link
Author

I understand.

You can close issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants