GUSI Emulation

| | Comments (0)
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:" );'

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)

Leave a comment

<pudge/*> (pronounced "PudgeGlob") is thousands of posts over many years by Pudge.

"It is the common fate of the indolent to see their rights become a prey to the active. The condition upon which God hath given liberty to man is eternal vigilance; which condition if he break, servitude is at once the consequence of his crime and the punishment of his guilt."

About this Entry

This page contains a single entry by pudge published on October 8, 2002 7:56 PM.

A Little More was the previous entry in this site.

Looting is the next entry in this site.

Find recent content on the main index or look in the archives to find all content.