[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

Re: [MacPerl] AppleEvents with remote addresses



At 21.36 -0500 1999.08.05, Cameron Ashby wrote:
>I've been working with the various Mac packages with mostly good results.
>I've had good success using Mac::OSA to precompile scripts, which is a nice
>performance boost over doAppleScript.  Unless I have a breakthrough (very)
>soon, that's the version that's going to my client.

Have you tried Mac::OSA::Simple?  You don't have to use it -- it doesn't do
anything Mac::OSA doesn't do, just offers shortcuts -- I am just curious as
to whether or not anyone is using it, and with what degree of success.

>One of my requirements is no user interaction, so the chooser isn't really
>going to work.

Right.


>I'm able to pack a PPC address in such a way that it no longer complains of
>"malformed PPCPortRec", but now it's angry about my LocationKindSelector.
>I'm assuming that the data structure is misaligned somehow.  I've included
>some code below.  What It produces doesn't look like what the chooser returns
>in Perl, but does look like what it returns in C.  Suggestions would be
>appreciated.

I'm going to take a look.


>I'm also thinking about starting work on an interface to PPCToolbox.h, where
>the issue would get taken care of using typemaps.  That would be totally new
>ground for me, and probably not a small job.  Can anyone guess at the time
>investment to within an order of magnitude?  Is it possible/reasonable to do
>it with nothing but MPW, or do I need to pay for an environment?

See Arved's excellent XS and SWIG tutorials at
http://www.macperl.com/depts/Tutorials/.  The short answer is Yes.  You may
wish to join the macperl-modules list, where sometimes more discussion of
such matters takes place (http://www.macperl.org/).


>> Now, PPC addresses don't work with Mac::Glue or
>> Mac::AppleEvents::Simple (yet, it is on my TODO list), but they work
>> fine with Mac::AppleEvents, once you get them.
>>
>
>I browsed through Mac::AppleEvents::Simple, and found a dependancy on
>typeApplSignature, so I had been using Mac::AppleEvents anyway.  I had no
>trouble getting it to work locally.

Yes, I haven't yet bothered allowing other types of targets, since other
types of targets aren't yet very useful.  But it is on my TODO list.  I
will probably have the third parameter be a app signature or a hashref, so
you could do:

    do_event($class, $id, {$type => $address}, $format, @params);


>Do the do_event and  AEBuildAppleEvent calls flatten and unflatten the data
>structure behind the scenes somehow?  It looks like that's what's going on.

What do you mean by "unflatten"?  I am not sure anything substantive is
happening to the data behind the scenes.

Anyway, I hope to look at your code later today.  I'd also like Matthias'
input ... I know he is busy, but perhaps an effort to duplicate
functionality in MacPerl (even though that functionality is broken
currently) should be coordinated with him.  I hate to see wasted effort.
On the other hand, this kind of thing is sorta fun.  :)

-- 
Chris Nandor          mailto:pudge@pobox.com         http://pudge.net/
%PGPKey = ('B76E72AD', [1024, '0824090B CE73CA10  1FF77F13 8180B6B6'])

===== Want to unsubscribe from this list?
===== Send mail with body "unsubscribe" to macperl-request@macperl.org