App URL, 359
Apple's documentation
applicationDidFinishLaunching method, 288
changeStatusItem: method, 285
GraphiqueAppDelegate class, 287
intialize: method, 287
NSStatusBar, 284
PreferencesController.h, 285
PreferencesController.m, 285–286
showStatusItem outlet, 286
updateStatusItemState: method, 285, 287–288
windowDidLoad: check box, 285
AppleWWDRCA.cer file, 337
applicationDidFinishLaunching: method, 257, 258
application:openFile: method, 257
Automatic reference counting (ARC), 49, 50
Bundle ID, 357
COLORS dictionary, 171
Contact email address, 358
controlTextDidChange method, 171
Copyright, 358
Core Data, 217
application process, 218
benefits, 218
data model
Add Entity button, 224
entities, graph view, 226
Equation entity, 225
equations and groups object, 222
file saving, 223
graph view, 228
Group entity, 226
new data model, 223
new object model file, 222
Optional check box, 227
predefined Core Data attribute types, 224–225
string representation and timestamp, 225
To-Many Relationship, 227, 228
XML file, 221
definition, 218
frameworks linked to application, 218–219
Graphique with equations, 217
managed object context
GraphiqueAppDelegate.h, 230
high-level Core Data framework layout, 229
initialization process, 229
mergedModelFromBundles: method, 230
NSManagedObjectContext class, 229
NSSQLiteStoreType, 231
persistent store, 231
outline view control
Cocoa components, 243
double-click prevention, 245
equations selection handling, 244, 245
NSOutlineViewDelegate, 243
recently used equations storage
committing, 235
equation managed object creation, 235
EquationItem.h, 238
EquationItem.m, 238
GroupItem.h, 239
GroupItem.m, 239
initWithNibName:bundle: method, 242
insertNewObjectForEntityForName: inManagedObjectContext: method, 235
lazy loading technique, 241
loadChildrenForItem: method, 240–241
NSDateFormatter object, 234
NSFetchRequest object, 234
outlineView:isItemExpandable: method, 241
outlineView:numberOfChildrenOfItem: method, 241
outlineView outlet, 242
RecentlyUsedEquationsViewController.h, 232–233, 242
RecentlyUsedEquationsViewController.m, 236–237
remembering equations method, 233
remember: method algorithm, 234
.schema command, 238
Terminal.app application, 237
updated equationEntered: method, 237
Data graph
data caching and calculation, 106–108
GraphTableViewController.xib, 104
outlets and delegates
data source connection, 111
Edit GraphTableViewController.h, 109
GraphTableViewController.xib, 109
horizontalSplitView, 108
NSInteger, 110
NSTableViewDelegate protocol, 109
returning a cell's value, 110
Updated draw: Method, 110
verticalSplitView, 108
Text Field Cell item, 105
titled X and Y columns, 106
Developer Certificate Utility
Apple's certificate installation, 337
certificates creation
Create Certificate button, 338
development certificate, 338
distribution certificates, 338
file upload, 342
installed certificates, 344
Mac Installer Package certificate, 344
"Saved to disk" option, 340, 341
provisioning profile
App ID, 347
generation, 347
preference pane, 347
screen, 345
Xcode Organizer window, 347
dictionaryWithObjectsAndKeys static method, 171
End User License Agreement (EULA), 359
Equation entry panel
code isolation, 45
code reuse, 45
custom equation entry component, 48, 49, 52
equation editor, placeholder string, 57
Equation Entry View, 52
GraphiqueAppDelegate.h, 51
NSViewController
custom components, 46
EquationEntryViewController, 46, 47
generated files, 48
UIViewController class, 46
placeholder text specification, 56
split views resizing
autosizing schema, 53
EquationEntryViewController.xib, 53
Label component, 54
springs and struts, 54
Text Field component, 55
Graph plotting
background painting, 125
bounds property, 124
curve path, 128
drawing function, 124
drawRect: method, 124, 126–128
horizontal and vertical scaling factors, 124
lineToPoint, 128
NSBezierPath class, 124
plotted equation, 129
scaling factors, 125
Graphique, 1
application architecture, 27–28
Mac Dev Center program, 1
project and targets
Graphique.app product, 26
Graphique target Build phases, 25
GraphiqueTests Build phases, 25, 26
tree structure, 24
project creation
application options, 21
application running, 23
boilerplate code, 19
Cocoa Application, 20
code generator, 20
common initialization code, 19
Git repository, 21
new project, 21
public static void main method, 19
source-control repository, 21
system-wide menu bar, 23
source code and resources
application, 28
applicationDidFinishLaunching method, 31
Application Life Cycle, 32
Connections inspector, 30
GraphiqueAppDelegate class, 30
GraphiqueAppDelegate.m, 32, 33
GraphiqueDelegate.h, 32
Interface Builder, 29
linkages and dependencies, 28
main interface, 28
nibs, 29
NSApplication, 29
NSApplicationDelegate method, 34
NSApplicationDelegate protocol, 31–33
orderFrontStandardAboutPanel method, 34, 35
quick documentation, 32
Xcode IDE, 29
Xcode development tools (seeXcode development tools)
Graphique user interfaces, 119
equation editor, 119
equation entry field, 119
graph view
connections, 123
drawRect method, 120
graph plotting (see Graph plotting)
GraphTableViewController.h, 121
GraphTableViewController.m file, 122, 123
GraphTableViewController.xib, 120, 122
GraphTableViewController's view, 121
Interface Builder, 120
NSView class, 120
setNeedsDisplay method, 123
smarter equation editor (see Smarter equation editor)
text and graph toggling (see Tab view)
GraphiqueAppDelegate.m, 324
hasObjects method, 156
headerEquationToken.h, 142
Help Book creation
description and KEYWORDS, 295
directory structure creation, 291–292
Entering Equations help page, 295, 296
equation_editor_example.png, 295
equation_editor.png, 295
equations.html, 294
files and structure, 291
help index creation, 297
InfoPlist.strings, 296
main help file creation
browser window, 293
graphique.css, 293
open GraphiqueHelp.html, 293
updated help page, 294
plist file
Graphique.help bundle, 297
Info.plist, 298
Xcode Property List editor, 301
Xcode's plist editor, 297, 299
Xcode project, 300
Help creation, 289
Apple's documentation, 290
Entering Equations help, 302, 303
Help Book creation (see Help Book creation)
help book items, 290
misspelled equation, search results, 305, 306
resource bundle's directory structure, 290
search results, equation, 304, 305
user interface, 289
iCloud services, 337
Integrated development environment (IDE), 13
Interface Builder (IB), 120
Key-value coding (KVC), 113
Keywords, 358
Last in, first out (LIFO) approach, 155
Mac App Store submission, 323
Graphique termination, 324
guidelines, 323
icon addition
Graphique.icns file, 326
Icon Composer with blank window, 325
Icon Composer with images added, 325–326
image sizes, 324
Mac OS X Finder, 324
users' Docks, 324
initial window size and location
Attributes inspector, 334
Initial Position option, 332
MainMenu.xib, 332
OS X's Autosave feature, 333
800 pixels wide window, 332, 333
Size inspector, 332
iTunes Connect account set up, 356–357
menu clean up
Full Screen menu item, 330–331
Preferences Panel centering, 329
unused menu items removal, 330
property list file, 327
sandboxing
security measure, 349
signing code (see Signing code)
uploading
App Name, 357
application and signing identity, 361
Application Loader app, 360
application record and signing identity, 362
availability and pricing selection, 357
cryptography, 360
EULA, 359
rating, 359
Ready to Upload Binary button, 360
screenshots, 359
successful completion, 362, 363
successful validation, 361
"Unable to extract package metadata" error, 361
Xcode's Organizer window, 360
web site
Mac Dev Center, 2
Mac OS X desktop, 247
blank generic document icon, 260, 261
default preview, 260
file types registration, Lion
Graphique equation files, 257–259
.graphique file type, 253
UTI, .graphique extension, 253–255
Graphique XML files
Apple's PropertyList DTD, 251
destination file selection, 250
equation entry view controller, 249
Equation object, 250
GraphiqueAppDelegate.m method, 252
MainMenu.xib file, 252
Microsoft Word, 247
NSDictionary objects, 250
NSOpenPanel, 252
NSSavePanel, 251
openDocument method, 252
property list files, 247
Save and Save As menu items, 248
saveDocumentAs method, 250
text variable, 250
menu bar items
Apple's documentation (see Apple's documentation)
application functions, 277
NSStatusBar and NSStatusItem, 277–278
status item (see Status item)
third-party applications, 277
pictures/movies, thumbnail, 259
plug-in testing
Arguments Passed on Launch section, 268, 269
GraphiqueQL scheme, 270
QL plug-in build phases, 269, 270
qlmanage link, 268
setup process, 269
Terminal window, 267
preview implementation
export: method, 264
GeneratePreviewForURL function, 266
saveDocumentAs: method, 265
"Quick Look", definition, 259
Quick Look plug-in
Add Copy Files, 276
Copy Files Build Phase, 275
document content type UTIs, 264
GenerateThumbnailForURL and GeneratePreviewForURL, 264
GraphiqueQL, 262, 263, 275, 276
/Library/QuickLook, 261
Mac App Store, 276
thumbnail implementation
GenerateThumbnailForURL function, 271
Quick Look thumbnail testing, 273, 274
Mac OS X Lion, 1
Model-View-Controller (MVC) design pattern, 85
Mutable attributed string, 171
newTokenFromString method, 143–144
NSApplicationDelegate, 28
NSAttributedString class, 137
NSBackgroundColorAttributeName, 171
NSBaselineOffsetAttributeName attribute, 173
NSColor class, 125
NSColor value, 171
NSForegroundColorAttributeName, 171
NSMutableArray class, 157
NSRectFill function, 125
numberWithInt method, 171
Primary category, 358
Privacy policy URL, 359
public.data type, 255
QuickLook plug-in, 349
Review notes, 359
RGBA colors, 125
Secondary category, 358
Signing code
Developer Certificate Utility: (see Developer Certificate Utility)
SKU number, 357
Smarter equation editor
equation entry field
attributed string, 137
NSAttributedString class, 137
NSControl instance, 137
NSTextField widget, 137
EquationEntryViewController object, 170
evaluator updation
awk, 178
description method, 180
Equation.m, 180
implicit exponents, implicit multiplication, and pi, 177, 181
symbols, 177
x^2 graph, 177
exponent superscripting, 170
background color, 173
controlTextDidChange method, 173–175
NSFontAttributeName attribute, 173
NSSuperscriptAttributeName attribute, 173
implicit exponents, 137
implicit multiplication, 136, 137
inline error highlighting, 136
parenthesis matching, 136
parsing, equation
arrays in Equation.m, 140
Equation.h with a tokens property, 141
Equation.m, 141
EquationTokenizer class, 140
initializing tokens, 142
initWithString: method, 141, 142
OPERATORS array, 140
SYMBOLS array, 141
TRIG_FUNCTIONS array, 140
superscript exponents, 137
symbols, 137
syntax coloring, 136
text field, 136
tokenize method (see Tokenize method)
tokens
close parentheses, 138
EquationToken class, 139
EquationToken.h, 139
exponents, 138
implicit multiplication, 138
invalid input, 138
NSObject. EquationToken.h, 139
numbers, 138
open parentheses, 138
operators, 138
spaces, 138
symbols, 138
syntax coloring, 138
trigonometric functions, 138
variables, 138
trigonometric functions, 136
validator updation
Graphique tests, 177
invalid input, 177
invalid parentheses, 175
invalid trigonometric functions, 175
rules, 175
stack NSMutableArray, 156
Status item
applicationDidFinishLaunching: method, 283
configureStatusItem: method, 283
equations, 284
GraphiqueAppDelegate.h, 282–283
graphique18.png, 279
Graphique status item icon, zoomed in, 278, 279
GraphiqueStatusItemMenuDelegate.h, 279–280
GraphiqueStatusItemMenuDelegate.m, 280, 282
GroupItem instance, 280
Images directory, 279
loadData: and showEquationFromString: methods, 284
menuNeedsUpdate: method, 280
RecentlyUsedEquationsViewController.h, 283
showEquationFromString: method, 282
statusMenuItemSelected: method, 280
Support URL, 359
Syntax-colored equation, 173
Tab view
addition, 131
attributes inspector, 131
controller switching
connections, 134
tabs showing Graph View, 135
tabs showing table view, 136
expanded structure, 131
Fill Container Horizontally, 132, 133
Fill Container Vertically, 132, 133
GraphTableViewController.xib, 130
graph views maximization, 130
new tab structure with components, 132
Object Library, 130
rename, 134
resize, 133
Size inspector tab, 132
Tokenize method
Equation.m, 142
exponents recognition
Command+U, 155
ExponentTests.h, 154
GraphiqueTests folder, 152
rules, 150
initial method, 142
multiple decimal points detection, 161–163
stack, parenthesis matching, 155
LIFO approach, 155
NSMutableArray class, 155
popping, 155
pushing, 155
string–token convertion, 143–145
testing (seeTokenizer testing)
trigonometric functions and symbols
EquationToken object, 150
lowercaseString method, 148
newTokenFromString, 150
NSMakeRange function, 148
substringWithRange method, 148
SYMBOLS array, 148
TRIG_FUNCTIONS array, 148
Tokenizer testing
EquationTokenizeTests class, 164
EquationTokenizeTests.h, 164
EquationTokenizeTests.m, 164
exponents, 165
GraphiqueTests folder, 164
invalid cases, 169
simple equations, 165
trigonometric functions and symbols, 167
whitespace, 166
UNIX Development tools, 6
User input handling, 73
App Store comments, 91
button presses
Edit Equation.h, 88
EquationEntryViewController.h, 90
Equation.h, 88
GraphTableViewController method, 90, 91
init method, Equation.m, 88
MVC design pattern, 85
NSString, 87
Return key, 85
UI components, 85
data graph (see Data graph)
Graphique application, 73, 112
KVC, 113
Model Key Path field, 114
parabola, 0.1 interval, 117
parabola, 5.0 interval, 116
real-time validation
feedback attribute, UI component, 103
feedback label, 100
real-time validation error, 104
text field delegate, interface builder, 103
Wrapping Label object, 102
slider bound, 1.0 interval, 115
split view sizes
maximum size constraining method, 77–79
minimum size constraining method, 76
NSSplitViewDelegate protocol, 76
unit testing
102 and 103 error codes, 98–99
definition, 94
GraphiqueTests class, 95
unit test launcher, 97
window resizing
Attributes inspector, 74
Equation Entry Viewsubviews size adjustment, 80
Graphique stretches, 82
Graphique window, 76
open MainMenu.xib, 79
Recent Equations View, 100 pixels, 82, 83
Recent Equations View Shrunk, 82
Resize check box, 74
splitView:resizeSubviewsWithOldSize:, 81
writing validator
equation validation method and private category, 93–94
Graphique error codes, 92
NSError object, 92
romanNumeralValue: to NSNumber method, 92
validate: method, 92
User interface, 37
equation entry panel (see Equation entry panel)
graph panel, 57
empty Graph View, 58
GraphTableViewController, 57, 61
table view, 60
Graphique application, 38
horizontal NSSplitView
Graphique application, 43
Horizontal Split View object, 41
MainMenu.xib, 39
Size inspector, 42
View object, 40
layout, 39
recently used equations
data source creationdata display, 69–71
EquationItem.h, 65
EquationItem.m, 65
GraphiqueAppDelegate.h, 64
GraphiqueAppDelegate.m, 64
GroupItem.h, 66
GroupItem.m, 66
Mac OS X implementation, 62
NSOutlineViewDataSource protocol, 65
numberOfChildren method, 67
Outline View object, 63
RecentlyUsedEquationsViewController files, 62, 63
widgets, 37
UTExportedTypeDeclarations key, 253
Version number, 358
WWDR Intermediate Certificate, 337
Xcode development tools
App Store installation
Apple ID and password, 9
downloading in Launchpad, 9
3GB disk space, 12
Install Xcode app, 10
iOS SDK agreements, 11
password, 11
writing files to drive, 11, 12
Xcode Installer splash screen, 10
"Create a new Xcode project" option, 13
Debug Area and Debug Bar, 17
Editor Area and Jump Bar, 16
Editor Selector, 18
Filter Bar, 17
IDE, 13
Inspector Pane, 18
Inspector Selector Bar, 18
Library Pane, 18
main.m file, 15
Navigator Area and Navigator Selector Bar, 17
tooltip display, 16
View Selector, 18
Visual Studio levels, 2
Web download installation
disk image file, 3
instructions, About Xcode file, 3
successful completion, 9
System Tools, 6
UNIX Development tools, 6
writing Xcode files to drive, 8
window with HelloWorld project, 13, 15
Xcode 4 software, 2