• 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: NSDocument with NSMatrix crasher (10.4)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSDocument with NSMatrix crasher (10.4)


  • Subject: Re: NSDocument with NSMatrix crasher (10.4)
  • From: Erik Buck <email@hidden>
  • Date: Mon, 10 Jul 2006 15:06:44 -0700 (PDT)

Since the bug seems related to a text filed being in edit mode at the same time it is being deallocated, how about the following work around:

  In the document's -dealloc or -close or in any other methods that is called after the decision to release the document is made but before the autorelease pool is popped,
send the -abortEditing message to the matrix.

  As an alternative to -abortEditing, use Apple's helpful sample code:

if ([myWindow makeFirstResponder:myWindow]) {

    /* All fields are now valid; itÂ’s safe to use fieldEditor:forObject:

        to claim the field editor. */

}

else {

    /* Force first responder to resign. */

    [myWindow endEditingFor:nil];

}


Matt Neuburg <email@hidden> wrote:
  On Sun, 9 Jul 2006 15:28:30 -0400, Erik Buck said:
>Forgive me if I don't understand the problem. I have not read the
>entire thread. However...
>
>Why was a view being being edited put in an autorelease pool and
>therefore released as shown in these line of the crash stack dump ?

We don't know - that's the bug. This app has no code except for what comes
fresh from Apple in the template. (Plus one line that apparently has nothing
to do with the matter, though presumably it does.)

m.

--
matt neuburg, phd = email@hidden,
A fool + a tool + an autorelease pool = cool!
AppleScript: the Definitive Guide - Second Edition!





 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: [Solved] NSDocument with NSMatrix crasher (10.4)
      • From: Shehryar Khan <email@hidden>
    • Re: NSDocument with NSMatrix crasher (10.4)
      • From: Matt Neuburg <email@hidden>
References: 
 >Re: NSDocument with NSMatrix crasher (10.4) (From: Matt Neuburg <email@hidden>)

  • Prev by Date: Re: [temporary workaround] NSDocument with NSMatrix crasher (10.4)
  • Next by Date: Re: Outline view with variable-height rows & text wrapping...
  • Previous by thread: Re: [temporary workaround] NSDocument with NSMatrix crasher (10.4)
  • Next by thread: Re: NSDocument with NSMatrix crasher (10.4)
  • Index(es):
    • Date
    • Thread