"addAttribute:value:range:" error using NSDrawer & NSTextView
"addAttribute:value:range:" error using NSDrawer & NSTextView
- Subject: "addAttribute:value:range:" error using NSDrawer & NSTextView
- From: Pierre Chatel <email@hidden>
- Date: Thu, 31 Mar 2005 13:19:22 -0300
Hello,
following my previous post, i ran many investigations in my code and
wrote a little test app. To recap:
I'm having problems when trying to change font attributes to text
contained in a NSTextView. The catch is that this is a mixed
picture/text content since i enabled RTF and image dropping support in
the NSTextView (via interface builder)
To be more precise, i get an "addAttribute:value:range:: nil value"
error. BUT i'm only getting this error if the NSTextView is contained
IN an NSDrawer ! The problem is, i MUST put this text view in a drawer,
not a "normal" panel/window.
So i wrote a very little test application with almost 4 lines of code,
all the wirering is done via interface builder so you can be sure that
i didn't mess with the configuration or the initialization of any of
the objects i'm using.
You can download the binary here: http://www.chatelp.org/test_app.zip
And/Or the source code here: http://www.chatelp.org/test.zip
Please try it, and see the error for yourself:
1) open the drawer
2) write some text and drag a png/giff or any pict u want in the text
3) select the text and use the font panel to change the settings
4)You will get an error in the console and the text content will become
inconsistent
You can try the exact same thing putting the NSTextView in the main
window and you will NOT get the error !
Is it a "bug" in the NSDrawer implementation ?
Thanks,
Pierre
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden