New: XcodeCapp 3 total overhaul part 2.
Whew, a complete overhaul of my previous complete overhaul. Changes in no particular order: - Redesigned the About box. - Converted tabs to spaces. - Using Lumberjack for (much better) logging. When debugging, copious logging goes only to Xcode's console, not to the system log. In the release build, only basic info and errors goes to the system log. - Reformatted the help using Pages, it's a PDF now (so I can use better fonts). - Massive optimization across the board. All time-consuming operations are done with NSOperation, which uses Grand Central Dispatch, and can be interrupted. So the XCC menu remains fully responsive during source processing. - Updates to the Xcode project are coalesced so only one read/update/write operation is done. - Instead of launching a shell and reading the .profile, the target executable is directly launched, but it must reside somewhere in the default binary path + /usr/local/bin:/usr/local/narwhal/bin:~/bin. If jsc, python, objj and nib2cib cannot be found in that path, the user is alerted and XCC quits. - Added a preference (true by default) to automatically load the Xcode project when a project is opened. - Added a preference to turn off per-file processing notifications. - Added a hidden preference to set the log level. Useful for debugging a user's release build. - Redesigned the Preferences window. - Renamed some methods/properties, eliminated some unused properties. - All of the windows remember their position. - Moved the fsevent_callback into XcodeCapp.m. - Fixed a bug in mod_pbxproj.py not setting the type of PBXFileReferences which are directories to "folder". - Added support for categories in parser.j. Woo-hoo! - Rewrote pbxprojModifier.py to use a class. - Renamed the Xcode project group names to "Cocoa Classes" and "Cappuccino Source". Within "Cappuccino Source", framework code is kept in a "Frameworks" group. - Shadow filenames are all project-relative now, thus *much* shorter. - pbxprojModifier.py keeps the groups and files in the project in sorted order: Resource folders are at the top, followed by Cocoa Classes, followed by Cappuccino Source. Within Cocoa Classes, non-framework files come first, followed by framework files, followed by xcc_general_include.h. - If either .XcodeSupport or the .xcodeproj is missing, the other is regenerated to ensure they stay in sync. - A compatibility version for .XcodeSupport is stored inside it in Info.plist. If that version < the app's compatibility version, the project is reset. This ensures that format changes in the future will not result in projects in an unknown state. - If the Xcode project cannot be opened, the user is alerted and given the option of regenerating the project. - Resetting the project deletes all .cibs to force the .xibs to be regenerated. - All possible FSEvents are dealt with individually now, and in a way that (hopefully) maintains sync between Cappuccino and XCC. - A file descriptor to the Xcode project is kept open so that If the project path changes it can be relocated. If it does move, the user is alerted ad given the option of reloading the project or quitting. - If one of the watched paths changes, the project is reloaded. - Xcode creates temporary files, they are properly filtered out now when handling FSEvents. - NSRegularExpression was being used before, but that is OS X 10.7 only. NSPredicate is used instead now. -
@@ -1,390 +0,0 @@
|
||||
{\rtf1\ansi\ansicpg1252\cocoartf1187\cocoasubrtf370
|
||||
{\fonttbl\f0\fnil\fcharset0 LucidaGrande;\f1\fswiss\fcharset0 Helvetica;\f2\fmodern\fcharset0 Courier;
|
||||
}
|
||||
{\colortbl;\red255\green255\blue255;}
|
||||
{\*\listtable{\list\listtemplateid1\listhybrid{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace360\levelindent0{\*\levelmarker \{square\}}{\leveltext\leveltemplateid1\'01\uc0\u9642 ;}{\levelnumbers;}\fi-360\li720\lin720 }{\listname ;}\listid1}
|
||||
{\list\listtemplateid2\listhybrid{\listlevel\levelnfc0\levelnfcn0\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace360\levelindent0{\*\levelmarker \{decimal\}.}{\leveltext\leveltemplateid101\'02\'00.;}{\levelnumbers\'01;}\fi-360\li720\lin720 }{\listname ;}\listid2}
|
||||
{\list\listtemplateid3\listhybrid{\listlevel\levelnfc0\levelnfcn0\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace360\levelindent0{\*\levelmarker \{decimal\}.}{\leveltext\leveltemplateid201\'02\'00.;}{\levelnumbers\'01;}\fi-360\li720\lin720 }{\listname ;}\listid3}
|
||||
{\list\listtemplateid4\listhybrid{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace360\levelindent0{\*\levelmarker \{square\}}{\leveltext\leveltemplateid301\'01\uc0\u9642 ;}{\levelnumbers;}\fi-360\li720\lin720 }{\listname ;}\listid4}
|
||||
{\list\listtemplateid5\listhybrid{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace360\levelindent0{\*\levelmarker \{square\}}{\leveltext\leveltemplateid401\'01\uc0\u9642 ;}{\levelnumbers;}\fi-360\li720\lin720 }{\listname ;}\listid5}
|
||||
{\list\listtemplateid6\listhybrid{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace360\levelindent0{\*\levelmarker \{square\}}{\leveltext\leveltemplateid501\'01\uc0\u9642 ;}{\levelnumbers;}\fi-360\li720\lin720 }{\listname ;}\listid6}
|
||||
{\list\listtemplateid7\listhybrid{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace360\levelindent0{\*\levelmarker \{square\}}{\leveltext\leveltemplateid601\'01\uc0\u9642 ;}{\levelnumbers;}\fi-360\li720\lin720 }{\listname ;}\listid7}
|
||||
{\list\listtemplateid8\listhybrid{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace360\levelindent0{\*\levelmarker \{square\}}{\leveltext\leveltemplateid701\'01\uc0\u9642 ;}{\levelnumbers;}\fi-360\li720\lin720 }{\listname ;}\listid8}
|
||||
{\list\listtemplateid9\listhybrid{\listlevel\levelnfc0\levelnfcn0\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace360\levelindent0{\*\levelmarker \{decimal\}.}{\leveltext\leveltemplateid801\'02\'00.;}{\levelnumbers\'01;}\fi-360\li720\lin720 }{\listname ;}\listid9}
|
||||
{\list\listtemplateid10\listhybrid{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace360\levelindent0{\*\levelmarker \{square\}}{\leveltext\leveltemplateid901\'01\uc0\u9642 ;}{\levelnumbers;}\fi-360\li720\lin720 }{\listname ;}\listid10}
|
||||
{\list\listtemplateid11\listhybrid{\listlevel\levelnfc0\levelnfcn0\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace360\levelindent0{\*\levelmarker \{decimal\}.}{\leveltext\leveltemplateid1001\'02\'00.;}{\levelnumbers\'01;}\fi-360\li720\lin720 }{\listname ;}\listid11}
|
||||
{\list\listtemplateid12\listhybrid{\listlevel\levelnfc0\levelnfcn0\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace360\levelindent0{\*\levelmarker \{decimal\}.}{\leveltext\leveltemplateid1101\'02\'00.;}{\levelnumbers\'01;}\fi-360\li720\lin720 }{\listname ;}\listid12}}
|
||||
{\*\listoverridetable{\listoverride\listid1\listoverridecount0\ls1}{\listoverride\listid2\listoverridecount0\ls2}{\listoverride\listid3\listoverridecount0\ls3}{\listoverride\listid4\listoverridecount0\ls4}{\listoverride\listid5\listoverridecount0\ls5}{\listoverride\listid6\listoverridecount0\ls6}{\listoverride\listid7\listoverridecount0\ls7}{\listoverride\listid8\listoverridecount0\ls8}{\listoverride\listid9\listoverridecount0\ls9}{\listoverride\listid10\listoverridecount0\ls10}{\listoverride\listid11\listoverridecount0\ls11}{\listoverride\listid12\listoverridecount0\ls12}}
|
||||
\margl1440\margr1440\vieww16380\viewh15560\viewkind0
|
||||
\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural
|
||||
|
||||
\f0\b\fs36 \cf0 XcodeCapp Help
|
||||
\b0 \
|
||||
\
|
||||
\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural
|
||||
|
||||
\b\fs28 \cf0 What is XcodeCapp?\
|
||||
\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural
|
||||
|
||||
\b0\fs36 \cf0 \
|
||||
\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural
|
||||
|
||||
\fs24 \cf0 One of Cappuccino\'92s greatest features is its ability to use Xcode 4 to create the user interface for your web applications. Xcode creates .xib files which then must be converted by the command line utility
|
||||
\b nib2cib
|
||||
\b0 to .cib files for use with Cappuccino. But beginning with Xcode 4, there is no way to directly create outlets and actions without editing Objective-C header files.\
|
||||
\
|
||||
XcodeCapp acts as a bridge between Xcode and Cappuccino. It performs two main functions:\
|
||||
\
|
||||
\pard\tx220\tx720\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\li720\fi-720\pardirnatural
|
||||
\ls1\ilvl0\cf0 {\listtext \uc0\u9642 }Creates an Xcode project where you can edit your Cappuccino project\'92s xibs.\
|
||||
{\listtext \uc0\u9642 }Reads your source files and automatically creates outlets and actions in the xib file.\
|
||||
{\listtext \uc0\u9642 }Automatically converts xib files to cib files when the .xib file is modified.\
|
||||
{\listtext \uc0\u9642 }Listens for changes to source files and xibs and updates outlets and actions in the xib file accordingly.\
|
||||
\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural
|
||||
\cf0 \
|
||||
\
|
||||
\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural
|
||||
|
||||
\b\fs28 \cf0 Using XcodeCapp
|
||||
\b0 \
|
||||
\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural
|
||||
|
||||
\fs24 \cf0 \
|
||||
XcodeCapp is very easy to use and requires very little user interaction. When you build Cappuccino with jake, it will create a symlink to the XcodeCapp application in your Applications folder. Launch XcodeCapp from there and the XcodeCapp icon will appear in your menu bar. Clicking on the icon will display the XcodeCapp menu:\
|
||||
\
|
||||
\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural
|
||||
|
||||
\f1 \cf0 {{\NeXTGraphic menu.png \width5000 \height5160
|
||||
}¬}\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural
|
||||
|
||||
\f0 \cf0 \
|
||||
\
|
||||
When the status icon is light gray, XcodeCapp does not have a project open.\
|
||||
\
|
||||
|
||||
\b \
|
||||
Opening a Project\
|
||||
|
||||
\b0 \
|
||||
First you have to tell XcodeCapp what Cappuccino project to open.\
|
||||
\
|
||||
\pard\tx220\tx720\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\li720\fi-720\pardirnatural
|
||||
\ls2\ilvl0\cf0 {\listtext 1. }Select \'93Open Project\'85\'94 from the XcodeCapp menu. A folder chooser dialog will appear.\
|
||||
{\listtext 2. }Navigate to the root folder of your project \'97 the one that contains index-debug.html and Jakefile.\
|
||||
{\listtext 3. }Click Open.\
|
||||
\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural
|
||||
\cf0 \
|
||||
\pard\tx566\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\pardirnatural
|
||||
\cf0 Once you open a project, XcodeCapp does the following:\
|
||||
\
|
||||
\pard\tx220\tx720\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\li720\fi-720\pardirnatural
|
||||
\ls3\ilvl0\cf0 {\listtext 1. }Creates an Xcode project with the name of the project directory, if no such project already exists.\
|
||||
{\listtext 2. }Parses source code in the project directory and all non-Cappuccino subdirectories (such as Build, Frameworks, etc.).\
|
||||
{\listtext 3. }Parses source code in non-Cappuccino frameworks.\
|
||||
{\listtext 4. }If no cib file exists for a given xib file, converts the xib using nib2cib.\
|
||||
\pard\tx560\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\pardirnatural
|
||||
\cf0 \
|
||||
\pard\tx566\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\pardirnatural
|
||||
\cf0 When XcodeCapp is processing files, the status icon changes to light blue.\
|
||||
\
|
||||
\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural
|
||||
|
||||
\f1 \cf0 {{\NeXTGraphic loading-project.png \width6560 \height1960
|
||||
}¬}\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural
|
||||
|
||||
\f0 \cf0 \
|
||||
\pard\tx566\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\pardirnatural
|
||||
\cf0 \
|
||||
During source parsing, XcodeCapp creates an invisible folder called \'93.XcodeSupport\'94 in the root project directory. This folder contains files created by XcodeCapp that act as the bridge between Cappuccino and Xcode, so you should never directly modify those files. You will probably want to ignore this folder in your IDE and source code management system as well.\
|
||||
\
|
||||
After XcodeCapp has opened a project, it will listen for changes to the following files anywhere in the project:\
|
||||
\
|
||||
\pard\tx220\tx720\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\li720\fi-720\pardirnatural
|
||||
\ls4\ilvl0\cf0 {\listtext \uc0\u9642 }*.xib \'96 Xcode 4 interface builder files\
|
||||
{\listtext \uc0\u9642 }*.j - Objective-J source\
|
||||
{\listtext \uc0\u9642 }.xcodecapp-ignore - Specifies files XcodeCapp should ignore. See \'93Ignoring Files and Folders\'94 below.\
|
||||
\pard\tx566\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\pardirnatural
|
||||
\cf0 \
|
||||
When XcodeCapp has a project open and is listening for changes, the status icon changes to dark gray.\
|
||||
\
|
||||
\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural
|
||||
|
||||
\f1 \cf0 {{\NeXTGraphic active.png \width660 \height420
|
||||
}¬}\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural
|
||||
|
||||
\f0 \cf0 \
|
||||
\
|
||||
The most recently opened project is inserted at the top of the Open Recent submenu in the XcodeCapp menu. By default, the recent project list is limited to 20 projects. You can change that number in the Preferences window. See \'93Preferences\'94 below for more information.\
|
||||
\
|
||||
If you quit XcodeCapp while a project is open, by default when you reopen XcodeCapp it will reopen the most recently opened project. You can change this behavior in the Preferences window. See \'93Preferences\'94 below for more information.\
|
||||
\
|
||||
\
|
||||
\pard\tx566\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\pardirnatural
|
||||
|
||||
\b \cf0 Notifications\
|
||||
\pard\tx566\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\pardirnatural
|
||||
|
||||
\b0 \cf0 \
|
||||
XcodeCapp shows notifications whenever it loads a project or processes files. If you are using Mac OS X 10.8+, notifications will appear in Notification Center. Otherwise they will appear according to Growl\'92s preferences if Growl is installed, or in a simple notification window if Growl is not installed. To turn notifications off, use the Notifications control panel (OS X 10.8+) or Growl preferences.\
|
||||
\
|
||||
Note that notifications remain on screen for a minimum amount of time, and thus may lag behind the actual processing of the files.\
|
||||
\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural
|
||||
\cf0 \
|
||||
\
|
||||
\pard\tx566\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\pardirnatural
|
||||
|
||||
\b \cf0 Handling Errors\
|
||||
\pard\tx566\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\pardirnatural
|
||||
|
||||
\b0 \cf0 \
|
||||
If an error or warning occurs during the parsing of an Objective-J file or the conversion of a xib, XcodeCapp notifies you in two ways:\
|
||||
\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural
|
||||
\cf0 \
|
||||
\pard\tx220\tx720\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\li720\fi-720\pardirnatural
|
||||
\ls5\ilvl0\cf0 {\listtext \uc0\u9642 }If an error occurs, the status icon becomes red.\
|
||||
\pard\tx560\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\sb120\pardirnatural
|
||||
\cf0
|
||||
\f1 {{\NeXTGraphic error.png \width620 \height420
|
||||
}¬}
|
||||
\f0 \
|
||||
\pard\tx560\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\sl300\slmult1\pardirnatural
|
||||
\cf0 \
|
||||
\pard\tx220\tx720\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\li720\fi-720\sl300\slmult1\pardirnatural
|
||||
\ls6\ilvl0\cf0 {\listtext \uc0\u9642 }If an error or warning occurs, by default XcodeCapp will open the Errors & Warnings panel and display information about the error or warning.\
|
||||
\pard\tx560\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\sb120\pardirnatural
|
||||
\cf0
|
||||
\f1 {{\NeXTGraphic errors-panel.png \width11780 \height5900
|
||||
}¬}
|
||||
\f0 \
|
||||
\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural
|
||||
\cf0 \
|
||||
Selecting an error in the list and clicking Open or double-clicking on an error opens the offending file in the preferred editor for that file and closes the Errors panel. In the case of .j files, XcodeCapp will attempt to open the file directly to the offending line in the following editors:\
|
||||
\
|
||||
\pard\tx220\tx720\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\li720\fi-720\pardirnatural
|
||||
\ls7\ilvl0\cf0 {\listtext \uc0\u9642 }Sublime Text\
|
||||
{\listtext \uc0\u9642 }TextMate\
|
||||
{\listtext \uc0\u9642 }TextWrangler\
|
||||
{\listtext \uc0\u9642 }BBEdit\
|
||||
{\listtext \uc0\u9642 }Chocolat\
|
||||
{\listtext \uc0\u9642 }MacVIM\
|
||||
\pard\tx566\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\pardirnatural
|
||||
\cf0 \
|
||||
The error list is cleared when a new project is opened. Also, whenever a file is modified, any existing errors for that file are removed. So the Errors & Warnings panel always represents the current state of your files.\
|
||||
\
|
||||
If you do not wish the Errors panel to open automatically when errors or warnings occur, you can change that behavior in the Preferences window. See \'93Preferences\'94 below for more information.\
|
||||
\
|
||||
\pard\tx566\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\pardirnatural
|
||||
|
||||
\b \cf0 \
|
||||
Declaring Outlets and Actions\
|
||||
\pard\tx566\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\pardirnatural
|
||||
|
||||
\b0 \cf0 \
|
||||
The most important function XcodeCapp performs is to create outlets and actions for use with Xcode. You create outlets by prefixing them in your source files with
|
||||
\b @outlet
|
||||
\b0 or
|
||||
\b IBOutlet
|
||||
\b0 . For example, in the class below, there are four outlets defined:\
|
||||
\
|
||||
\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural
|
||||
|
||||
\f1 \cf0 {{\NeXTGraphic outlets.png \width10720 \height4820
|
||||
}¬}\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural
|
||||
|
||||
\f0 \cf0 \
|
||||
\
|
||||
\pard\tx566\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\pardirnatural
|
||||
\cf0 Similarly, you declare actions by declaring the return type of the method to be
|
||||
\b @action
|
||||
\b0 or
|
||||
\b IBAction
|
||||
\b0 . For example, the following method can serve as an action for a control:\
|
||||
\
|
||||
\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural
|
||||
|
||||
\f1 \cf0 {{\NeXTGraphic actions.png \width10800 \height1580
|
||||
}¬}\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural
|
||||
|
||||
\f0 \cf0 \
|
||||
\pard\tx566\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\pardirnatural
|
||||
\cf0 \
|
||||
\
|
||||
\pard\tx566\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\pardirnatural
|
||||
|
||||
\b \cf0 Editing Xibs\
|
||||
\
|
||||
\pard\tx566\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\pardirnatural
|
||||
|
||||
\b0 \cf0 When you open a project, XcodeCapp creates an Xcode 4 project with which you to edit your project\'92s xibs. To open the Xcode project, click on the XcodeCapp menu and select \'93Open Project in Xcode\'94.\
|
||||
\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural
|
||||
\cf0 \
|
||||
\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural
|
||||
|
||||
\f1 \cf0 {{\NeXTGraphic open-project-in-xcode.png \width5900 \height5060
|
||||
}¬}\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural
|
||||
|
||||
\f0 \cf0 \
|
||||
\
|
||||
Once the Xcode project is open, you can edit your xibs with the interface builder. The Xcode project contains three folders by default:\
|
||||
\
|
||||
\pard\tx220\tx720\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\li720\fi-720\pardirnatural
|
||||
\ls8\ilvl0\cf0 {\listtext \uc0\u9642 }Resources \'96 Contains the files in your project\'92s Resources directory.\
|
||||
{\listtext \uc0\u9642 }Classes \'96 Contains the Objective-C classes generated by XcodeCapp. You should not edit or remove these.\
|
||||
{\listtext \uc0\u9642 }Sources \'96 Contains the source files found by XcodeCapp. You may edit these files in Xcode if you wish.\
|
||||
\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural
|
||||
\cf0 \
|
||||
All of the outlets and actions you declared in your source will be available in interface builder for connection to views. For example, the InfoPanelController shown above would have these outlets in interface builder:\
|
||||
\pard\tx566\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\pardirnatural
|
||||
\cf0 \
|
||||
\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural
|
||||
|
||||
\f1 \cf0 {{\NeXTGraphic outlets-xcode.png \width9760 \height5960
|
||||
}¬}\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural
|
||||
|
||||
\f0 \cf0 \
|
||||
\
|
||||
To add more outlets or actions to the xib, you must edit the Cappuccino source and wait briefly while XcodeCapp processes the changes; do not attempt to add an outlet or action in Xcode.\
|
||||
\
|
||||
\
|
||||
|
||||
\b Working with User Frameworks\
|
||||
\
|
||||
|
||||
\b0 When a project is opened, XcodeCapp looks for user (non-Cappuccino) frameworks in your project\'92s Frameworks/Debug directory. Any debug user frameworks in source form will be processed by XcodeCapp. This allows you to declare outlets and actions in frameworks and use them within Xcode. In addition, if a framework contains a Resources directory, a \'93<framework> Resources\'94 folder referencing that directory is created in the Xcode project. This allows you to reference framework resources within Xcode.\
|
||||
\
|
||||
If you want your user frameworks to execute in compiled form, but you still want XcodeCapp to have access to the framework\'92s source in order to parse outlets and actions, do the following:\
|
||||
\
|
||||
\pard\tx220\tx720\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\li720\fi-720\pardirnatural
|
||||
\ls9\ilvl0\cf0 {\listtext 1. }Copy or symlink to the compiled framework as usual within your project\'92s Frameworks directory.\
|
||||
{\listtext 2. }Create a directory called \'93Source\'94 within your project\'92s Frameworks directory.\
|
||||
{\listtext 3. }Within the Source directory, copy or symlink to the framework source directory.\
|
||||
{\listtext 4. }XcodeCapp will recursively search the Frameworks/Source directory when a project is opened.\
|
||||
\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural
|
||||
\cf0 \
|
||||
For example, here is the structure of a project\'92s Frameworks directory:\
|
||||
\
|
||||
\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural
|
||||
|
||||
\f1 \cf0 {{\NeXTGraphic frameworks.png \width6320 \height7060
|
||||
}¬}\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural
|
||||
|
||||
\f0 \cf0 \
|
||||
\
|
||||
Note the following:\
|
||||
\
|
||||
\pard\tx220\tx720\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\li720\fi-720\pardirnatural
|
||||
\ls10\ilvl0\cf0 {\listtext \uc0\u9642 }Debug/JQueryFileUpload is a symlink to the compiled framework. This is what will be executed when the app is run in debug mode.\
|
||||
{\listtext \uc0\u9642 }The Source directory contains a symlink to the JQueryFileUpload source. This will be parsed by XcodeCapp.\
|
||||
\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural
|
||||
\cf0 \
|
||||
If you need to use image resources located in a framework \'97 for example in an NSButton or NSImageView \'97 you have two choices:\
|
||||
\
|
||||
\pard\tx220\tx720\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\li720\fi-720\pardirnatural
|
||||
\ls11\ilvl0\cf0 {\listtext 1. }Use the base image name alone, for example \'93cancel\'94, which you wish to represent the image \'93cancel.png\'94 in the framework \'93JQueryFileUpload\'94.\
|
||||
{\listtext 2. }Use a full name@framework specification, for example \'93cancel@ JQueryFileUpload\'94 (without the quotes).\
|
||||
\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural
|
||||
\cf0 \
|
||||
\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural
|
||||
\cf0 In the first form, during conversion, nib2cib will first search the app\'92s Resources directory for an image with the given name, then it will search all of the Resources directories of the debug frameworks, followed by the release frameworks. The first match wins, and if the image was found in a framework, the framework\'92s bundle identifier is recorded so the image can be loaded from the correct bundle at runtime.\
|
||||
\
|
||||
Since there might be multiple images in the search path that have the same name, if you want to ensure you are using an image from a specific framework, use the second form. During conversion, nib2cib will check the named framework for the given image, and if it is found the framework\'92s bundle identifier is recorded so the image can be loaded from the correct bundle at runtime.\
|
||||
\
|
||||
\
|
||||
|
||||
\b Ignoring Files and Folders\
|
||||
\
|
||||
|
||||
\b0 There may be source which you do not want XcodeCapp to process. To specify directories or files which you want XcodeCapp to ignore, do the following:\
|
||||
\
|
||||
\pard\tx220\tx720\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\li720\fi-720\pardirnatural
|
||||
\ls12\ilvl0\cf0 {\listtext 1. }Create a text file in the root of the project directory named \'93.xcodecapp-ignore\'94.\
|
||||
{\listtext 2. }Enter one line for each pattern you would like to ignore, where a pattern matches the
|
||||
\b absolute
|
||||
\b0 (full) path to the file or directory.\
|
||||
{\listtext 3. }Save the file. Whenever .xcodecapp-ignore is modified, XcodeCapp will parse it to rebuild the ignore list.\
|
||||
\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural
|
||||
\cf0 \
|
||||
Patterns may use \'93*\'94 as a wildcard to match zero or more characters (it is
|
||||
\b not
|
||||
\b0 a shell glob) and are matched against the
|
||||
\b absolute
|
||||
\b0 path of the file or directory, so in most cases your patterns should begin with \'93*\'94. To ignore a directory, add \'93/\'94 at the end of the directory name. For example, \'93*/server/\'94 will ignore that directory and any files within it.\
|
||||
\
|
||||
For example, to ignore the \'93Modules\'94 directory and the xib file \'93foo.xib\'94 in your project, enter these lines in .xcodecapp-ignore:\
|
||||
\
|
||||
\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural
|
||||
|
||||
\f2 \cf0 */Modules/\
|
||||
*/foo.xib\
|
||||
\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural
|
||||
|
||||
\f0 \cf0 \
|
||||
Sometimes you may want to ignore almost all of the files or directories within a given directory. In such cases you can use an include pattern. An include pattern has the same syntax as the normal exclude patterns, but begins with \'93!\'94. Since ignore patterns are parsed in the order they appear in .xcodecapp-ignore, an include pattern should come after the exclude pattern it overrides. For example, if you wanted to exclude everything in the Modules directory, except for the Classes directory and any xib files, you would use the following patterns:\
|
||||
\
|
||||
\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural
|
||||
|
||||
\f2 \cf0 */Modules/\
|
||||
!*/Modules/Classes/\
|
||||
!*/Modules/*.xib
|
||||
\f0 \
|
||||
\
|
||||
Note that in addition to whatever patterns you specify (if any) in .xcodecapp-ignore, XcodeCapp
|
||||
\b always
|
||||
\b0 parses the following patterns
|
||||
\b before
|
||||
\b0 your patterns:\
|
||||
\
|
||||
|
||||
\f2 */Frameworks/\
|
||||
!*/Frameworks/Debug/\
|
||||
*/AppKit/\
|
||||
*/Foundation/\
|
||||
*/Objective-J/\
|
||||
*/*.environment/\
|
||||
*/Build/\
|
||||
*/.*/\
|
||||
*/NS_*.j\
|
||||
*/main.j\
|
||||
*/.*\
|
||||
!*/.xcodecapp-ignore\
|
||||
\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural
|
||||
|
||||
\f0 \cf0 \
|
||||
\
|
||||
\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural
|
||||
|
||||
\b\fs28 \cf0 Preferences\
|
||||
\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural
|
||||
|
||||
\fs24 \cf0 \
|
||||
|
||||
\b0 XcodeCapp supports the following preferences:\
|
||||
\
|
||||
\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural
|
||||
|
||||
\f1 \cf0 {{\NeXTGraphic preferences.png \width6840 \height3560
|
||||
}¬}\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural
|
||||
|
||||
\f0 \cf0 \
|
||||
\
|
||||
Currently the only warnings generated by XcodeCapp are from using a category in an Objective-J file. Since this warning does not prevent the rest of the file from being parsed, you may choose not to display the Errors panel when category warnings are generated.\
|
||||
\
|
||||
\
|
||||
\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural
|
||||
|
||||
\b\fs28 \cf0 Troubleshooting\
|
||||
\
|
||||
\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural
|
||||
|
||||
\b0\fs24 \cf0 Ultimately XcodeCapp is a bit of a hack \'97 an elegant hack, but a hack nonetheless. It is doing all kinds of processing behind Xcode\'92s back, so to speak, and occasionally Xcode may get out of sync with your source files. In such cases, you can reset XcodeCapp by selecting \'93Reset Project\'94 from the XcodeCapp menu. This will remove and then regenerate the Xcode project and .XcodeSupport folder. If the Xcode project is open in Xcode it will be closed before being removed. \
|
||||
\
|
||||
\
|
||||
\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural
|
||||
|
||||
\b\fs28 \cf0 Credits\
|
||||
\
|
||||
\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural
|
||||
|
||||
\b0\fs24 \cf0 XcodeCapp was originally written by Francisco Tolmasky.\
|
||||
The Cocoa port was written by Antoine Mercadal and Aparajita Fishman.\
|
||||
XcodeCapp (Cocoa version, formerly known as XcodeCapp-cocoa) was originally built for the Archipel Project (archipelproject.org) and is now part of Cappuccino.}
|
||||
|
Before Width: | Height: | Size: 13 KiB |
|
Before Width: | Height: | Size: 4.2 KiB |
|
Before Width: | Height: | Size: 4.2 KiB |
|
Before Width: | Height: | Size: 38 KiB |
|
Before Width: | Height: | Size: 30 KiB |
|
Before Width: | Height: | Size: 32 KiB |
|
Before Width: | Height: | Size: 55 KiB |
|
Before Width: | Height: | Size: 60 KiB |
|
Before Width: | Height: | Size: 46 KiB |
|
Before Width: | Height: | Size: 29 KiB |
|
Before Width: | Height: | Size: 25 KiB |