• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Strange Problem Printing Multiple NSTextViews
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Strange Problem Printing Multiple NSTextViews


  • Subject: Re: Strange Problem Printing Multiple NSTextViews
  • From: Kyle Sluder <email@hidden>
  • Date: Wed, 06 Feb 2013 10:27:25 -0800

On Wed, Feb 6, 2013, at 09:41 AM, Keary Suska wrote:
> The issue is in the above lines, where I release the NSTextStorage. I was
> assuming that the NSTextView would retain the text storage, which
> certainly must be the case in certain situations, but clearly isn't the
> case when one is constructing the text system by hand. I.e., when you let
> NSTextView construct its own text system, it retains the related objects,
> but when you use the -initWithFrame:textContainer: method, it does not.

This is explained in the Cocoa Text Architecture Guide:
http://developer.apple.com/library/mac/#documentation/TextFonts/Conceptual/CocoaTextArchitecture/TextSystemArchitecture/ArchitectureOverview.html#//apple_ref/doc/uid/TP40009459-CH7-SW11

It's also the reason you can't set up a zeroing weak reference to an
NSTextView; NSTextView checks its own retain count for magic values and
deallocates itself if it reaches those values.

--Kyle Sluder
_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >Strange Problem Printing Multiple NSTextViews (From: Keary Suska <email@hidden>)
 >Re: Strange Problem Printing Multiple NSTextViews (From: Keary Suska <email@hidden>)

  • Prev by Date: Re: Autoscrolling in NSDraggingDestination
  • Next by Date: Re: Warning users when editing multiple items
  • Previous by thread: Re: Strange Problem Printing Multiple NSTextViews
  • Next by thread: Warning users when editing multiple items
  • Index(es):
    • Date
    • Thread