1. Jeremy Reichman
  2. pyobjc


Bob Ippolito  committed 889ae01

use py2app to compile xcdatamodel

  • Participants
  • Parent commits 6c9fa20
  • Branches pyobjc-ancient

Comments (0)

Files changed (4)

File Doc/Xcode-Templates.html

View file
  • Ignore whitespace
 PyObjC Xcode Templates</title>
 <meta name="Author" content="Bob Ippolito" />
 <meta name="Contact" content="bob@redivi.com" />
 <h2>PyObjC Xcode Templates</h2>
 applications &quot;by hand&quot; using py2app, as described in the
 tutorial.  As of PyObjC 1.3.1, these templates are py2app based,
 so there is no longer a technical reason not to use them.</p>
-<table border="1" width="80%" align="center"><tbody><tr><td><i><center>Contents</center></i><br />
-<li><a href="#installing">Installing</a></li>
-<li><a href="#notes">Notes</a></li>
-<li><a href="#groups">Groups</a></li>
-<li><a href="#targets">Targets</a></li>
-<li><a href="#custom-executable">Custom Executable</a></li>
-<li><a href="#pyobjc-application">PyObjC Application</a></li>
-<li><a href="#pyobjc-document-based-application">PyObjC Document Based Application</a></li>
-<li><a href="#pyobjc-mixed-application">PyObjC Mixed Application</a></li>
+<li><a href="#installing" id="id3" name="id3">Installing</a></li>
+<li><a href="#notes" id="id4" name="id4">Notes</a></li>
+<li><a href="#groups" id="id5" name="id5">Groups</a></li>
+<li><a href="#targets" id="id6" name="id6">Targets</a></li>
+<li><a href="#custom-executable" id="id7" name="id7">Custom Executable</a></li>
+<li><a href="#pyobjc-application" id="id8" name="id8">PyObjC Application</a></li>
+<li><a href="#pyobjc-document-based-application" id="id9" name="id9">PyObjC Document Based Application</a></li>
+<li><a href="#pyobjc-mixed-application" id="id10" name="id10">PyObjC Mixed Application</a></li>
-<h2><a href="#id3">Installing</a></h2>
+<h2><a href="#id3" name="installing">Installing</a></h2>
 <p>If you have installed PyObjC 1.3.1 or later using the installer, then
 the Xcode templates are already installed.</p>
 <p>If you have installed any version of PyObjC prior to 1.3.1, then you
 <p>To install the templates manually, simply copy (or link) them into
 this Project Templates folder.</p>
-<h2><a href="#id4">Notes</a></h2>
+<h2><a href="#id4" name="notes">Notes</a></h2>
 <li>These templates are brand new in PyObjC 1.3.1 and haven't had much
 use yet.  If you think that you have found a bug or would like them to be
 See PyObjC Mixed Application below for more information about using
 plug-ins to integrate non-Python code into your application.</li>
-<h2><a href="#id5">Groups</a></h2>
+<h2><a href="#id5" name="groups">Groups</a></h2>
 <p>The PyObjC Xcode templates use py2app to build applications,
 but they parse the <code><span>.xcode</span></code> project file to determine
 how they should be built, rather than directly in the
-<h2><a href="#id6">Targets</a></h2>
+<h2><a href="#id6" name="targets">Targets</a></h2>
 <dd><p>This target will use py2app <code><span>--alias</span></code> build mode.  Executables
 project.  The build style has no effect on Python code.</p>
-<h2><a href="#id7">Custom Executable</a></h2>
+<h2><a href="#id7" name="custom-executable">Custom Executable</a></h2>
 <p>The custom executable enables for your built application to be run from Xcode.</p>
 <p>If you rename your main script or fiddle around with your <code><span>Info.plist</span></code>,
 the path to your application may change and this will no longer work.
 <p>Custom executables are specific to a particular user in Xcode, so anything
 you do to this part of the template won't be seen by anyone else unless
 they happen to have the same short user name as you.</p>
-<h2><a href="#id8">PyObjC Application</a></h2>
+<h2><a href="#id8" name="pyobjc-application">PyObjC Application</a></h2>
 <p>This is a simple template that has a window and an application delegate.</p>
-<h2><a href="#id9">PyObjC Document Based Application</a></h2>
+<h2><a href="#id9" name="pyobjc-document-based-application">PyObjC Document Based Application</a></h2>
 <p>This is template demonstrates a Document-based application written in Python.
 It is a simple text editor (like the TinyTinyEdit example).</p>
-<h2><a href="#id10">PyObjC Mixed Application</a></h2>
+<h2><a href="#id10" name="pyobjc-mixed-application">PyObjC Mixed Application</a></h2>
 <p>This template contains both Objective-C and Python code.  The Objective-C code
 is built as a &quot;ProjectNamePlugIn.bundle&quot; plug-in in a separate target.  The plug-in
 is placed in the <code><span>Resources</span></code> directory of your application.  A wrapper script

