site_archiver@lists.apple.com Delivered-To: cocoa-dev@lists.apple.com On Mar 31, 2005, at 10:19 AM, Pierre Chatel wrote: Hello, 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 Thanks, Pierre Haris _______________________________________________ Do not post admin requests to the list. They will be ignored. Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/site_archiver%40lists.apple... 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. 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 I can confirm this behavior, and add the following: 5) If you select text before and after the image, as well as the image, and perform a change in the font, it only takes effect on the text before the image. 6) If you try to delete the image, you run into more trouble. 7) This indeed does not happen if the NSTextView is in the main window. 8) If there is an NSTextView in the main window, then the textview in the drawer runs fine too. 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 ? It seems to me like a bug. I would suggest filing a report, unless someone on the list has a better idea. This email sent to site_archiver@lists.apple.com