From: robert k. <ro...@cr...> - 2002-08-08 15:30:28
|
I notice pdf files are opened by default with Preview in macosx 10.1. Is there a way to programmatically change this in aqua-tcl? I notice 'file attributes' no longer has the -creator and -type options. Would this be difficult to add or is there a better way with macosx. Thanks for any ideas. Robert Karen |
From: Jim I. <ji...@ap...> - 2002-08-08 18:22:01
|
This is going to be possible but a bit tricky to add. The way it works now is that you define two CONST static arrays - tclpFileAttrStrings, and tclpFileAttrProcs - somewhere in your platform code, and then the generic file attributes code looks up option in the string table given in the former, and dispatches it to the function table in the latter. In hindsight it is kind of a shame that static tables rather than a registry mechanism was chosen. You see, we already use the versions of these tables from tclUnixFCmd.c. So, to get -type & -creator back, we would have to to two things. One is to steal the two routines: GetFileFinderAttributes and SetFileFinderAttributes from tclMacFCmd.c. This wouldn't be hard, though you would have to handle the fact that you don't want to deal with FSSpec's any more (they are deprecated). Then you would have to splice them onto the Unix table. This is on my list of things to do, but, to tell the truth, not high on that list... Jim On Thursday, August 8, 2002, at 08:30 AM, robert karen wrote: > I notice pdf files are opened by default with Preview > in macosx 10.1. Is there a way to programmatically > change this in aqua-tcl? I notice 'file attributes' no longer has > the -creator and -type options. Would this be difficult to add > or is there a better way with macosx. > Thanks for any ideas. > > Robert Karen > > > > ------------------------------------------------------- > This sf.net email is sponsored by:ThinkGeek > Welcome to geek heaven. > http://thinkgeek.com/sf > _______________________________________________ > Tcl-mac mailing list > Tc...@li... > https://lists.sourceforge.net/lists/listinfo/tcl-mac > -- Jim Ingham ji...@ap... Developer Tools - gdb Apple Computer |