• 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
NSTextView's autoresizingmask
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

NSTextView's autoresizingmask


  • Subject: NSTextView's autoresizingmask
  • From: Brian Amerige <email@hidden>
  • Date: Thu, 24 May 2007 18:38:55 -0400

Hello List,

I've got an NSSplitView which has two subviews, an NSScrollView and a WebView. The scrollView's documentView is an NSTextView. All of this is created programatically.

Ordinarily I'd have the textView's autoresizingMask set to NSViewWidthSizable. However, when I animate (using NSViewAnimation) changes to the frames of the subviews, the resizing is choppy and crashes --- but only on Intel Macs

However, I have found a hackish solution which drastically increases the performance of the animation on Intel Macs (no longer crashes, very smooth). If I animate the scrollView, textView, and webView using NSViewAnimation, and set the textView's autoresizingMask to NSViewNotSizable right before starting the animation, these lag- issues disappear. After the animation has finished I set the textView's autoresizingMask back to NSViewWidthSizable (that way manual, user-induced resizes of the splitview and window can appropriately resize the textView.)

Worth noting, even with NSViewWidthSizable as the autoresizing mask, resizing the subviews of the splitview manually (by dragging the splitview, for example), are fluid and not choppy at all on both PPC and Intel.

Also worth noting, I have considered adjusting the viewAnimation's blocking mode, from the default NSAnimationBlocking to NSAnimationNonblocking. This results in the same behavior -- good performance on PPC macs, but crashes on Intel Macs.

My question is as follows: is there a better solution to this? Without much thought I can see a multitude of caveats that come from adjusting the textView's autoresizing mask, so I'd definitely prefer not to do this.

Cheers,
Brian.

_______________________________________________

Cocoa-dev mailing list (email@hidden)

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


  • Prev by Date: Re: Cocoa Intermediate Project Ideas
  • Next by Date: Developers(s) required
  • Previous by thread: NSComboboxCell question
  • Next by thread: Developers(s) required
  • Index(es):
    • Date
    • Thread