1

I've been trying to create a binding project for this token auto complete text view project on GitHub (https://github.com/mattwhetton/TokenAutoComplete). I'm basically trying to port it to us in Xamarin / Mono (C#)

I've been immediately getting the following error:

Inconsistent accessibility: parameter type 'Com.Tokenautocomplete.TokenCompleteTextView.TokenImageSpan' is less accessible than method 'Com.Tokenautocomplete.TokenCompleteTextView.TokenTextWatcher.RemoveToken(Com.Tokenautocomplete.TokenCompleteTextView.TokenImageSpan, Android.Text.IEditable)'

I understand the error and tried to add a transform to make the TokenImageSpan inner class more accessible, but I just cant seem to get the syntax rioght. I've tried the 2 variations below:

<attr path="/api/package[@name='Com.Tokenautocomplete']/class[@name='TokenImageSpan']/class[@name='TokenImageSpan']"
                name="visibility">public</attr>

<attr path="/api/package[@name='Com.Tokenautocomplete.TokenCompleteTextView']/class[@name='TokenImageSpan']"
                name="visibility">public</attr>

But neither seems to work, both just give me the following errors:

BINDINGSGENERATOR : warning BG8A04: <attr path="/api/package[@name='Com.Tokenautocomplete.TokenCompleteTextView']/class[@name='TokenImageSpan']"/> matched no nodes.

BINDINGSGENERATOR : warning BG8A04: <attr path="/api/package[@name='Com.Tokenautocomplete']/class[@name='TokenImageSpan']/class[@name='TokenImageSpan']"/> matched no nodes.

I'm guessing (probably incorrectly) that its something to do with them being nested classes?!

Matt Whetton
  • 6,616
  • 5
  • 36
  • 57
  • please, add at the begining that you are trying to port this library to mono/C# – Selvin Jul 16 '15 at 09:37
  • 1
    `api/package[@name='Com.Tokenautocomplete']/class[@name='TokenCompleteTextView.TokenImageSpan']` – Selvin Jul 16 '15 at 09:50
  • Still getting this error: BINDINGSGENERATOR : warning BG8A04: matched no nodes. – Matt Whetton Jul 16 '15 at 09:57
  • Thanks for the pointer though! – Matt Whetton Jul 16 '15 at 09:57
  • 1
    hmmm I never use xamarin but maybe you should use there a java package(not generated .NET namespace) ... but java packages (same as namespaces in C#) are case sensitive ... so try `com.tokenautocomplete` as package – Selvin Jul 16 '15 at 10:02
  • Ha yeah, that did it - changed it to api/package[@name='com.tokenautocomplete']/class[@name='TokenCompleteTextView.T‌​okenImageSpan'] and its getting past that issue! Thats the answer!! – Matt Whetton Jul 16 '15 at 10:05

1 Answers1

0

Solution:

add in Metadata.xml string

<attr path="/api/package[@name='com.tokenautocomplete']/class[@name='TokenCompleteTextV ew.TokenImageSpan']" name="visibility">public</attr>