[Pythonmac-SIG] package structure for OSA interfaces

Jack Jansen Jack.Jansen@oratrix.nl
Wed, 23 Jan 2002 23:08:00 +0100


On Wednesday, January 23, 2002, at 07:15  PM, Jacob Kaplan-Moss wrote:
> Python OSA uses "start" as the function to activate an 
> application, but I've come across a few applications which use 
> start themselves as a function.  THe StdSuites definition of 
> "start" shaddows the application's function in these cases.  
> How about changing "start" to "activate"?  That's what 
> AppleScript calls the same function anyway; it seems more clear 
> to me.

Hmm, good one! (Or actually "bad one":-)

Although I think the shadowing happens the other way around: 
start() isn't defined in StdSuites but in aetools.TalkTo, which 
is the very last in the base class list.

And while aetools.TalkTo.start() has a completely different 
implementation than StdSuites.Appletalk_Suite_Events.activate() 
I think you're right in saying they're equivalent. Hmm, no, 
they're not: activate() will always bring the target to the 
foreground, start() will not.

I'll rename TalkTo.start() to _start(), so there's no problem 
with appsuite.start() overriding TalkTo.start() anymore (which 
makes TalkTo.__init__(self, start=1) fail).

I'll add a TalkTo.start() which calls TalkTo._start() for compatibility.

How does this sound?
--
- 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 -