opened object and file mapping
I could use a tutorial on creating your own filetypes for standalones. I'm using a coll object to read and write files and would like to be able to load the file when a user double clicks on it in the finder. I saw a thread that mentioned the "opened" object and I've tried to use it, but it does nothing. Opening a file does nothing and sending it a bang simply causes it to output the word "symbol". I can't find that thread now. I guess the word "opened" is too common to find search results.
Stuck at square one.
First: have you defined a PkgInfo document and the relevant Bundle information in your app's Info.plist file? Got Finder Types & Creators set up?
This is all Mac OS stuff that's got to be working.
Nope. Haven't done any of that. Where do i go to find that info? Also, is that really step one? I still don't know how to handle the fact that when you click on a file written by "coll", it will open as a text file. How do I tell my app--or Max for that matter--that this file should be read into a "coll" object.
Thanks for responding.
Got "opened" to work. All my tests were with patch files. Turns out it only seems to work with text files--which is what I need it to do anyway. So now I can get the filename that is opened and send it through a "prepend read" to a "coll" object and it works fine. But I'm still left with an open text file that I wish I could automatically close. I've tried the "wclose" message to the same "coll", but it doesn't see the opened file as its text editor, so no dice. I've also tried sending "openfile" and "closefile" messages to Max, but it doesn't work either. Is there any way to tell Max to close a window?
Or has anyone else come up with a better way to open "coll" files from the desktop?
ksound wrote on Sat, 27 June 2009 16:13Nope. Haven't done any of that. Where do i go to find that info?
Where to go? http://developer.apple.com.
There may be a more succinct overview somewhere, but the full bumpf on how the Finder does its stuff is at <http://developer.apple.com/documentation/Carbon/Conceptual/LaunchServicesConcepts/LSCIntro/LSCIntro.html> and follow the relevant links.
Thanks. Maybe if I figure all this out, I'll write a step by step tutorial.