Mac OS X Programming
#1

[attachment=15095]
Mac OS X Programming
Using Cocoa with Objective-C
What is covered:
Cocoa application development
Objective-C as the primary programming language
Jaguar (10.2) Developer Tools although most comments apply to Xcode (Panther)
What is not covered:
Carbon application programming
Porting Unix applications to Mac OS X
Java programming
The Apple Developer Tools
Project Builder (or Xcode under Mac OS X 10.3)
IDE (code editor and project browser)
Front end for GCC
Interface Builder
Used for GUI construction
Used to page link UI elements to methods in code
Both tools have a significant NeXT heritage
Project Builder & Xcode
Used to edit source code
Edit source code
Set project properties
Set compilation options
Set properties of compiled application
Interface Builder
Used to edit the .nib file
Can access this through Project Builder or Xcode
The .nib file defines what objects exist at startup in the application
The .nib file specifies the links between user interface elements and methods in objects
Mac OS X Environment
Cocoa
Set of OO APIs derived from NeXT technologies
The NS prefix of most Cocoa objects stands for NeXTSTEP (seems to have followed Mr. Jobs)
Framework for building applications
Set of objects that mediate between the program and the OS
Used to take advantage of Carbon features
Most of the iApps are built on top of Cocoa
iPhoto, iDVD, iChat, Mail
Objective-C Programming
General syntax
.m and .h files
General project structure
How a Cocoa application starts up
Using other languages
Objective-C
An extension of ANSI C
Programmer can choose to implement features as classes (in an OO manner) or use standard C methods such as structures
Main extensions are message passing and the syntax for defining classes and methods
The extensions are straightforward, the OO design principles are sometimes hard to comprehend
Objective-C: General Syntax
anObject = [NSObject alloc];
Objective-C: .m & .h files
.m files
Objective-C implementation file for a class
.h files
Header files for .m files
Define the interface to the class
Can also use .h files as standard C style header file for macros, declarations etc.
Objective-C: Project Structure
main.m
Contains the main() function
Objective-C class and interface files
Usually one application controller class
Other classes as required
Other C header files (if required)
Other C source files (if required)
Objective-C: Typical Start Up
main() function in main.m calls NSApplication()
This opens the .nib file for the application
The .nib file defines what objects are created
The classes which define these objects can have a startup method (called awakeFromNib())
Objective-C & Other Languages
Just add the functions into the .m implementation file and call it wherever it is required
I used a Pascal call-back routine in the screen reader to operate TTS
Sources of Documentation
General programming websites
Apple’s Developer website (in particular the sample code section)
Books (O’Reilly and others)
Documentation on hard drive installed with Developer tools (both documentation and sample code)
Strings
There are two types of strings I encountered:
Cocoa strings (string objects)
“C” style strings (character arrays)
Cocoa String Objects
NSString (standard string object)
NSMutableString (string object that is able to be manipulated)
Straightfoward to convert between the two
Arrays
NSArray object
Speech Synthesis
Need to create a new speech channel
If you use the standard OS speech channel you can generate speech but you have no control over it
You can specify TTS properties when you create a speech channel (or just use the system defaults)
Once created it is easy to generate speech
The TTS engine runs as a separate process (leaving the application to do what it wants)
It is interruptible (no queue)
You need a call-back routine to determine when the TTS engine finishes generating speech from the string you sent it
Putting Together an Application
Adding an icon to the application
About Box tricks
Can use a text, RTF or image file
Changing version numbers
There are two places to alter version numbers
Distributing an application
Disk image (.dmg file)
Installer package
Reply

Important Note..!

If you are not satisfied with above reply ,..Please

ASK HERE

So that we will collect data for you and will made reply to the request....OR try below "QUICK REPLY" box to add a reply to this page
Popular Searches: cocoa iphoto api, cocoapods xcode, nextstep bishops stortford, cocoa butter, advanced mac os x programming torrent, gujrati nib, mac os x programming,

[-]
Quick Reply
Message
Type your reply to this message here.

Image Verification
Please enter the text contained within the image into the text box below it. This process is used to prevent automated spam bots.
Image Verification
(case insensitive)

Possibly Related Threads...
Thread Author Replies Views Last Post
  C# classes - CS 638 Web Programming computer girl 0 685 08-06-2012, 01:21 PM
Last Post: computer girl
  An Adaptive Programming Model for Fault-Tolerant Distributed Computing electronics seminars 3 2,578 20-02-2012, 01:13 PM
Last Post: seminar paper
  Soft-TDMAC: A Software-Based 802.11 Overlay TDMA MAC with Microsecond Synchronization Projects9 0 617 23-01-2012, 04:45 PM
Last Post: Projects9
  MAC in Motion: Impact of Mobility on the MAC of Drive-Thru Internet Projects9 0 769 23-01-2012, 04:34 PM
Last Post: Projects9
  Handling Triple Hidden Terminal Problems for Multichannel MAC in Long-Delay Underwate Projects9 0 569 23-01-2012, 04:18 PM
Last Post: Projects9
  Object Oriented Programming: Its Origins and Importance in Computer Science smart paper boy 0 1,197 14-07-2011, 10:29 AM
Last Post: smart paper boy
  C Language Programming seminar class 0 1,648 11-05-2011, 09:51 AM
Last Post: seminar class
  Wireless MAC Protocol Using Implicit Pipelining project topics 0 689 02-05-2011, 12:03 PM
Last Post: project topics
  Cooperative Asynchronous Multichannel MAC: Design, Analysis, and Implementation project topics 0 525 02-05-2011, 10:53 AM
Last Post: project topics
  Calculator Code: Programming Code for Use within a Scientific Calculator seminar surveyer 0 2,348 04-01-2011, 01:08 PM
Last Post: seminar surveyer

Forum Jump: