Notice (2018-05-24): bugzilla.xamarin.com is now in
Please join us on
Visual Studio Developer Community and in the
Mono organizations on
GitHub to continue tracking issues. Bugzilla will remain
available for reference in read-only mode. We will continue to work
on open Bugzilla bugs, copy them to the new locations
as needed for follow-up, and add the new items under Related
Our sincere thanks to everyone who has contributed on this bug
tracker over the years. Thanks also for your understanding as we
make these adjustments and improvements for the future.
Please create a new report on
Developer Community or GitHub with
your current version information, steps to reproduce, and relevant error
messages or log files if you are hitting an issue that looks similar to
this resolved bug and you do not yet see a matching new report.
NSAttributedString is missing the bindings for the following constructors:
It would be great if there was still time to add them to 1.8 :)
These won't make it for 1.8.0 as it's not as straight forward as it initially works. The problem is that along with those two selectors, there are a handful of other related ones that should be bound but are not.
Unfortunately those selectors have colliding argument signatures, so a lot of manual binding work will be necessary and there just isn't time right now.
It should be straightforward to add support for the two constructors you care about in your own project until we can get them in the product. I can help with that.
I'll aim for 1.8.1 for a real fix, which shouldn't be too far behind 1.8.0.
I tried several approaches to add the bindings in my project but all of them resulted in native obj-c runtime crashes. I tried:
- deriving a class from NSAttributedString and adding a constructor identical
to what is generated by the bindings compiler. That resulted in an error that
the 'string' property is defined only in abstract class. Redefining the
property in the derived class wouldn't make it go away
- creating an instance of native NSAtributeString from a managed class that
is basically identical to NSAttributeString generated by the bindings compiler
but uses a different name and then pass the obtained Handle to
- sending a message to NSAttrributeString class to first create an empty object
and then initialize it, then pass the obtained Handle to NSAttrribtueString
I ended up using the only initWithHTML binding we have and I managed to get it to work only to discover that the extent of HTML and CSS markup supported by NSAttributeString is quite limited and not enough for my needs... :)
I ended up using WebView (which I hoped to avoid). So, no biggie that they won't make it to 1.8 - thanks for looking into it!
FWIW, WebView is awesome on OS X. Don't fear using it. It's a great first class citizen - this isn't Linux or Windows!
That's the whole problem... If I use WebView on OSX I have to use WebBrowser on Windows... :) THAT was the reason why I wanted to avoid using the browser control :)
Didn't get resolved for 1.8.1, moving off milestone. I'm moving to '---' as I'm not sure of the new target.
Fixed by 8c9e32496e1c0f7033904b4014720cda64a1f612