Re: NSDocument with NSMatrix crasher (10.4)
Re: NSDocument with NSMatrix crasher (10.4)
- Subject: Re: NSDocument with NSMatrix crasher (10.4)
- From: Matt Neuburg <email@hidden>
- Date: Sun, 09 Jul 2006 10:28:21 -0700
- Thread-topic: NSDocument with NSMatrix crasher (10.4)
On Sat, 8 Jul 2006 22:30:04 -0700, Shehryar Khan <email@hidden> 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.
Ooooooh, here's something interesting. I don't get the crash if the matrix
has two columns, but I do get it if it has three columns. Furthermore it
makes a difference where you do the typing in the opened "document"; if the
typing is in the first cell it doesn't crash, but if the typing is in a cell
further to the right and down, it does. And not every cell further to the
right and down, either. In my test with 3 columns and 4 rows, it crashes if
the typing is in the third row and second column, but not if the typing is
in the second row and second column.
m.
--
matt neuburg, phd = email@hidden, <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>
_______________________________________________
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