RE: Opening Files in OS X
> > Thanks again Monte, I've done the reading, and I have a follow-up > question, > if you don't mind (or if anyone else has advice on this). > > My understanding is that Mac OSes use fileType to determine if a file > "belongs" to an application. Furthermore, it seems that the OS > prevents my > app from opening files that don't belong to it (judging from the docs and > the way my app is currently behaving). So what I need to do is set the > fileType when my app saves a file, and then the app will be able > to reopen > that file later. That's correct > > Is that right? If so, what happens if a Windows user of my app creates a > file and tries to share it with a Mac user of my app? The docs suggest > that Windows ignores fileType, so will the Mac user be prevented from > opening files created by Windows users? This is the reason why Apple is moving away from the resource fork. That and it's a crap idea. For MacOS Classic you can use the File Exchange to associate an extension with a file type and creator code. If you search the list archives you will find some applescript to do this (it's probably also on sonsofthunder & revnet like everything else ;-). For OS X you use a plist file. It's an xml file that is in the package where you can set the file extension, type code etc (that's one of my enhancements to the dist builder). The only problem is that OS X is bad at assigning the type code to the file. Often you get files that have the correct icon and when you doubleclick open the app but when you ask file of type they are greyed out because the type code isn't there. There's currently no fix for this other than doubleclick and save. That's why I'm looking forward to extension filters on OS X. Cheers Monte > > These files are just text files that have a *.upf extension in Windows. > > Thanks! > > Jim > > At 08:48 AM 6/20/2003 +0930, you wrote: > >Read the docs on ask file. You need to use type codes on MacOS > rather than > >extension filters. Hopefully we will get extension filters for OS X soon. > > > >You will also need to read up on stackFileType and/or fileType to handle > >your custom file type on MacOS & OS X. > > > > --- > http://www.biancolo.com > > ___ > use-revolution mailing list > [EMAIL PROTECTED] > http://lists.runrev.com/mailman/listinfo/use-revolution > ___ use-revolution mailing list [EMAIL PROTECTED] http://lists.runrev.com/mailman/listinfo/use-revolution
RE: Opening Files in OS X
Thanks again Monte, I've done the reading, and I have a follow-up question, if you don't mind (or if anyone else has advice on this). My understanding is that Mac OSes use fileType to determine if a file "belongs" to an application. Furthermore, it seems that the OS prevents my app from opening files that don't belong to it (judging from the docs and the way my app is currently behaving). So what I need to do is set the fileType when my app saves a file, and then the app will be able to reopen that file later. Is that right? If so, what happens if a Windows user of my app creates a file and tries to share it with a Mac user of my app? The docs suggest that Windows ignores fileType, so will the Mac user be prevented from opening files created by Windows users? These files are just text files that have a *.upf extension in Windows. Thanks! Jim At 08:48 AM 6/20/2003 +0930, you wrote: Read the docs on ask file. You need to use type codes on MacOS rather than extension filters. Hopefully we will get extension filters for OS X soon. You will also need to read up on stackFileType and/or fileType to handle your custom file type on MacOS & OS X. --- http://www.biancolo.com ___ use-revolution mailing list [EMAIL PROTECTED] http://lists.runrev.com/mailman/listinfo/use-revolution
RE: Opening Files in OS X
Hi Ken, I'm running RR 2.0. I think Monte's right in that I have some more reading to do. I should have known saving/opening files wouldn't be *completely* platform-independent. Thanks for the tip though, on this being a possible version issue And thanks, Monte, for the link to your enhanced distribution builder! Take care, Jim At 05:53 PM 6/19/2003 -0500, Ken Ray wrote: Jim, What version of Rev is it? The reason I ask is that an earlier version of the MC engine required that you save *twice* in order for files to get the right creator codes to be "seen" in the file picker... Ken Ray Sons of Thunder Software Email: [EMAIL PROTECTED] Web Site: http://www.sonsothunder.com/ > -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf Of > Jim Biancolo > Sent: Thursday, June 19, 2003 3:51 PM > To: [EMAIL PROTECTED] > Subject: Opening Files in OS X > > > Hi folks, > > I have a RR app that saves a text file (with a *.upf > extension) like so: > >ask file "Save play as:" with filter "Ultimate Play File > (*.upf),*.upf" >if it is empty then exit mouseUp >-- do some stuff to txt variable >put txt into url ("file:" & it) > > ... and it loads files like so: > >answer file "Open Play:" with filter "Ultimate Play File > (*.upf),*.upf,All Files (*.*),*.*" >if it is empty then exit mouseUp >put url ("file:" & it) into txt > > This works great on Windows, but my OS X testers (sadly I > just have the > Windows machine) report that they can't open files. To quote > one user: > > "The file picker dialog still appears, and I can see the file > I save, but I > can't click it (it is dim, and apparently "unavailable" to > the program." > > Can anyone tell me if there's something Mac-specific I need > to do in my app? > > Thanks! > > Jim > > --- > http://www.biancolo.com > > ___ > use-revolution mailing list > [EMAIL PROTECTED] > http://lists.runrev.com/mailman/listinfo/use-> revolution > ___ use-revolution mailing list [EMAIL PROTECTED] http://lists.runrev.com/mailman/listinfo/use-revolution --- http://www.biancolo.com ___ use-revolution mailing list [EMAIL PROTECTED] http://lists.runrev.com/mailman/listinfo/use-revolution
RE: Opening Files in OS X
HI Jim Read the docs on ask file. You need to use type codes on MacOS rather than extension filters. Hopefully we will get extension filters for OS X soon. You will also need to read up on stackFileType and/or fileType to handle your custom file type on MacOS & OS X. Also if you don't know much about plist files you might want to use my suped up distibution builder that you can download from: http://www.sweattechnologies.com/rev/sweatDistributionBuilder.rev It's not linked into the /rev/ index so you will need to click on the above link. Anyone else can downlaod and use it too, however, I've only done it as a reference implementation of a number of my feature requests for the RunRev team. The changes include: - saving/opening from/to invisible stack file format allowing for seamless upgrade - a copy files tab on the last stage to copy any extra files like manuals etc - improved (and simplified) plist changes including document type extension, name, code and role. I've also added CFBundleExecutable and changed the executable name from Revolution to the name you enter in on the OS X tab. - resizable window - an auto update option that will update all version numbers & names etc with one change rather than doing it for each platform - the ability to enter in a naming convention for your mainstack - the fields on the Windows > Other Version Information button are now on the card. Regards Monte > > > Hi folks, > > > > I have a RR app that saves a text file (with a *.upf > > extension) like so: > > > >ask file "Save play as:" with filter "Ultimate Play File > > (*.upf),*.upf" > >if it is empty then exit mouseUp > >-- do some stuff to txt variable > >put txt into url ("file:" & it) > > > > ... and it loads files like so: > > > >answer file "Open Play:" with filter "Ultimate Play File > > (*.upf),*.upf,All Files (*.*),*.*" > >if it is empty then exit mouseUp > >put url ("file:" & it) into txt > > > > This works great on Windows, but my OS X testers (sadly I > > just have the > > Windows machine) report that they can't open files. To quote > > one user: > > > > "The file picker dialog still appears, and I can see the file > > I save, but I > > can't click it (it is dim, and apparently "unavailable" to > > the program." > > > > Can anyone tell me if there's something Mac-specific I need > > to do in my app? > > > > Thanks! > > > > Jim > > > > --- > > http://www.biancolo.com > > > > ___ > > use-revolution mailing list > > [EMAIL PROTECTED] > > http://lists.runrev.com/mailman/listinfo/use-> revolution > > > > > ___ > use-revolution mailing list > [EMAIL PROTECTED] > http://lists.runrev.com/mailman/listinfo/use-revolution > ___ use-revolution mailing list [EMAIL PROTECTED] http://lists.runrev.com/mailman/listinfo/use-revolution
RE: Opening Files in OS X
Jim, What version of Rev is it? The reason I ask is that an earlier version of the MC engine required that you save *twice* in order for files to get the right creator codes to be "seen" in the file picker... Ken Ray Sons of Thunder Software Email: [EMAIL PROTECTED] Web Site: http://www.sonsothunder.com/ > -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf Of > Jim Biancolo > Sent: Thursday, June 19, 2003 3:51 PM > To: [EMAIL PROTECTED] > Subject: Opening Files in OS X > > > Hi folks, > > I have a RR app that saves a text file (with a *.upf > extension) like so: > >ask file "Save play as:" with filter "Ultimate Play File > (*.upf),*.upf" >if it is empty then exit mouseUp >-- do some stuff to txt variable >put txt into url ("file:" & it) > > ... and it loads files like so: > >answer file "Open Play:" with filter "Ultimate Play File > (*.upf),*.upf,All Files (*.*),*.*" >if it is empty then exit mouseUp >put url ("file:" & it) into txt > > This works great on Windows, but my OS X testers (sadly I > just have the > Windows machine) report that they can't open files. To quote > one user: > > "The file picker dialog still appears, and I can see the file > I save, but I > can't click it (it is dim, and apparently "unavailable" to > the program." > > Can anyone tell me if there's something Mac-specific I need > to do in my app? > > Thanks! > > Jim > > --- > http://www.biancolo.com > > ___ > use-revolution mailing list > [EMAIL PROTECTED] > http://lists.runrev.com/mailman/listinfo/use-> revolution > ___ use-revolution mailing list [EMAIL PROTECTED] http://lists.runrev.com/mailman/listinfo/use-revolution