Wyatt
2007-04-19, 20:57
I'm building a simple document-based Core Data application in XCode (just playing around with it, really), and I have a couple of questions.
1) In my NSTableView, one of my items (a string) is defaulting to zero, and even when I change it, it changes back as soon as I tab out of that field or press return or enter. The column is flagged as editable, and I don't have a default value set for that property in my data model.
Nevermind, I figured that one out. As it turns out, "version" is a reserved name and shouldn't be used as a property name. I changed it to "versionNumber" and it magically works.
2) How can I make my application open the most recently modified file automatically on startup? I doubt I'll ever use more than one file with this, so it would be nice to be able to open it automatically.
2.a) How can I make files created by my application automatically open with my application when I double-click them in the Finder? I got it to work a couple times by using the "Always Open With" right-click menu, but it stopped working after I modified and saved the file. Is there any way for me to create a custom file extension and register it with OS X so that every file of that type I open will just open with my app?
3) I've just noticed that my .app file being compiled by Xcode is flagged as an Intel application in the Finder. I don't care so much about this app, since I'm only making it for my own use, but I might develop something in the future that I'd like to distribute. How can I make my app universal?
I'm sure I'll probably have a few more questions later. I've worked through most of my issues, though, and I'll be satisfied with this for my own use once I get these two things figured out.
1) In my NSTableView, one of my items (a string) is defaulting to zero, and even when I change it, it changes back as soon as I tab out of that field or press return or enter. The column is flagged as editable, and I don't have a default value set for that property in my data model.
Nevermind, I figured that one out. As it turns out, "version" is a reserved name and shouldn't be used as a property name. I changed it to "versionNumber" and it magically works.
2) How can I make my application open the most recently modified file automatically on startup? I doubt I'll ever use more than one file with this, so it would be nice to be able to open it automatically.
2.a) How can I make files created by my application automatically open with my application when I double-click them in the Finder? I got it to work a couple times by using the "Always Open With" right-click menu, but it stopped working after I modified and saved the file. Is there any way for me to create a custom file extension and register it with OS X so that every file of that type I open will just open with my app?
3) I've just noticed that my .app file being compiled by Xcode is flagged as an Intel application in the Finder. I don't care so much about this app, since I'm only making it for my own use, but I might develop something in the future that I'd like to distribute. How can I make my app universal?
I'm sure I'll probably have a few more questions later. I've worked through most of my issues, though, and I'll be satisfied with this for my own use once I get these two things figured out.