[Pythonmac-SIG] Re. [ann] AppScripting 0.1.0

has hengist.podd at virgin.net
Fri Nov 21 14:03:47 EST 2003

Ronald wrote:

>>I'm still curious here about how introspection is being used, and 
>>to what purpose? Anyone shed some light for me? I suspect 
>>introspecting AS wouldn't do you much good anyway; better to read 
>>the docs to learn what's going on. Though knowing what you're 
>>looking for'd give me a better idea.
>Introspection would be usefull in an IDE-style environment 
>(class-browser, completion).

So the issue is development rather than runtime related, yes?


It'll be straightforward to write an ApplicationObjectModelBrowser 
module that lets users explore a live application's object model 
interactively - travelling up and down the object tree, viewing 
elements and properties as they go.

Also a DictionaryObjectModelBrowser that lets users browse a 
'generic' object model that's constructed on-the-fly according to the 
containment rules given in the aete. (This is what you'd need to 
support autocompletion, btw, as it'll let you construct references to 
application objects that don't exist yet.)

Implementing this stuff on top of AppScripting rather than baking it 
in will let me keep AS focussed on fully and accurately modelling the 
OSA interface, which is the most important bit. (With respect to Bob, 
the impression I have from previous conversations is that he's less 
interested in supporting OSA features than in creating something that 
behaves strictly by familiar, standard Python rules - even if it 
means losing OSA functionality as a result.)

>The IDE could be taught about how to fetch the necessary information 
>for applescript interfaces, but using the usual introspection 
>features is much more convenient.

Would it be possible to spoof an IDE's class browser by overriding 
stuff like __dict__ with your own accessors? If I could provide these 
sorts of developer tools through existing class browsers instead of a 
custom GUI app it'd save me a fair bit of work, as well as let users 
do everything in their editors of choice - which'd be cool. Thoughts?



More information about the Pythonmac-SIG mailing list