Skip navigation.
 
mlRe: NSDocument with NSMatrix crasher (10.4)
FROM : Shehryar Khan
DATE : Sun Jul 09 19:41:28 2006

you're right.

I can enter text into any cell in the first row and the first column 
and it works fine.  It's when I entered text into a cell other than 
those cells that it crashed for me.

I tried cell at row 1, column 1 and sure enough it choked.

thanks.

-shehryar

On Jul 9, 2006, at 10:28 AM, Matt Neuburg wrote:

> 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.

>
> 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_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