Re: watch_activations.py not working.
Re: watch_activations.py not working.
- Subject: Re: watch_activations.py not working.
- From: Lars-Johan Liman <email@hidden>
- Date: Wed, 09 Apr 2014 15:53:04 +0200
email@hidden:
> Jeremy, all,
> ...
> Your brilliant hack "watch_activations.py" did wonders for me, problem
> solved.
> ...
> % python bin/watch_activations.py
> Traceback (most recent call last):
> File "bin/watch_activations.py", line 19, in <module>
> nc.addObserver_selector_name_object_(ob, "appActivated:", NSWorkspaceDidActivateApplicationNotification, ws)
> NameError: name 'NSWorkspaceDidActivateApplicationNotification' is not defined
> %
> I've traced this to
> /System/Library/Frameworks/Python.framework/Versions/2.6/Extras/lib/python/PyObjC/AppKit/PyObjC.bridgesupport
> ...
> Is there any way to get this hack back to working condition under Mac OS
> X 10.6.8?
Well, there is a way that $works for a really bad value of $works, which
is to edit the file and add the name back in. The binary support seems
to still be there. It does indeed work. But editing system files that
deep into the structure is not my favourite pastime, and I don't really
know what side effects I may have caused, so I'm still looking for The
Right Way(TM).
In case anyone is even more panicked than I am, here's a patch for
/System/Library/Frameworks/Python.framework/Versions/2.6/Extras/lib/python/PyObjC/AppKit/PyObjC.bridgesupport
Don't do this lightly. You're meddling with system files and it's likely
to be overwritten next upgrade.
And yes, I'll supply brown bags ... :-P
If I could just figure out _why_ it was removed and the entire
bridgesupport revamped ... sigh.
Cheers,
/Liman
--- PyObjC.bridgesupport.DIST 2010-12-03 23:44:49.000000000 +0100
+++ PyObjC.bridgesupport 2014-04-09 15:45:38.000000000 +0200
@@ -867,6 +867,8 @@
<constant name='NSWorkspaceDecompressOperation' type='@' />
<constant name='NSWorkspaceDecryptOperation' type='@' />
<constant name='NSWorkspaceDestroyOperation' type='@' />
+ <constant name='NSWorkspaceDidActivateApplicationNotification' type='@' />
+ <constant name='NSWorkspaceDidDeactivateApplicationNotification' type='@' />
<constant name='NSWorkspaceDidLaunchApplicationNotification' type='@' />
<constant name='NSWorkspaceDidMountNotification' type='@' />
<constant name='NSWorkspaceDidPerformFileOperationNotification' type='@' />
_______________________________________________
Do not post admin requests to the list. They will be ignored.
X11-users mailing list (email@hidden)
This email sent to email@hidden