• 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: NSAttributedString -size Crash
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSAttributedString -size Crash


  • Subject: Re: NSAttributedString -size Crash
  • From: Michael Ash <email@hidden>
  • Date: Mon, 1 Jun 2009 11:30:04 -0400

On Sun, May 31, 2009 at 7:30 PM, Kyle Sluder <email@hidden> wrote:
> On Sun, May 31, 2009 at 4:08 PM, Seth Willits <email@hidden> wrote:
>> Alright, well, either way I know it's not happening because it's not in the
>> console log.
>
> You don't know it's not nil unless you check yourself.  Set a
> conditional breakpoint; it's the only real way to reason about your
> code.

That is quite backwards. Breakpoints in Xcode's debugger are so
unreliable that the only real way to know whether a piece of code is
running is to stick a logging statement in it and see if it gets
printed. Since Cocoa has already done this for you in this case, it's
extra convenient.

> And FWIW, click a button isn't threadsafe.  AppKit on the whole, with
> few and documented exceptions, isn't threadsafe.

It's neither thread safe nor thread unsafe. It simply does not make
sense. Thread safety is a property of code or APIs, and "click a
button" is a physical action taken by a user.

I think what Seth meant to say was that this would only screw up if
clicking a button could run code in a secondary thread. The answer to
that is, only if you explicitly make it do so by spawning a thread (or
an operation or whatever) in your button's action.

Mike
_______________________________________________

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: Problems choosing an encoding for Word generated html
  • Next by Date: Re: orderFrontStandardAboutPanel problem on Tiger - [NSCFDictionary setObject:forKey:]: attempt to insert nil value
  • Previous by thread: Re: Problems choosing an encoding for Word generated html
  • Next by thread: Re: NSURLConnection sendSynchronousRequest: crashes since, upgrading to 10.5.7
  • Index(es):
    • Date
    • Thread