Changeset 7711
- Timestamp:
- Nov 22, 2007, 6:12:58 PM (17 years ago)
- Location:
- trunk/ccl/examples/cocoa/currency-converter/HOWTO_files
- Files:
-
- 2 added
- 1 edited
-
images/ibwin-leopard3.jpg (added)
-
images/ibwin-leopard4.jpg (added)
-
pages/building_ui.html (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ccl/examples/cocoa/currency-converter/HOWTO_files/pages/building_ui.html
r7709 r7711 29 29 Objective-C, and does not use XCode project files, so you can skip 30 30 the part of the tutorial that explains how to use XCode.</p> 31 32 <div class="section-head"> 33 <h2>Using InterfaceBuilder to Create the UI</h2> 34 </div> 31 35 32 36 <p>We'll begin by using Apple's InterfaceBuilder application to … … 117 121 called <a href="http://developer.apple.com/documentation/Cocoa/Conceptual/ObjCTutorial/05View/chapter_5_section_6.html#//apple_ref/doc/uid/TP40000863-CH7-DontLinkElementID_39">What's Next</a>, 118 122 you are done creating the interface for your 119 application. Save your nibfile and continue with the next section of 120 this HOWTO, on writing the Lisp code that provides the application's 121 behavior.</p> 123 application. Save your nibfile and continue with the next section.</p> 124 125 <div class="section-head"> 126 <h2>Adding Custom Classes to the nibfile</h2> 127 </div> 128 129 <p>The user interface for your application looks right, but before it 130 can work right, we have to record some more information in the 131 nibfile about the classes of the objects. In the following sections 132 we'll see how to write the Lisp code that defines your 133 application's classes. Before we're done with InteraceBuilder we 134 need to put references to those classes in the nibfile, so that 135 your application will create the correct objects when it 136 launches.</p> 137 138 <p>As you will see in the following sections, we'll be using Lisp code 139 to define two Objective C classes: Converter, and 140 ConverterController. The Converter class implements the method that 141 performs the actual currency conversion for our application; the 142 ConverterController class provides communication between the user 143 interface and the Converter object. We need a way to create instaces 144 of these two classes in the nibfile, so that launching the 145 application creates these instances and the connections between them 146 and the rest of the user interface.</p> 147 148 <p>In InterfaceBuilder's Library window, select the Cocoa Objects and 149 Controllers view:</p> 150 151 <div class="inline-image"> 152 <img src="../images/ibwin-leopard3.jpg"alt="" 153 border='0'/> 154 </div> 155 156 <p>Drag an Object from the Library window and drop it into the main 157 CurrencyConverter window:</p> 158 159 <div class="inline-image"> 160 <img src="../images/ibwin-leopard4.jpg"alt="" 161 border='0'/> 162 </div> 163 164 <p>Now tell InterfaceBuilder the name of the new object's class. With 165 the Object icon selected in the main CurrencyConverter window, 166 choose the Identity tab of the Inspector:</p> 122 167 123 168 <div class="nav">
Note:
See TracChangeset
for help on using the changeset viewer.
