Commits

Bob Ippolito  committed 6565c5c

rephrase example

  • Participants
  • Parent commits fd79550
  • Branches pyobjc-ancient

Comments (0)

Files changed (4)

File Examples/00ReadMe.html

 Key-Value Coding and Cocoa Bindings. These scripts require Mac OS X 10.3 or
 later.</p>
 <ul>
+<li><a href="CocoaBindings/Bookmarks">Bookmarks</a><p>Shows custom array controller that implements table view data
+source methods to support drag and drop, including copying
+objects from one window to another, drop of URLs, and 
+re-ordering of the content array.</p>
+<p>Originally from <a href="http://homepage.mac.com/mmalc/CocoaExamples/controllers.html">Cocoa Bindings Examples and Hints</a>,
+converted to PyObjC by u.fiedler.</p>
+</li>
+</ul>
+<ul>
 <li><a href="CocoaBindings/ControlledPreferences">ControlledPreferences</a><p>Demonstrates how to use Cocoa Bindings to simplify storing and
 retrieving user preferences.  Also demonstrates how to use an
 <code><span>NSValueTransformer</span></code> to archive/unarchive a non-property-list
 </li>
 </ul>
 <ul>
-<li><a href="CocoaBindings/TemperatureTransformer">TemperatureTransformer</a><p>An example that uses NSValueTransformer to convert between Celsius
+<li><a href="CocoaBindings/TemperatureTransformer">TemperatureTransformer</a><p>An example that uses <code><span>NSValueTransformer</span></code> to convert between Celsius
 and Fahrenheit.</p>
 <p>Based on Apple's <a href="http://developer.apple.com/documentation/Cocoa/Conceptual/ValueTransformers/index.html">Value Transformers</a> documentation,
 converted to PyObjC by u.fiedler.</p>
 </li>
 </ul>
+<ul>
+<li><a href="CocoaBindings/ToDos">ToDos</a><p>Shows two array controllers, one to manage the contents of a table
+view, the other to manage a pop-up menu in a table column. Also 
+shows two value transformers to alter the color of text.</p>
+<p>Originally from <a href="http://homepage.mac.com/mmalc/CocoaExamples/controllers.html">Cocoa Bindings Examples and Hints</a>,
+converted to PyObjC by u.fiedler.</p>
+</li>
+</ul>
+<h2><a name="inject">Inject</a></h2>
+<p>The directory <a href="Inject">Inject</a> contains a number of examples that use the
+<code><span>objc.inject</span></code> facility to inject code into another process.  These
+examples require Mac OS X 10.3 or later.</p>
+<ul>
+<li><a href="Inject/IDNSnitch">IDNSnitch</a><p>A proof of concept <a href="http://bob.pythonmac.org/archives/2005/02/07/idn-spoofing-defense-for-safari/">IDN spoofing defense</a> for Safari (tested with
+v1.2.4 on Mac OS X 10.3.8).  Demonstrates how to write an application
+that detects the launch of another application by bundle identifier,
+how to use <code><span>objc.inject</span></code> to load code into another application,
+how to override the implementation of an existing class but still
+call back into the original implementation, and how to reduce the
+size of such an application/plugin combination by using symlinks
+to share object files (the PyObjC extensions in this case).</p>
+</li>
+</ul>
+<ul>
+<li><a href="Inject/InjectInterpreter">InjectInterpreter</a>:<p>Shows how to inject an in-process Python interpreter into another
+process.  Based on the AppKit PyInterpreter example.</p>
+</li>
+</ul>
 <h2><a name="opengl">OpenGL</a></h2>
 <p>The directory <a href="OpenGL">OpenGL</a> contains a number of examples that use OpenGL with
 a Cocoa UI.  These examples also require <a href="http://pyopengl.sourceforge.net/">PyOpenGL</a>.</p>

File Examples/00ReadMe.txt

 
 .. __: CocoaBindings
 
+* `Bookmarks`_
+
+  Shows custom array controller that implements table view data
+  source methods to support drag and drop, including copying
+  objects from one window to another, drop of URLs, and 
+  re-ordering of the content array.
+
+  Originally from `Cocoa Bindings Examples and Hints`_,
+  converted to PyObjC by u.fiedler.
+
+.. _`Bookmarks`: CocoaBindings/Bookmarks
+
 * `ControlledPreferences`_
   
   Demonstrates how to use Cocoa Bindings to simplify storing and
 .. _`TemperatureTransformer`: CocoaBindings/TemperatureTransformer
 .. _`Value Transformers`: http://developer.apple.com/documentation/Cocoa/Conceptual/ValueTransformers/index.html
 
