[Pythonmac-SIG] Handling bad dictionaries

Bob Ippolito bob at redivi.com
Thu Jan 15 04:53:38 EST 2004


On Jan 14, 2004, at 6:14 PM, Jack Jansen wrote:

> On 14-jan-04, at 17:50, has wrote:
>
>>
>> Looks like a bug in Safari's dictionary. Script Editor, etc. show the 
>> 'do JavaScript' command as:
>>
>> do JavaScript : Applies a string of JavaScript code to a document.
>> 	do JavaScript  reference -- the object for the command
>> 		in document -- The document that the JavaScript should be applied 
>> in.
>>
>> But it really ought to look something like:
>>
>> do JavaScript : Applies a string of JavaScript code to a document.
>> 	do JavaScript  string/unicode text -- the JavaScript to execute
>> 		in document -- The document that the JavaScript should be applied 
>> in.
>>
>> Typical clueless Cocoa app... grr.
>
> Do AppScripting and aeve have a way to deal with this situation? With 
> gensuitemodule it was easy: just hack the module after it was 
> generated, but for the new interfaces that won't work.
>
> It would be nice if there was a file or module somewhere that could 
> contain "edit instructions"  for dictionaries known to be faulty. The 
> easiest form is probably a file with instructions "if you read the 
> dictionary of app X ignore entry Y" and "if you read the dictionary of 
> app X please add entry Z" where Y is some identifier and Z is an 
> actual entry in some intermediate form used by aeve/AppScripting.

As far as aeve goes, you can modify the class and create whatever 
element/property descriptors you want after loading (but creating these 
is not particularly easy).  I would imagine AppScripting has similar 
capabilities.  A known database of faulty dictionaries is a good idea.

I had this same "edit instructions" idea for bundlebuilder.. a plist 
should sit on the internet somewhere that describes packages that 
require special options, such as including a dylib or forcing a whole 
package to be included so __file__ data loading works.  The dylib stuff 
is a solved problem with my macholib version of bundlebuilder (I should 
release these someday), but it still can't automagically include pygame 
because it needs a ttf file from the package.

-bob




More information about the Pythonmac-SIG mailing list