[PyObjC-svn] r2174 - in trunk/pyobjc/pyobjc-framework-WebKit: . Doc Examples/IEWebArchive Examples/IEWebArchive/MHTDocument~.nib Examples/PyDocURLProtocol Examples/WebKitInterpreterPlugin Exceptions Lib Lib/JavaScriptCore Lib/WebKit PyObjCTest
[email protected] Tue, 21 Apr 2009 14:08:39 -0500
Newsgroups
gmane.comp.python.pyobjc.cvs
Message-ID
<[email protected] >
Author: ronaldoussoren
Date: Tue Apr 21 14:08:38 2009
New Revision: 2174
Log:
* Update version to 2.2b2
* Implement tests for the WebKit bindings
* Do not implement tests for JavaScriptCore
* Ensure examples work with PyObjC 2.2
Added:
trunk/pyobjc/pyobjc-framework-WebKit/Doc/
trunk/pyobjc/pyobjc-framework-WebKit/Doc/api-notes-JavaScriptCore.txt
trunk/pyobjc/pyobjc-framework-WebKit/Doc/api-notes-WebKit.txt
trunk/pyobjc/pyobjc-framework-WebKit/Examples/IEWebArchive/python-home.mht
trunk/pyobjc/pyobjc-framework-WebKit/Lib/JavaScriptCore/PyObjC.bridgesupport
trunk/pyobjc/pyobjc-framework-WebKit/Lib/WebKit/PyObjC.bridgesupport
trunk/pyobjc/pyobjc-framework-WebKit/PyObjCTest/test_carbonutils.py (contents, props changed)
trunk/pyobjc/pyobjc-framework-WebKit/PyObjCTest/test_domattr.py (contents, props changed)
trunk/pyobjc/pyobjc-framework-WebKit/PyObjCTest/test_domcssprimitivevalue.py (contents, props changed)
trunk/pyobjc/pyobjc-framework-WebKit/PyObjCTest/test_domcssrule.py (contents, props changed)
trunk/pyobjc/pyobjc-framework-WebKit/PyObjCTest/test_domcssvalue.py (contents, props changed)
trunk/pyobjc/pyobjc-framework-WebKit/PyObjCTest/test_domdocument.py (contents, props changed)
trunk/pyobjc/pyobjc-framework-WebKit/PyObjCTest/test_domelement.py (contents, props changed)
trunk/pyobjc/pyobjc-framework-WebKit/PyObjCTest/test_domevent.py (contents, props changed)
trunk/pyobjc/pyobjc-framework-WebKit/PyObjCTest/test_domeventexception.py (contents, props changed)
trunk/pyobjc/pyobjc-framework-WebKit/PyObjCTest/test_domeventtarget.py (contents, props changed)
trunk/pyobjc/pyobjc-framework-WebKit/PyObjCTest/test_domexception.py (contents, props changed)
trunk/pyobjc/pyobjc-framework-WebKit/PyObjCTest/test_domhtmlareaelement.py (contents, props changed)
trunk/pyobjc/pyobjc-framework-WebKit/PyObjCTest/test_domhtmlbuttonelement.py (contents, props changed)
trunk/pyobjc/pyobjc-framework-WebKit/PyObjCTest/test_domhtmldirectoryelement.py (contents, props changed)
trunk/pyobjc/pyobjc-framework-WebKit/PyObjCTest/test_domhtmldlistelement.py (contents, props changed)
trunk/pyobjc/pyobjc-framework-WebKit/PyObjCTest/test_domhtmlelement.py (contents, props changed)
trunk/pyobjc/pyobjc-framework-WebKit/PyObjCTest/test_domhtmlframeelement.py (contents, props changed)
trunk/pyobjc/pyobjc-framework-WebKit/PyObjCTest/test_domhtmlhrelement.py (contents, props changed)
trunk/pyobjc/pyobjc-framework-WebKit/PyObjCTest/test_domhtmlimageelement.py (contents, props changed)
trunk/pyobjc/pyobjc-framework-WebKit/PyObjCTest/test_domhtmlinputelement.py (contents, props changed)
trunk/pyobjc/pyobjc-framework-WebKit/PyObjCTest/test_domhtmllinkelement.py (contents, props changed)
trunk/pyobjc/pyobjc-framework-WebKit/PyObjCTest/test_domhtmlmenuelement.py (contents, props changed)
trunk/pyobjc/pyobjc-framework-WebKit/PyObjCTest/test_domhtmlobjectelement.py (contents, props changed)
trunk/pyobjc/pyobjc-framework-WebKit/PyObjCTest/test_domhtmlolistelement.py (contents, props changed)
trunk/pyobjc/pyobjc-framework-WebKit/PyObjCTest/test_domhtmloptgroupelement.py (contents, props changed)
trunk/pyobjc/pyobjc-framework-WebKit/PyObjCTest/test_domhtmloptionelement.py (contents, props changed)
trunk/pyobjc/pyobjc-framework-WebKit/PyObjCTest/test_domhtmlscriptelement.py (contents, props changed)
trunk/pyobjc/pyobjc-framework-WebKit/PyObjCTest/test_domhtmlselectelement.py (contents, props changed)
trunk/pyobjc/pyobjc-framework-WebKit/PyObjCTest/test_domhtmlstyleelement.py (contents, props changed)
trunk/pyobjc/pyobjc-framework-WebKit/PyObjCTest/test_domhtmltablecellelement.py (contents, props changed)
trunk/pyobjc/pyobjc-framework-WebKit/PyObjCTest/test_domhtmltextareaelement.py (contents, props changed)
trunk/pyobjc/pyobjc-framework-WebKit/PyObjCTest/test_domhtmlulistelement.py (contents, props changed)
trunk/pyobjc/pyobjc-framework-WebKit/PyObjCTest/test_domimplementation.py (contents, props changed)
trunk/pyobjc/pyobjc-framework-WebKit/PyObjCTest/test_domkeyboardevent.py (contents, props changed)
trunk/pyobjc/pyobjc-framework-WebKit/PyObjCTest/test_dommouseevent.py (contents, props changed)
trunk/pyobjc/pyobjc-framework-WebKit/PyObjCTest/test_dommutationevent.py (contents, props changed)
trunk/pyobjc/pyobjc-framework-WebKit/PyObjCTest/test_domnode.py (contents, props changed)
trunk/pyobjc/pyobjc-framework-WebKit/PyObjCTest/test_domnodefilter.py (contents, props changed)
trunk/pyobjc/pyobjc-framework-WebKit/PyObjCTest/test_domnodeiterator.py (contents, props changed)
trunk/pyobjc/pyobjc-framework-WebKit/PyObjCTest/test_domoverflowevent.py (contents, props changed)
trunk/pyobjc/pyobjc-framework-WebKit/PyObjCTest/test_domrange.py (contents, props changed)
trunk/pyobjc/pyobjc-framework-WebKit/PyObjCTest/test_domrangeexception.py (contents, props changed)
trunk/pyobjc/pyobjc-framework-WebKit/PyObjCTest/test_domstylesheet.py (contents, props changed)
trunk/pyobjc/pyobjc-framework-WebKit/PyObjCTest/test_domtreewalker.py (contents, props changed)
trunk/pyobjc/pyobjc-framework-WebKit/PyObjCTest/test_domuievent.py (contents, props changed)
trunk/pyobjc/pyobjc-framework-WebKit/PyObjCTest/test_domwheelevent.py (contents, props changed)
trunk/pyobjc/pyobjc-framework-WebKit/PyObjCTest/test_domxpathexception.py (contents, props changed)
trunk/pyobjc/pyobjc-framework-WebKit/PyObjCTest/test_domxpathresult.py (contents, props changed)
trunk/pyobjc/pyobjc-framework-WebKit/PyObjCTest/test_javascriptcore.py (contents, props changed)
trunk/pyobjc/pyobjc-framework-WebKit/PyObjCTest/test_webarchive.py (contents, props changed)
trunk/pyobjc/pyobjc-framework-WebKit/PyObjCTest/test_webbackforwardlist.py (contents, props changed)
trunk/pyobjc/pyobjc-framework-WebKit/PyObjCTest/test_webdatasource.py (contents, props changed)
trunk/pyobjc/pyobjc-framework-WebKit/PyObjCTest/test_webdocument.py (contents, props changed)
trunk/pyobjc/pyobjc-framework-WebKit/PyObjCTest/test_webeditingdelegate.py (contents, props changed)
trunk/pyobjc/pyobjc-framework-WebKit/PyObjCTest/test_webframeloaddelegate.py (contents, props changed)
trunk/pyobjc/pyobjc-framework-WebKit/PyObjCTest/test_webframeview.py (contents, props changed)
trunk/pyobjc/pyobjc-framework-WebKit/PyObjCTest/test_webhistory.py (contents, props changed)
trunk/pyobjc/pyobjc-framework-WebKit/PyObjCTest/test_webhistoryitem.py (contents, props changed)
trunk/pyobjc/pyobjc-framework-WebKit/PyObjCTest/test_webjavaplugin.py (contents, props changed)
trunk/pyobjc/pyobjc-framework-WebKit/PyObjCTest/test_webkiterrors.py (contents, props changed)
trunk/pyobjc/pyobjc-framework-WebKit/PyObjCTest/test_webplugin.py (contents, props changed)
trunk/pyobjc/pyobjc-framework-WebKit/PyObjCTest/test_webpluginviewfactory.py (contents, props changed)
trunk/pyobjc/pyobjc-framework-WebKit/PyObjCTest/test_webpolicydelegate.py (contents, props changed)
trunk/pyobjc/pyobjc-framework-WebKit/PyObjCTest/test_webpreferences.py (contents, props changed)
trunk/pyobjc/pyobjc-framework-WebKit/PyObjCTest/test_webresourceloaddelegate.py (contents, props changed)
trunk/pyobjc/pyobjc-framework-WebKit/PyObjCTest/test_webscriptobject.py (contents, props changed)
trunk/pyobjc/pyobjc-framework-WebKit/PyObjCTest/test_webuidelegate.py (contents, props changed)
trunk/pyobjc/pyobjc-framework-WebKit/PyObjCTest/test_webview.py (contents, props changed)
Removed:
trunk/pyobjc/pyobjc-framework-WebKit/Examples/IEWebArchive/MHTDocument~.nib/
trunk/pyobjc/pyobjc-framework-WebKit/Lib/JavaScriptCore/PyObjCOverrides.bridgesupport
trunk/pyobjc/pyobjc-framework-WebKit/Lib/WebKit/PyObjCOverrides.bridgesupport
Modified:
trunk/pyobjc/pyobjc-framework-WebKit/Examples/IEWebArchive/MHTDocument.py
trunk/pyobjc/pyobjc-framework-WebKit/Examples/IEWebArchive/loader.py
trunk/pyobjc/pyobjc-framework-WebKit/Examples/IEWebArchive/main.py
trunk/pyobjc/pyobjc-framework-WebKit/Examples/PyDocURLProtocol/PyDocBrowser.py
trunk/pyobjc/pyobjc-framework-WebKit/Examples/WebKitInterpreterPlugin/setup.py
trunk/pyobjc/pyobjc-framework-WebKit/Exceptions/JavaScriptCore.bridgesupport
trunk/pyobjc/pyobjc-framework-WebKit/Exceptions/WebKit.bridgesupport
trunk/pyobjc/pyobjc-framework-WebKit/Lib/ (props changed)
trunk/pyobjc/pyobjc-framework-WebKit/Lib/JavaScriptCore/__init__.py
trunk/pyobjc/pyobjc-framework-WebKit/setup.py
Modified: trunk/pyobjc/pyobjc-framework-WebKit/Examples/IEWebArchive/MHTDocument.py
==============================================================================
--- trunk/pyobjc/pyobjc-framework-WebKit/Examples/IEWebArchive/MHTDocument.py (original)
+++ trunk/pyobjc/pyobjc-framework-WebKit/Examples/IEWebArchive/MHTDocument.py Tue Apr 21 14:08:38 2009
@@ -1,7 +1,7 @@
from Cocoa import *
from loader import MHTLoader # XXX: integrate?
-class MHTDocument (NSObject):
+class MHTDocument (NSDocument):
locationbox = objc.IBOutlet()
webview = objc.IBOutlet()
Modified: trunk/pyobjc/pyobjc-framework-WebKit/Examples/IEWebArchive/loader.py
==============================================================================
--- trunk/pyobjc/pyobjc-framework-WebKit/Examples/IEWebArchive/loader.py (original)
+++ trunk/pyobjc/pyobjc-framework-WebKit/Examples/IEWebArchive/loader.py Tue Apr 21 14:08:38 2009
@@ -35,7 +35,7 @@
continue
filename = part.get('Content-Location')
- contentType = part.get_type()
+ contentType = part.get_content_type()
data = part.get_payload(decode=True)
self.parts[filename] = (contentType, data)
Modified: trunk/pyobjc/pyobjc-framework-WebKit/Examples/IEWebArchive/main.py
==============================================================================
--- trunk/pyobjc/pyobjc-framework-WebKit/Examples/IEWebArchive/main.py (original)
+++ trunk/pyobjc/pyobjc-framework-WebKit/Examples/IEWebArchive/main.py Tue Apr 21 14:08:38 2009
@@ -1,4 +1,10 @@
import MHTDocument
+import objc; objc.setVerbose(1)
+
+# XXX: Workaround for an issue
+# in py2app: this module is required
+# but isn't found by py2app by default.
+import email.iterators
from PyObjCTools import AppHelper
Modified: trunk/pyobjc/pyobjc-framework-WebKit/Examples/PyDocURLProtocol/PyDocBrowser.py
==============================================================================
--- trunk/pyobjc/pyobjc-framework-WebKit/Examples/PyDocURLProtocol/PyDocBrowser.py (original)
+++ trunk/pyobjc/pyobjc-framework-WebKit/Examples/PyDocURLProtocol/PyDocBrowser.py Tue Apr 21 14:08:38 2009
@@ -1,4 +1,4 @@
-from PyObjCTools import NibClassBuilder, AppHelper
+from PyObjCTools import AppHelper
import Foundation, AppKit, WebKit
from Foundation import *
@@ -10,8 +10,6 @@
PyDocURLProtocol.setup()
-NibClassBuilder.extractClasses('PyDocBrowser')
-
# the web browser doesn't have or need any code really
if __name__ == '__main__':
Modified: trunk/pyobjc/pyobjc-framework-WebKit/Examples/WebKitInterpreterPlugin/setup.py
==============================================================================
--- trunk/pyobjc/pyobjc-framework-WebKit/Examples/WebKitInterpreterPlugin/setup.py (original)
+++ trunk/pyobjc/pyobjc-framework-WebKit/Examples/WebKitInterpreterPlugin/setup.py Tue Apr 21 14:08:38 2009
@@ -22,6 +22,7 @@
)
setup(
+ name="WebKitInterpreter",
plugin = ["WebKitInterpreter.py"],
options = dict(py2app=dict(plist=plist)),
)
Modified: trunk/pyobjc/pyobjc-framework-WebKit/Exceptions/JavaScriptCore.bridgesupport
==============================================================================
--- trunk/pyobjc/pyobjc-framework-WebKit/Exceptions/JavaScriptCore.bridgesupport (original)
+++ trunk/pyobjc/pyobjc-framework-WebKit/Exceptions/JavaScriptCore.bridgesupport Tue Apr 21 14:08:38 2009
@@ -76,7 +76,7 @@
<retval type='^S' type64='^S' />
</function>
<function name='JSStringGetUTF8CString'>
- <arg index='1' numeric='false' type='*' type64='*' />
+ <arg index='1' type='t' type64='t' c_array_length_in_arg='2' c_array_length_in_retval='true' type_modifier='o' />
</function>
<function name='JSStringIsEqualToUTF8CString'>
<arg index='1' numeric='false' type='*' type64='*' />
Modified: trunk/pyobjc/pyobjc-framework-WebKit/Exceptions/WebKit.bridgesupport
==============================================================================
--- trunk/pyobjc/pyobjc-framework-WebKit/Exceptions/WebKit.bridgesupport (original)
+++ trunk/pyobjc/pyobjc-framework-WebKit/Exceptions/WebKit.bridgesupport Tue Apr 21 14:08:38 2009
@@ -367,6 +367,53 @@
<arg index='1' type=':' />
</method>
</class>
+ <class name='WebFrame'>
+ <method selector='globalContext'>
+ <retval type='^{OpaqueJSContext=}' />
+ </method>
+ </class>
+ <class name='WebHistory'>
+ <method selector='loadFromURL:error:'>
+ <arg index='1' null_accepted='true' type_modifier='o' />
+ </method>
+ <method selector='saveToURL:error:'>
+ <arg index='1' null_accepted='true' type_modifier='o' />
+ </method>
+ </class>
+ <class name='WebScriptObject'>
+ <method selector='JSObject'>
+ <retval type='^{OpaqueJSValue=}' />
+ </method>
+ </class>
+ <class name='NSObject'>
+ <method class_method='true' selector='isKeyExcludedFromWebScript:'>
+ <arg comment='string' index='0' type='r*' />
+ </method>
+ <method class_method='true' selector='isSelectorExcludedFromWebScript:'>
+ <arg index='0' type=':' />
+ </method>
+ <method selector='webPlugInCallJava:isStatic:returnType:method:arguments:callingURL:exceptionDescription:'>
+ <arg index='0' type='^{_jobject=}' />
+ <arg index='3' type='^{_jmethodID=}' />
+ <arg index='4' type='^(jvalue=CcSsiqfd^{_jobject})' />
+ <arg index='6' null_accepted='true' type_modifier='o' />
+ </method>
+ <method selector='webPlugInGetApplet'>
+ <retval type='^{_jobject=}' />
+ </method>
+ <method class_method='true' selector='webScriptNameForKey:'>
+ <arg comment='string' index='0' type='r*' />
+ </method>
+ <method class_method='true' selector='webScriptNameForSelector:'>
+ <arg index='0' type=':' />
+ </method>
+ <method selector='webView:doCommandBySelector:'>
+ <arg index='1' type=':' />
+ </method>
+ <method selector='webView:shouldPerformAction:fromSender:'>
+ <arg index='1' type=':' />
+ </method>
+ </class>
<class name='WebHistory'>
<method selector='loadFromURL:error:'>
<arg index='1' null_accepted='true' type_modifier='o' />
Modified: trunk/pyobjc/pyobjc-framework-WebKit/Lib/JavaScriptCore/__init__.py
==============================================================================
--- trunk/pyobjc/pyobjc-framework-WebKit/Lib/JavaScriptCore/__init__.py (original)
+++ trunk/pyobjc/pyobjc-framework-WebKit/Lib/JavaScriptCore/__init__.py Tue Apr 21 14:08:38 2009
@@ -6,6 +6,7 @@
'''
import objc as _objc
+from CoreFoundation import *
__bundle__ = _objc.initFrameworkWrapper("JavaScriptCore",
Modified: trunk/pyobjc/pyobjc-framework-WebKit/setup.py
==============================================================================
--- trunk/pyobjc/pyobjc-framework-WebKit/setup.py (original)
+++ trunk/pyobjc/pyobjc-framework-WebKit/setup.py Tue Apr 21 14:08:38 2009
@@ -18,7 +18,7 @@
setup(
name='pyobjc-framework-WebKit',
- version='2.0',
+ version='2.2b2',
description = "Wrappers for the framework WebKit on Mac OS X",
long_description = __doc__,
author='Ronald Oussoren',
------------------------------------------------------------------------------
Stay on top of everything new and different, both inside and
around Java (TM) technology - register by April 22, and save
$200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco.
300 plus technical and hands-on sessions. Register today.
Use priority code J9JMT32. http://p.sf.net/sfu/p