Mac::AppleEvents, Now With Special Sauce

| | Comments (0)
One of the porting problems I ran into was that vAEBuild and friends now have an optional second parameter (put in between the first and formerly second parameter) for syntax errors in the format string. I've decided (for now) to plop that extra information into $@. This sort of thing can really come in handy when trying to write those AEGizmos strings.

use Mac::AppleEvents;
use Mac::Errors;
$e = AEBuildAppleEvent(qw(aevt odoc sign MACS), -1, 0, "asdasd");
print "$Mac::Errors::MacError: $@" if $!;
__END__
 
AEBuildDesc and friends detected a syntax error: Missing ":" after keyword in record at character 6

And:

use Mac::AppleEvents;
use Mac::Errors;
$e = AEBuildAppleEvent(qw(aevt odoc sign MACS), -1, 0,
    q"'----':obj { want:type(cobj), from:null(), form:enum(name), seld:TEXT(@)",
    "Orr:"
);
print "$Mac::Errors::MacError: $@" if $!;
__END__
 
AEBuildDesc and friends detected a syntax error: Expected "," or "}" at character 72

Now Playing: I'm Forgettable - Brak (Brak Presents The Brak Album)

use.perl.org

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 December 5, 2002 8:32 PM.

Mac::AppleEvents, Mostly Working was the previous entry in this site.

Mac::AppleEvents Working More is the next entry in this site.

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