From: Philip A. <ph...@vc...> - 2003-04-10 04:46:41
|
On Sunday, Apr 6, 2003, at 23:20 America/Vancouver, Bernard Desgraupes wrote: Hello Bernard, > concerning tclgestalt, the correct call from Tcl is just: > package require gestalt This is working from Terminal but not from TclOSA just yet. The main interpreter is absolutely minimal at this point though because 'info library' says that there is no such item. However in TclOSA, $tclDefaultLibrary provides the correct path whereas in Terminal it doesn't exist: [~] % tclsh [/philip] % info library /Library/Frameworks/Tcl.framework/Resources/Scripts [/philip] % set dlib $tclDefaultLibrary can't read "tclDefaultLibrary": no such variable [/philip] % > I just checked it again, on OS9 and OSX, from Wish and from Alpha. It > loads immediately. I have recently rebuilt this extension (to > precisely clarify this aspect, with the experience I had gained with > other projects). Do you have something recent ? Here they are, just in > case: shlib for Classic > http://webperso.easyconnect.fr/bdesgraupes/Downloads/ > GestaltTclLib_Classic.hqx > dylib for OSX > http://webperso.easyconnect.fr/bdesgraupes/Downloads/ > GestaltTclLib_OSX.hqx I'm using "GestaltTclLib_OSX_1.0.sit". Also in Terminal (from a fresh session) I enter: [~] % tclsh [/philip] % package require tclAE 2.0 [/philip] % package names http gestalt parser tbcload tclAE tclAppleScript tcltest opt msgcat compiler Tcl [/philip] % I'm not expecting that. And it's horribly slow. In the TclOSA Carbon app example I've built (it's not a shell) I enter: load [file join ~/Library/Tcl/tclAE2.0/Contents/MacOS/tclAE2.0.dylib] package names -->tclAE AppleScriptComponent Tcl and tclAE now loads very quickly ("AppleScriptComponent" is the new name for the variant of tclApplescript built into TclOSA). Moreover in TclOSACarbonApp I enter: load [file join $tclDefaultLibrary tclgestalt1.0 tclgestalt1.0.dylib] couldn't find procedure Tclgestalt_Init ? > BTW I also have a few questions I wanted to ask since your > announcement of the TclOSA component (which is a very exciting > project). I have written one year ago an OSAlanguage editor called > ScriptLab which aimed at being a multi OSA components editor. Due to > lack of time, I did not finish it but as an AppleScript editor it > works fine: it reads dictionaries, reports the flow of AE's in its > console, compiles/decompiles, executes, handles all kinds of flags. I > wanted to write a debugger as well but this is still to be done. Your > TclOSA component is a strong motivation for me to reactivate the > project. I think you could really fly with TclOSA as a base! Not to mention I could really use some feedback in the flags and context areas. > Here are my first questions: > - is TclOSA developed only for OSX or do you also support pre-OSX > (thng extension). I've been developing ScriptLab as a C++ carbon > project but I'm wondering now if it is worth the effort. It's OS X only. I expect the lowest OS compatible version will be something like 10.2.3 (the lowest version that System Events 1.2 is available on??). The sample app is a Project Builder Carbon app. There is a CW Carbon project as well. There are currently no Tcl includes in the applications. They are intended to illustrate how to take advantage of Tcl without having to think about the C details. I will be attempting an AppleScript Studio (i.e. could be Cocoa) sample app as well. > - which part or the OSA api do you support ? (kOSASupportsCompiling, > kOSASupportsAESending, kOSASupportsRecording etc) Compiling, GetSource, and a limited form of CoerceFrom/To are already supported. I have stubs for all the others and will get around to them eventually. The Convenience ones will be in for sure in the first beta release since they are just wrappers around already implemented features. Right now Recording and Debugging are handled by passing them through to the AppleScript component). In addition, there will be some custom selectors for applications such as yours which will be more direct and faster than the AEDesc requirements. Like CFStringRef or Tcl_DString output. I had the first glimpse of success at a Tcl script applet handling dropped items a few hours ago and I expect to be handling the other ones (DoScript e.g) as well. > PS I'm wondering if JavaScriptOSA has been ported to OSX. I think so (80% sure). If have need of it, I believe I could provide an option to load that component as well. It would be a preference. Philip Aker http://www.aker.ca |