Stories
Slash Boxes
Comments
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

use Perl Log In

Log In

[ Create a new account ]

pudge (1)

pudge
  (email not shown publicly)
http://pudge.net/
AOL IM: Crimethnk (Add Buddy, Send Message)

I run this joint, see?

Journal of pudge (1)

Tuesday October 08, 2002
09:56 PM

GUSI Emulation

[ #8256 ]

I did some more work on GUSI emulation, and with the help of Dan Sugalski on some, um, good practices with C, and a few words from Matthias, I was able to get most of it done. I have GUSIPath2FSp, GUSIFSp2FullPath, and GUSIFSp2Encoding being emulated properly (more or less), and have GUSIFSpUp and GUSIFSpDown yet to do.

There are a few functions that do not pass their paths through GUSI routines before sending them to Carbon. For now, these routines (such as NewAliasMinimalFromFullPath) will require Mac-style paths; all other routines will accept Unix-style paths, and return Unix-style paths. Witness the bizarre:

$ perl -MMac::Files -le 'print scalar ResolveAlias NewAliasMinimalFromFullPath("Bird:tmp:perl:macos:");'
/Volumes/Bird/tmp/perl/ma cos

On the relative path front, it's interesting to note that by switching to Unix-style paths, I went with FSPathMakeRef, which seems to automatically handles relative paths, aliases, etc. Nifty.

I played around more with Notification; it is a little bit hampered, I think, in that it is designed to work with the current application. perl is not an application. It doesn't have an icon in the Dock to bounce. It'd be nice if I could find a way to bounce the icon of an arbitrary application, or maybe the parent application.

In Notification.t, the basic logic is to wait until the current process is not the front process. Well, similarly, perl is the current process, but is never the front process. The processLauncher parameter, though, tells us perl's parent (which in my tests, can be either Terminal or BBEdit), and then I can use that process number for the logic, and automatically grab the name (processName) of the process while I am at it. So when you run it, it'll say "Please switch $name to the background".

And now when I run Processes.t, I get Unix-style paths for the processAppSpec parameter. Wow. Blows my mind, man.

Now Playing: Doggin' around - Jackie Wilson (The Very Best Of Jackie Wilson)

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
 Full
 Abbreviated
 Hidden
More | Login | Reply
Loading... please wait.