in my MyDocument class I need to determine if there is an image in my NSTextView, so I can prevent users from saving documents as RTF although RTF doesn’t support images.
Could someone point me in the right direction?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Is there a reason you can’t support RTFD for documents with images, like TextEdit does?
If that really isn’t an option, ask your attributed string whether it contains attachments. That’s what embedded images are: attachments.
Also, you shouldn’t use your views as storage classes. The document itself should own the text and expose it in a property, and you should bind the text view’s value to that property.