Skip navigation.
 
mlRe: NSDocument with NSMatrix crasher (10.4)
FROM : Matt Neuburg
DATE : Sun Jul 09 19:07:51 2006

On Sat, 8 Jul 2006 22:30:04 -0700, Shehryar Khan <<email_removed>> said:

>- create a new document based application
>
> launch xcode
> File -> New Project...
> choose Cocoa Document-based Application
> specify a name (anything will do) and a location (any will do)
> click on Finish
>
>- edit the nib
>
> open up MyDocument.nib (should live under Resources)
> delete the "Your document contents here"
> grab a text field to your document window
> reduce it's size and then select it
> alt-drag first horizontally, then vertically to create a matrix of
>text fields
> save the nib
>
>- modify -[MyDocument windowControllerDidLoadNib:]
>
> add the following piece of code
>
> [self updateChangeCount:NSChangeDone];
>
> (note: adding this because we want to mark the window dirty to spawn
>the
>  unsaved changes sheet which will trip the bug)
>
>- set an extension that this app will open - anything will do here (I
>chose .txt)
>
> edit Info.plist and add "txt" to the CFBundleTypeExtensions array
>
>- build and run the application
>
> choose File -> Open...
> in the Open Panel select a .txt file
> choose a cell in the matrix and type in something
> click on the close button
> in the result Unsaved changes sheet choose "Don't Save"
> watch the app crash


I did everything you said (I believe), and there was no crash. m.

--
matt neuburg, phd = <email_removed>, <http://www.tidbits.com/matt/>
A fool + a tool + an autorelease pool = cool!
AppleScript: the Definitive Guide - Second Edition!
<http://www.amazon.com/gp/product/0596102119>

Related mailsAuthorDate
mlNSDocument with NSMatrix crasher (10.4) Shehryar Khan Jul 9, 07:30
mlRe: NSDocument with NSMatrix crasher (10.4) Matt Neuburg Jul 9, 19:07
mlRe: NSDocument with NSMatrix crasher (10.4) Matt Neuburg Jul 9, 19:28
mlRe: NSDocument with NSMatrix crasher (10.4) Shehryar Khan Jul 9, 19:33
mlRe: NSDocument with NSMatrix crasher (10.4) Shehryar Khan Jul 9, 19:41
mlRe: NSDocument with NSMatrix crasher (10.4) Erik Buck Jul 9, 21:28
mlRe: NSDocument with NSMatrix crasher (10.4) Matt Neuburg Jul 10, 16:18
mlRe: [temporary workaround] NSDocument with NSMatrix crasher (10.4) Shehryar Khan Jul 10, 23:52
mlRe: NSDocument with NSMatrix crasher (10.4) Erik Buck Jul 11, 00:06
mlRe: NSDocument with NSMatrix crasher (10.4) Matt Neuburg Jul 11, 00:58
mlRe: [Solved] NSDocument with NSMatrix crasher (10.4) Shehryar Khan Jul 11, 01:01