[Pythonmac-SIG] Re: Found my OSA problem !

Alexandre Parenteau aparente@adobe.com
Thu, 24 Oct 2002 16:41:05 -0700


Jack,

First of all I could reproduce this behavior on all the machines I have
which run OSX Jaguar.

>>         dirobj = ae.AEGetParamDesc('----', '****')

This fails for me (i.e. An error is thrown, of type : no such param): there
is *no* '----' param in the event returned by metrowerks (for my test I do a
send a 'make project' to MW, and I intentionally introduced a spelling error
in one of the files .c of the .mcp project).

*Instead*, what I see is is a 'errn' param ! If I understand it correctly,
Metrowerks was returning, on earlier OS, something which look like a '----'
param, which is a list of param, and has one unique param when an error
occurred named 'errn'. But now I get only the later.

Does it make more sense ? You should have this problem too BTW, as I found
it to be consistent and happening with fullbuild.py.

How to reproduce : 

- Inject an error in MacPython (any .c would do)
- Use fullbuild.py
- The error is not reported by fullbuild.py (2.3 or 2.2)

Alex.

> On donderdag, oktober 17, 2002, at 08:20 , Alexandre Parenteau wrote:
> 
>> Jack,
>> 
>> I've been telling you over and over I had some AppleScript
>> problems, events
>> not returning. For example I use Make_Project of CodeWarrior.
>> Metrowerks_Shell_Suite.py, and it never returned an error when
>> the project
>> was failing.
> 
> Alexandre,
> I don't understand why your change would work. The login of
> aetools.unpackevent is as follows
> def unpackevent():
> if there is a ---- direct object parameter:
> unpack it into parameters[----]
> while we've missed any other parameters:
> unpack these by name into parameters
> for all attributes we know about:
> if the attribute is present:
> unpack it into attributes
> 
> Your extra code (if there's no ---- direct object) handles a
> case that is already handled by the while loop just below....
> 
> Could you pack up a python script plus CodeWarrior 7.2 project
> that demonstrates your problem? Please state the problem exactly
> (i.e. Expected behaviour: xxxx Observed behaviour: xxxx).
> 
>> 
>> The solution came for me around the aetools.unpackevent:
>> 
>>     try:
>>         dirobj = ae.AEGetParamDesc('----', '****')
>>     except AE.Error:
>>         pass
>>     else:
>>         parameters['----'] = unpack(dirobj, formodulename)
>>         del dirobj
>> 
>> If I understand correctly, it is expected there is an event of
>> type '----'
>> to return an error. Well, maybe it used to, but not anymore for me on
>> Jaguar. Instead, I get directly the 'errn' event coming back.
>> So I changed
>> the code this way :
>> 
>>    try:
>>         dirobj = ae.AEGetParamDesc('----', '****')
>>     except AE.Error:
>>         try:
>>             keyword, dirobj = ae.AEGetNthDesc(1, '****')
>>         except AE.Error:
>>             pass
>>         else:
>>             parameters[keyword] = unpack(dirobj, formodulename)
>>     else:
>>         parameters['----'] = unpack(dirobj, formodulename)
>>         del dirobj
>> 
>> Note I don't like this code, may be I should use AECountItems.
>> 
>> Anyway, that was the source of my problem. How come you don't
>> experience
>> that ??? I don't understand ! Why the returned event suddenly
>> changed from
>> '----' (and then 'errn' inside the AEList) to directly 'errn' ?
>> 
>> Anyway, if it could make it for 2.2.2, I want to emphasize that without
>> this, I don't have CodeWarrior.CodeWarrior functional (tested
>> on CW 7.1,
>> 7.2, 8.0, 8.1, 8.2, Py2.2.1, Py2.3a0, re-generating
>> CodeWarrior.CodeWarrior
>> or not).
>> 
>> Alex.
>> 
>> --
>> Alexandre Parenteau
>> Computer Scientist
>> Core Technologies, AGM
>> Adobe Systems, Inc.
>> 408-536-6166
>> 
> --
> - Jack Jansen        <Jack.Jansen@oratrix.com>
> http://www.cwi.nl/~jack -
> - If I can't dance I don't want to be part of your revolution --
> Emma Goldman -
> 

-- 
Alexandre Parenteau
Computer Scientist
Core Technologies, AGM
Adobe Systems, Inc.
408-536-6166