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>
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 mails | Author | Date |
|---|---|---|
| Shehryar Khan | Jul 9, 07:30 | |
| Matt Neuburg | Jul 9, 19:07 | |
| Matt Neuburg | Jul 9, 19:28 | |
| Shehryar Khan | Jul 9, 19:33 | |
| Shehryar Khan | Jul 9, 19:41 | |
| Erik Buck | Jul 9, 21:28 | |
| Matt Neuburg | Jul 10, 16:18 | |
| Shehryar Khan | Jul 10, 23:52 | |
| Erik Buck | Jul 11, 00:06 | |
| Matt Neuburg | Jul 11, 00:58 | |
| Shehryar Khan | Jul 11, 01:01 |






Cocoa mail archive

