• 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: unable to update UI on main thread in 10.13
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: unable to update UI on main thread in 10.13


  • Subject: Re: unable to update UI on main thread in 10.13
  • From: sqwarqDev <email@hidden>
  • Date: Fri, 27 Oct 2017 21:40:30 +0700

Yeah, I should probably have explained the structure.

After years of objective-c this is my first time with both swift and
storyboards, so…that may well be where the problem lies.

Anyway, it goes like this, the ViewController instantiates an instance of my
subclassed NSTextView.

The subclassed textview is just a bog-standard textview save for enabling
-mouseMoved(with event: NSEvent).

The superAttributedString is also declared in the ViewController as a global var

My updateUI func is supposed to switch to the main thread, clear the subclassed
textview’s textstorage of any attributes, then add/append the
superAttributedString.

It seems to be when the superAttributedString is added that I get the warnings.
I don’t know why they only appear in 10.13 and not 10.11 or 10.12. At first, I
was tempted to put it down to a 10.13 bug, but it’s true that I AM seeing odd
behaviour in 10.13 (the attributed string is supposed to bold certain parts of
the text, but one time in ten or so in 10.13 it just goes gung-ho and bolds the
lot).

_______________________________________________

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

  • Follow-Ups:
    • Re: unable to update UI on main thread in 10.13
      • From: Quincey Morris <email@hidden>
References: 
 >unable to update UI on main thread in 10.13 (From: sqwarqDev <email@hidden>)
 >Re: unable to update UI on main thread in 10.13 (From: David Duncan <email@hidden>)
 >Re: unable to update UI on main thread in 10.13 (From: sqwarqDev <email@hidden>)
 >Re: unable to update UI on main thread in 10.13 (From: David Duncan <email@hidden>)

  • Prev by Date: Re: unable to update UI on main thread in 10.13
  • Next by Date: Re: unable to update UI on main thread in 10.13
  • Previous by thread: Re: unable to update UI on main thread in 10.13
  • Next by thread: Re: unable to update UI on main thread in 10.13
  • Index(es):
    • Date
    • Thread