File Examples/CoreData/OutlineEdit/00TODO.txt

  • Ignore whitespace
-- MyDocument.mom is a generated file, I (ronald) do not yet know how to
-  create this from MyDocument.xcdatamodel

File Examples/CoreData/OutlineEdit/setup.py

View file
  • Ignore whitespace
-# XXX: This should be hidden in a helper module
-compiler='/Library/Application Support/Apple/Developer Tools/Plug-ins/XDCoreDataModel.xdplugin/Contents/Resources/momc'
-os.system("'%s' MyDocument.xcdatamodel MyDocument.mom"%(compiler,))
-    data_files=["English.lproj", 'MyDocument.mom'],
-    options=dict(py2app=dict(plist=plist)),
+    data_files=["English.lproj"],
+    options=dict(py2app=dict(
+        plist=plist,
+        datamodels=['MyDocument'],
+    )),

File NEWS.html

View file
  • Ignore whitespace
 <h2>PyObjC NEWS</h2>
 <p>An overview of the relevant changes in new, and older, releases.</p>
-<h2><a>Version 1.3.5 (2005-05-??)</a></h2>
+<h2><a name="version-1-3-5-2005-05">Version 1.3.5 (2005-05-??)</a></h2>
 <li>Key-Value Coding of Python objects should act like Objective-C now.
 Previously, its capitalization method didn't match Objective-C's, it
 <p>Documentation and tests not yet written.</p>
 <li>Add a CoreData example: a python version of the OutlineEditor example
-from Apple.<p>TODO: compile the .xcdatamodel file.</p>
+from Apple.</li>
 <li>If the selector name ends with ':error:' and the last argument is a pointer
 to an object, the argument is now assumed to be an output argument.</li>
 <li>More conveniences for <code><span>list</span></code>-like and <code><span>dict</span></code>-like
 <code><span>array.array</span></code> (but not <code><span>str</span></code> or <code><span>unicode</span></code>) are now bridged as
 <code><span>NSData</span></code> subclasses.</li>
