From: Jason Sonnenschein <jes_jm@ya...> - 2002-03-22 18:23:58
I got a bundle set up under OS X, such that you double-click the app and mactk
comes up running my tk script, and such that double-clicking a document created
by the tk app will make it run, but... the application comes up without the
document loaded. This application was already developed to auto-load documents
under Classic MacOS... it also knows to load documents it gets on the
command-line (for the unix folks.) Any ideas if/how the name of the document
is received by mactk under OS X?
Do You Yahoo!?
Yahoo! Movies - coverage of the 74th Academy Awards®
From: Jim Ingham <jingham@ap...> - 2002-03-22 19:06:01
Should work the same way it does for classic MacOS. But in playing with=20=
this I noticed two problems. One is that in tk8.4 all the tk_ type=20
procs were moved into the tk:: namespace, so tk_openDocument got renamed=20=
For all the ones that were defined by tk, aliases were made back to the=20=
old names, but this one was user defined, so you really can't do this...
So you will have to create such a proc, and route it through to your=20
The other is that I haven't changed the code in=20
tk/macosx/tkMacOSXHLEvents.c to use FSRef's, it uses FSSpec still. It=20=
seems like if I do:
tell application "Wish Shell"
open document =
in the script editor, I get garbage for the file path. The odoc event=20=
is correct, an AEList with one element, but when I try to get the first=20=
element as an FSSpec, it is all mangled...
If you have a spare minute, it shouldn't be hard to fix this. Just look=20=
at the OdocHandler funciton in tkMacOSXHLEvent.c. Otherwise, I will get=20=
to it sometime.
On Friday, March 22, 2002, at 10:23 AM, Jason Sonnenschein wrote:
> Hi all,
> I got a bundle set up under OS X, such that you double-click the app=20=
> and mactk
> comes up running my tk script, and such that double-clicking a =
> by the tk app will make it run, but... the application comes up=20
> without the
> document loaded. This application was already developed to auto-load=20=
> under Classic MacOS... it also knows to load documents it gets on the
> command-line (for the unix folks.) Any ideas if/how the name of the=20=
> is received by mactk under OS X?
> Do You Yahoo!?
> Yahoo! Movies - coverage of the 74th Academy Awards=C6
> Tcl-mac mailing list
Jim Ingham jingham@...
Developer Tools - gdb