[PYTHONMAC-SIG] Re: 'alis' in AppleEvent

Doug Wyatt doug@sonosphere.com
Mon, 16 Jun 1997 01:50:10 -0400


Oops, I answered my own question.

The Precompile command requires a "Save_As" (alis) second argument.  The
trouble is that I can make an FSSpec of a file that does not exist yet, but
I get a -43 error when I try to make an alias out of that FSSpec.  I've
worked around this for now so it's not a big deal.

Doug



~~~~~~~~~~~~~~~~~~~~~~~~~

Hello,

I'm trying to script CodeWarrior Pro 1's Precompile command, which takes an
'alis' as a direct argument.  I have "path" which a full path to the source
file as a string, and have tried various things like:

	from macfs import *

	def MakeAlias(f):
		fs = FSSpec(f)
		return fs.NewAlias()

	class CodeWarrior(aetools.TalkTo,
		MWPro1_ShellSuite.Metrowerks_Shell_Suite, etc):

		def DoPrecompile(self, path):
			self.Precompile(MakeAlias(path)) # error -1701
			self.Precompile(path) # error -1701 I think it was

The errors are coming in the AppleEvent return values.  It looks like I
haven't figured out how to give CW the right type of argument.

I'm not terribly knowledgeable about AppleEvents and even less so about how
they work in Python.   But I'm willing to dig into this further and could
use a tip about where to start looking at what the problem is.  How and
where do various Python data types get converted into the right AEDesc
types?

Thanks in advance.

Doug


---
Doug Wyatt                      music [,] software
doug@sonosphere.com             http://www.sonosphere.com/
new streaming audio samples:    http://www.sonosphere.com/doug/music.html



_______________
PYTHONMAC-SIG  - SIG on Python for the Apple Macintosh

send messages to: pythonmac-sig@python.org
administrivia to: pythonmac-sig-request@python.org
_______________