• 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
NSTableView - differences in click or arrow selection
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

NSTableView - differences in click or arrow selection


  • Subject: NSTableView - differences in click or arrow selection
  • From: Martin Hewitson <email@hidden>
  • Date: Fri, 26 Jul 2013 08:22:08 +0100

Dear list,

This is a strange one. I have a table view which lists a set of themes. When a theme is selected a textview in another part of the app has its font and colors updated.  This all works nicely except for one strange 'feature'. When selecting a theme with the arrow keys (moving up or down) the textview often scrolls to what seems like an arbitrary location. Clicking to select a theme doesn't cause this to happen.

I implement -tableViewSelectionDidChange: in the tableview's delegate and from there post the notification that the selected theme has changed. By various debug statements I've checked that the notification is received the same in both cases.

In the notification handler (in the NSTextView subclass) I call

-setFont
-setTextColor
-setDefaultParagraphStyle
-setTypingAttributes
-setBackgroundColor
-setInsertionPointColor
-setSelectedTextAttributes
-addAttribute:value:range (on textstorage)

Anyone seen this before, or have any idea what can cause an NSTextView to scroll?

Best wishes,

Martin




_______________________________________________

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


  • Prev by Date: Re: Non-sandboxed Cocoa app accessing current user preferences using NSTask fails when launched outside Xcode.
  • Next by Date: Re: Apple Developer update phishing
  • Previous by thread: Re: How to make text view treat colon as word boundary
  • Next by thread: Developer.apple.com repair status
  • Index(es):
    • Date
    • Thread