-<h2><a>Version 1.3 (2005-03-31)</a></h2>
+<h2><a name="version-1-3-2005-03-31">Version 1.3 (2005-03-31)</a></h2>
 <li>New <code><span>objc.pyobjc_id</span></code> function that returns a the id of the underlying
 NSObject as an integer.  (Python wrapper objects are often made on the
 function is also exposed in the C API (and has been for a while).</p>
-<h2><a>Version 1.2 (2004-12-29)</a></h2>
+<h2><a name="version-1-2-2004-12-29">Version 1.2 (2004-12-29)</a></h2>
 <li><code><span>PyObjCTools.AppHelper.stopEventLoop</span></code> will attempt to stop the current
 <code><span>NSRunLoop</span></code> (if started by <code><span>runConsoleEventLoop</span></code>) or terminate the
 packages as <code><span>objc._objc</span></code>, <code><span>AppKit._AppKit</span></code>, etc.  They should never be
 used directly, so this should not break user code.</li>
-<h2><a>Version 1.1 (2004-05-30)</a></h2>
+<h2><a name="version-1-1-2004-05-30">Version 1.1 (2004-05-30)</a></h2>
 <li>KVO now actually works from Python without using nasty hacks.</li>
 <li>Added Xcode template for document-based applications</li>
-<h2><a>Version 1.1b2 (2004-04-11)</a></h2>
+<h2><a name="version-1-1b2-2004-04-11">Version 1.1b2 (2004-04-11)</a></h2>
 <li>More fine-grained multi-threading support</li>
 <li>Xcode templates use a smarter embedded main program</li>
 expression in Objective-C.</li>
 <li>Add several new examples</li>
-<h2><a>Version 1.1b1 (2004-02-20)</a></h2>
+<h2><a name="version-1-1b1-2004-02-20">Version 1.1b1 (2004-02-20)</a></h2>
 <li>Fixes some regressions in 1.1 w.r.t. 1.0</li>
 <li>Add Xcode templates for python files<p>You can now select a new python file in the 'add file...' dialog in Xcode</p>
 accessor method.</p>
-<h2><a>Version 1.1a0 (2004-02-02)</a></h2>
+<h2><a name="version-1-1a0-2004-02-02">Version 1.1a0 (2004-02-02)</a></h2>
 <li>Objective-C structs can now be wrapped using struct-like types. This has
 been used to implement wrapper types for NSPoint, NSSize, NSRange and NSRect
-<h2><a>Version 1.0 (2003-09-21)</a></h2>
+<h2><a name="version-1-0-2003-09-21">Version 1.0 (2003-09-21)</a></h2>
 <li>This version includes a new version of libffi that properly deals with
 complex types on MacOS X.</li>
-<h2><a>Version 1.0rc3 (2003-09-14)</a></h2>
+<h2><a name="version-1-0rc3-2003-09-14">Version 1.0rc3 (2003-09-14)</a></h2>
 <li>1.0rc2 didn't include the nibclassbuilder script</li>
 <li>Fix bug in NSRectFillList</li>
-<h2><a>Version 1.0rc2 (2003-09-10)</a></h2>
+<h2><a name="version-1-0rc2-2003-09-10">Version 1.0rc2 (2003-09-10)</a></h2>
 <li>Fix a number of bugs found in 1.0rc1.</li>
-<h2><a>Version 1.0rc1 (2003-08-10)</a></h2>
+<h2><a name="version-1-0rc1-2003-08-10">Version 1.0rc1 (2003-08-10)</a></h2>
 <li>Better support for the NSKeyValueCoding protocol.  The module 
 <code><span>PyObjCTools.KeyValueCoding</span></code> provides a python interface that makes it
 <li>The interface of Foundation.NSFillRects changed, it now has an interface
 that is consistent with the rest of the bridge.</li>
-<h2><a>Version 1.0b1 (2003-07-05)</a></h2>
+<h2><a name="version-1-0b1-2003-07-05">Version 1.0b1 (2003-07-05)</a></h2>
 <li>More tutorials<p>Two new tutorials were added: 'Adding Python code to an existing ObjC 
 application' and 'Understanding existing PyObjC examples'. The former
 <li>The generator scripts are automaticly called when building PyObjC. This
 should make it easier to support multiple versions of MacOS X.</li>
-<h2><a>Version 0.9 (May-02-2003)</a></h2>
+<h2><a name="version-0-9-may-02-2003">Version 0.9 (May-02-2003)</a></h2>
 <li>This version includes numerous bugfixes and improvements.</li>
 <li>The module AppKit.NibClassBuilder has been moved to the package
 makes it easily possible to use NSString values with Python APIs, while at 
 the same time allowing access to the full power of NSString.</li>
-<h2><a>Version 0.8 (Dec-10-2002)</a></h2>
+<h2><a name="version-0-8-dec-10-2002">Version 0.8 (Dec-10-2002)</a></h2>
 <li>GNUStep support has been removed for lack of support.  Volunteers
 <li>Support for Project Builder based Cocoa-Python projects.</li>
 <li>Unit tests.</li>
-<h2><a>Version 2002-01-30 (January 30, 2002)</a></h2>
+<h2><a name="version-2002-01-30-january-30-2002">Version 2002-01-30 (January 30, 2002)</a></h2>
 <li>Version bumped to 0.6.1 ( __version__ is now a PyString )</li>
 <li>Will now build for Python 2.2</li>
 without check, it crashes on sends to abstract classes like NSProxy.</li>
 <li>There are still problems with Delegates and Notifications.</li>
-<h2><a>Version 2001-03-17 (March 17, 2001)</a></h2>
+<h2><a name="version-2001-03-17-march-17-2001">Version 2001-03-17 (March 17, 2001)</a></h2>
 <li>moved to using distutils setup.py (requires small patch to distutils
 that has been submitted against python 2.1b1)</li>
-<h2><a>Version 2000-11-14 (November 14, 2000)</a></h2>
+<h2><a name="version-2000-11-14-november-14-2000">Version 2000-11-14 (November 14, 2000)</a></h2>
 <li>GNU_RUNTIME is likely completely broken</li>
 <li>Compiles on Mac OS X Server (python 2.0)</li>
 <li>Some pre-OSX stuff removed;  references to old APIs, etc... (but
 nowhere near clean)</li>
-<h2><a>Version 0.55, 18 August 1998</a></h2>
+<h2><a name="version-0-55-18-august-1998">Version 0.55, 18 August 1998</a></h2>
 <li>Here again, supporting GNU_RUNTIME and GNUstep Base! On my new Linux
 box I can finally test the module against them: I installed the
-<h2><a>Version 0.54, 24 March 1998</a></h2>
+<h2><a name="version-0-54-24-march-1998">Version 0.54, 24 March 1998</a></h2>
 <li>OC_Pasteboard.[hm], OC_Stream.[mh] and ObjCStreams.m are definitively gone.</li>
 <li>OC_PythonObject derives from NSProxy.</li>
-<h2><a>Version 0.53, 4 January 1998</a></h2>
+<h2><a name="version-0-53-4-january-1998">Version 0.53, 4 January 1998</a></h2>
 <li>Tons of changes, retargeting the core functionality around the
 OpenSTEP API. This release basically matches the previous one
 if they are needed anymore.</li>
 <li>Updated LittleButtonedWindow demo.</li>
-<h2><a>Version 0.47, 29 October 1996</a></h2>
+<h2><a name="version-0-47-29-october-1996">Version 0.47, 29 October 1996</a></h2>
 <li>Misc/Makefile.pre.in automatically sets TARGET to <code><span>pyobjc</span></code>.</li>
 <li>ObjC.m splitted to ObjCObject.m ObjCMethod.m ObjCPointer.m
 <li>OC_Streams are mapped to ObjCStreams by pythonify_c_value and its
-<h2><a>Version 0.46, 18 October 1996</a></h2>
+<h2><a name="version-0-46-18-october-1996">Version 0.46, 18 October 1996</a></h2>
 <li>OC_Stream is now a subclass of NSData under Foundation.</li>
 <li>New Objective-C class: OC_Pasteboard. Use it instead of Pasteboard/
 <li>OC_Python.[hm] aren't in the package anymore.</li>
 <li>Setup.in directives changed again, due to OC_Python.m dropping.</li>
-<h2><a>Version 0.45, 14 October 1996</a></h2>
+<h2><a name="version-0-45-14-october-1996">Version 0.45, 14 October 1996</a></h2>
 <li>Double syntax: to make it easier for us to test and choose the
 better candidate, the only one that will be present in the final 1.0
 release. Keeping both would result in a speed penality.</li>
 <li>Revisited streams, in particular GNUstep support.</li>
-<h2><a>Version 0.44, 9 October 1996</a></h2>
+<h2><a name="version-0-44-9-october-1996">Version 0.44, 9 October 1996</a></h2>
 <li>Integers are now accepted too where floats or doubles are expected.</li>
 <li>New method: ObjC.make_pointer (1) returns an ObjCPointer containing
 <code><span>((void</span> <span>*)</span> <span>1)</span></code>.</li>
-<h2><a>Version 0.43, 7 October 1996</a></h2>
+<h2><a name="version-0-43-7-october-1996">Version 0.43, 7 October 1996</a></h2>
 <li>Completed ObjCStream implementation. There is now a new module, ObjCStreams
 which is automatically loaded by ObjC. You can access it as ObjC.streams.</li>
 libObjC.tex describing the main module, libObjCStreams.tex explains the
 stream facilities.</li>
-<h2><a>Version 0.42, 4 October 1996</a></h2>
+<h2><a name="version-0-42-4-october-1996">Version 0.42, 4 October 1996</a></h2>
 <li>You can pass initialization arguments when using the <code><span>Class()</span></code> syntax. You
 select the right initializer selector with the <code><span>init</span></code> keyword parameter.</li>
 <li>First cut on ObjCStream objects. Thanx to Bill Bumgarner for motivations.</li>
 <li>New demo ShellText, to test above points.</li>
-<h2><a>Version 0.41, 2 October 1996</a></h2>
+<h2><a name="version-0-41-2-october-1996">Version 0.41, 2 October 1996</a></h2>
 <li>Revised error messages: for arguments type mismatch they show the ObjC type
 <li>Setup.in directives changed. See the new file Modules/Setup.PyObjC.in</li>
 <li>Distribuited as a standalone package. Special thanks to Bill Bumgarner.</li>
-<h2><a>Version 0.4, 27 September 1996</a></h2>
+<h2><a name="version-0-4-27-september-1996">Version 0.4, 27 September 1996</a></h2>
 <li>Now handles methods returning doubles or floats.</li>
 <li>ObjCRuntime responds to .sel_is_mapped().</li>
-<h2><a>Version 0.31, 26 September 1996</a></h2>
+<h2><a name="version-0-31-26-september-1996">Version 0.31, 26 September 1996</a></h2>
 <li>It's now possible to use a different strategy to map ObjC method names to
 Python ones. Sooner or later we should decide the one to go, and drop the
 <li>ObjC.runtime.__dict__ added.</li>
 <li>ObjC.runtime.kind added.</li>
-<h2><a>Version 0.3, 20 September 1996</a></h2>
+<h2><a name="version-0-3-20-september-1996">Version 0.3, 20 September 1996</a></h2>
 <li>No user visible changes, just a little effort towards GNU_RUNTIME support.</li>
-<h2><a>Version 0.2, 16 September 1996</a></h2>
+<h2><a name="version-0-2-16-september-1996">Version 0.2, 16 September 1996</a></h2>
 <li>Accepts a struct.pack() string for pointer arguments, but...</li>
 <li>... New methods on ObjCMethod: .pack_argument and .unpack_argument:
-<h2><a>Version 0.1, 13 September 1996</a></h2>
+<h2><a name="version-0-1-13-september-1996">Version 0.1, 13 September 1996</a></h2>
 <li>Correctly handle pointer arguments.</li>
 <li>New syntax to get a class: ObjC.runtime.NameOfClass</li>