+* `ToDos`_
+
+  Shows two array controllers, one to manage the contents of a table
+  view, the other to manage a pop-up menu in a table column. Also 
+  shows two value transformers to alter the color of text.
+
+  Originally from `Cocoa Bindings Examples and Hints`_,
+  converted to PyObjC by u.fiedler.
+
+.. _`ToDos`: CocoaBindings/ToDos
+
+Inject
+------
+
+The directory `Inject`_ contains a number of examples that use the
+``objc.inject`` facility to inject code into another process.  These
+examples require Mac OS X 10.3 or later.
+
+.. _`Inject`: Inject
+
+* `IDNSnitch`_
+
+  A proof of concept `IDN spoofing defense`_ for Safari (tested with
+  v1.2.4 on Mac OS X 10.3.8).  Demonstrates how to write an application
+  that detects the launch of another application by bundle identifier,
+  how to use ``objc.inject`` to load code into another application,
+  how to override the implementation of an existing class but still
+  call back into the original implementation, and how to reduce the
+  size of such an application/plugin combination by using symlinks
+  to share object files (the PyObjC extensions in this case).
+
+.. _`IDNSnitch`: Inject/IDNSnitch
+.. _`IDN spoofing defense`: http://bob.pythonmac.org/archives/2005/02/07/idn-spoofing-defense-for-safari/
+
+* `InjectInterpreter`_:
+
+  Shows how to inject an in-process Python interpreter into another
+  process.  Based on the AppKit PyInterpreter example.
+
+.. _`InjectInterpreter`: Inject/InjectInterpreter
+
 OpenGL
 ------
 
 <ul>
 <li>(UNFINISHED) New RemotePyInterpreter example that demonstrates an
 out-of-process Python interpreter (primarily for IDE uses).</li>
-<li>New FilteringController example in CocoaBindings that Demonstrates
+<li>New IDNSnitch example in Inject that demonstrates how to write an
+application that detects the launch of another application,
+uses <code><span>objc.inject</span></code> to load code into it, and how to override the
+implementation of an existing method but still call back into the
+original implementation (method swizzling).</li>
+<li>New ToDos example in CocoaBindings that demonstrates how to use
+two array controllers for the same data, and how to use value
+transformers to alter the color of text.  Originally from
+&quot;Cocoa Bindings Examples and Hints&quot;, converted to PyObjC by u.fiedler.</li>
+<li>New Bookmarks example in CocoaBindings that demonstrates how to
+subclass <code><span>NSArrayController</span></code> to implement the <code><span>NSTableView</span></code>
+delegate drag and drop protocol, including copying of objects between
+documents and accepting URL drops from other applications.  Also
+demonstrates re-ordering of the content array.  Originally from
+&quot;Cocoa Bindings Examples and Hints&quot;, converted to PyObjC by u.fiedler.</li>
+<li>New FilteringController example in CocoaBindings that demonstrates
 how to subclass <code><span>NSArrayController</span></code> to implement filtering
 of a <code><span>NSTableView</span></code>.  Also demonstrates the use of indexed accessors.
 Originally from &quot;Cocoa Bindings Examples and Hints&quot;, converted to PyObjC
 automatically trigger notifications.  This works in all cases,
 whether <code><span>foo</span></code> is a <code><span>property</span></code>, <code><span>ivar</span></code>, or just in the
 <code><span>__dict__</span></code>.</li>
-<li>New Inject folder in Examples, with a PyInterpreter
+<li>New Inject folder in Examples, with an InjectInterpreter
 example that will inject a GUI Python interpreter into any process.</li>
 <li>New <code><span>objc.inject()</span></code> function for Mac OS X 10.3 and later,
 allows an arbitrary bundle to be loaded into another process
 - (UNFINISHED) New RemotePyInterpreter example that demonstrates an
   out-of-process Python interpreter (primarily for IDE uses).
 
-- New FilteringController example in CocoaBindings that Demonstrates
+- New IDNSnitch example in Inject that demonstrates how to write an
+  monitor for the launch of another application,
+  use ``objc.inject`` to load code into a target process,
+  and override the implementation of an existing method but still
+  call back into the original implementation (method swizzling).
+
+- ``objc.IMP`` should do the right thing now.  This type is returned
+  by ``+[NSObject methodForSelector:]`` and
+  ``+[NSObject instanceMethodForSelector:]``
+
+- New ToDos example in CocoaBindings that demonstrates how to use
+  two array controllers for the same data, and how to use value
+  transformers to alter the color of text.  Originally from
+  "Cocoa Bindings Examples and Hints", converted to PyObjC by u.fiedler.
+
+- New Bookmarks example in CocoaBindings that demonstrates how to
+  subclass ``NSArrayController`` to implement the ``NSTableView``
+  delegate drag and drop protocol, including copying of objects between
+  documents and accepting URL drops from other applications.  Also
+  demonstrates re-ordering of the content array.  Originally from
+  "Cocoa Bindings Examples and Hints", converted to PyObjC by u.fiedler.
+
+- New FilteringController example in CocoaBindings that demonstrates
   how to subclass ``NSArrayController`` to implement filtering
   of a ``NSTableView``.  Also demonstrates the use of indexed accessors.
   Originally from "Cocoa Bindings Examples and Hints", converted to PyObjC
   whether ``foo`` is a ``property``, ``ivar``, or just in the
   ``__dict__``.
 
-- New Inject folder in Examples, with a PyInterpreter
+- New Inject folder in Examples, with an InjectInterpreter
   example that will inject a GUI Python interpreter into any process.
 
 - New ``objc.inject()`` function for Mac OS X 10.3 and later,