- Tonight is hosted by President Bob Wood. Bob Wood is a 50-something bear of a man with glasses and a gray beard. (Dangerous Bob - a younger Bob Wood ... during the Eisenhower administration) - the All Powerful OZ in the for sale forum (i.e. moderator) - bob@thinkbob.com 762.0447
- Co-Hosted by VP Ridge Prevost: another 50-something also with glasses. ridgep@aol.com, 298.7165
- Secretary: Curt Blanchard - crblanchard@cox.net, 290.3848
- Treasurer: Mark Jaffee - mjaffee.az@gmail.com, 299.9699
- Member Advocate: Joyce Hardin, jrhardin@mindspring.com, 624.9644
- Volunteer Programs: Tony Ewing, tce@ieee.org, 747.8283
- Volunteer Web Site: Jerry Cederquist, salsa@tmug.com, 529.6593
- Volunteer Training: John Nemerovski, john.nemo@gmail.com, 575.9596
- Volunteer Training: Mike Peterson, mikeguru@mac.com, 325.4885
- Membership: Marv Held, m122430@cox.net, 747.8547
- Library: Michael Prete, michaelprete@cox.net, 325.4885
- Publicity: Zack Williams, zdw@artisancomputer.com, 977.2973
- Newsletter: Tom McGorray, tom@xgboy.com, 297.7878
- Computer & Accessory Donations: Sara Matton, tmugsara@gmail.com
- Membership Cost: $30 annually
- ~17 people attending
- TMUG members can get their business web-sites posted.
- Review forum on the tmug site | Members Forum | Public Forum
- Forum powered by Gossamar Forums
- Learned how to import US Holidays to iCal by subscribing to site. Look HERE.
- Bob Finley showed me a neat trick for the mac: you start typing a word and when you hit F5 (or fn-F5 on macbook pro) it will provide a popup pick list of possible words to complete the word. Thank you Bob!
- TMUG luggage tags were handed out to all TMUG members.
- TMUG Meeting Survey was handed out.
- Michael
- $273.64 HOME-GUARD (part of U.A.) for full-house surge protection. Tracy 745.3333. Apparently they put a box behind the electric meter.
- A lady renting a VHS-to-Digital system
- Gretchen (Bob's wife) - newest game Plants vs. Zombies demo.
She reminds me a little bit of Martha Stewart. Need beads? Great Presentation! - Pages Presentation: pages is word processing an page layout. She showed us some of the neat alignment features within Pages. The Inspector has lots of settings to provide more fine-grained control.
- Gretchen: Ooh [yuck], I never use Microsoft tools on my machine.
- Below is a picture layout done in Pages. Pages Rocks!

- Red River Paper : Paper types, Paper Weights, Thickness
- Excitement and Suspense as door prizes are drawn!
Wednesday, July 15, 2009
TMUG Meeting
Tuesday, July 14, 2009
Saving State
NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
[defaults setInteger:polygonShape.numberOfSides forKey:@"numberOfSides"];
NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
int numberOfSides = [defaults integerForKey:@"numberOfSides"];
if(numberOfSides!=0) {
polygonShape.numberOfSides=numberOfSides;
numberOfSidesLabel.text = [NSString stringWithFormat:@"%d",numberOfSides];
}
Core Animation and iPhone Application Programming Guide
iPhone App: Amazing Polygon App - update 4 images and transforms
- Image pull - from a resource file
- Image rendering - both programmatically and using the Interface Builder
- Image transformation - scale (size), rotation, and translation (position)



Monday, July 13, 2009
Quartz 2D and Core Graphics
Sunday, July 12, 2009
iPhone App: Amazing Polygon App - update 2 simple shape
UIView Structures
- CGPoint (x,y)
- CGSize (width, height)
- CGRect (origin + size, or CGPoint + CGSize)
iPhone UIView
- draw into the rectangular area
- process events (since it inherits from UIResponder)
- every view has ONE superview (assuming the view has been put into another view)
- every view has ZERO or MORE subviews
Finished Lecture 3 and 4
iPhone App: Amazing Polygon App - update 1 Slider

General Process:
- Create the action method in your Controller to process events from the slider.
- Add an Outlet to your Controller header file IBOutlet UISlider *slider;.
- Mark this method with the (IBAction) macro.
- Bring up your .xib in Interface Builder
- Add a slider control (UISlider) to the View
- Make a connection from the slider control to the Controller object...when you release it you will be prompted to select the action to be invoked.
- Save everything and test it out.
Cocoa App Pieces
- Compiled code (written code compiled + framework code/libraries)
- Interface Files (UI Elements/Controls, Outlets, Connections, etc.)
- Resources (sounds, text/strings, audio, etc)
- Application Configuration (Info.plist)
Cocoa Looping a Dictionary
NSMutableDictionary *dict = [NSMutableDictionary dictionary];
[dict setValue:[NSDate date] forKey:@"now"];
[dict setValue:[NSDate dateWithTimeIntervalSinceNow:-60] forKey:@"1 minutes ago"];
[dict setValue:[NSDate dateWithTimeIntervalSinceNow:60 * 30] forKey:@"30 minutes from now"];
[dict setValue:[NSDate dateWithTimeIntervalSinceNow:-60 * 60 * 24] forKey:@"24 hours ago"];
[dict setValue:[NSDate dateWithTimeIntervalSinceNow:-7 * 60 * 60 * 24] forKey:@"a week ago today"];
[dict setValue:[NSDate dateWithTimeIntervalSinceNow:365 * 60 * 60 * 24] forKey:@"a year from now"];
for (NSString *key in dict)
{
NSDate *date = [dict objectForKey:key];
NSLog([NSString stringWithFormat:@"Key: '%@' Date: '%@'", key, date]);
}
Cocoa URL's using NSUrl
#import
NSURL *someURL = [NSURL URLWithString:@"http://www.somesite.com:8080/path/targetpage.html"];
NSLog([NSString stringWithFormat:@"Host: '%@' Port: '%d'", [someURL host], [someURL port]]);
Cocoa Dictionary like Java HashMap
COCOA has a couple dictionary objects. One is changeable (mutable) and one is not.
NSDictionary and NSMutableDictionary
NSMutableDictionary *dict = [NSMutableDictionary dictionary];
[dict setValue:[NSDate date] forKey:@"now"];
[dict setValue:[NSDate dateWithTimeIntervalSinceNow:-60] forKey:@"1 minutes ago"];
XCode: The Great Escape (esc)
Saturday, July 11, 2009
iPhone App: Amazing Polygon App




Lessons learned:
- Once you have your initial user interface put together, chances are you'll want to modify it in some ways later. You can easily rearrange the positions of the controls in the Interface Builder.
- To add new controls is not a big problem either. Simply add the controls in Interface Builder. Then in your Controller add instance variables representing the controls and be sure to properly decorate these instance variables with the Cocoa Macros to let the Interface Builder know about them. Once this is done, the instance variables will appear as outlets in the Interface Builder for the controller. Now it is a simple matter to add a connection between the outlet and the control on your user interface!!
Friday, July 10, 2009
XCode: Go to Counterpart

NOTE: You can modestly change the behavior of this within the XCode Preferences under the General icon:

XCode is flexible...even does the splits!
- West: Groups & Files
- North East: File Names
- South East: Edit Views
Interface Builder


So we've created:
- some basic user interface with some user interface components (e.g. 2 buttons and 2 labels)
- a controller object (to be used to control how the user interface is used.
Now we want to connect the UI components to the controller. Welcome the Connections Inspector (cmd-2)
- cmd-1: Attributes Inspector
- cmd-2: Connections Inspector
- cmd-3: Size Inspector
- cmd-4: Identity Inspector
2009-07-10 16:40:15.586 HelloPoly[4322:20b] Unknown class Controller in Interface Builder file.
Don't despair! In Interface Builder select the Controller object and then do a File -> write class files.
Be sure to look at UIKit Reference API
One thing to remember is that everything you can do in Interface Builder you can do programmatically.
xib ~ nib ~ Interface File
- Layout and configure the user interface
- Define a controller class and create an instance of that class
- Connect the user interface and the controller
- Generate source files for the new controller class
Key Interface Builder Features
- Helps you design Aqua-compliant user interfaces with the "Snap to Aqua Guidelines" feature
- Creates both Cocoa nibs and Carbon nibs
- A key part of the Cocoa application development process - lets you subclass, connect objects, and establish default values, helping your application require less code
- "Test Interface" mode lets you try your UI without writing any code
- Spell Checks your UI text as you go
Thursday, July 9, 2009
Objective-C Tutorial at CocoaDevCentral
Believe in your 'self' but be careful when assigning.
@implementation Person
- (void)setAge:(int)newAge {
[self setAge:newAge]; // Infinite loop!
}
@end
Objective-C policies for properties:
setters/getters vs. properties
@interface RunningShoe : NSObject {
// instance variables
NSString* shoeName;
}
// method declarations
-(NSString *) shoeName;
-(void) setShoeName:(NSString*) _someShoeName;
@end
and the implementation:
@implementation RunningShoe
- (void)setShoeName:(NSString *)value {
if (value != shoeName) {
[value release];
name = [value copy];
}
}
@end
This is kind of wordy after a while. Well, there is a simpler alternative called properties:
@interface RunningShoe : NSObject {
NSString* shoeName;
}
@property (copy) shoeName;
@end
Objective-C 'description' like Java toString...
WARNING: just because NSObject defines description does not mean the runtime will automatically recognize your override of the method UNLESS you explicitly declare it in your header (.h) file.
@interface MyObj : NSObject {
// instance variables
}
-(NSString *) description;
@end
Now the implementation (.m) file:
@implementation MyObj {
// instance variables
}
-(NSString *) description {
@end
You say Either I say I-ther, You say AppKit I say UIKit
Wednesday, July 8, 2009
Tuesday, July 7, 2009
Lecture 2 ... again!
Sunday, July 5, 2009
Java has Method Reflection, Cocoa has Introspection and dynamic messaging with Selectors....
// SEL is a type
// Here we create an instance of sell representing 'someMethod'
SEL sel = @selector(someMethod:)
// See if some object responds to this
if ( [obj respondsToSelector:sel] ) {
// Now invoke the selector (the method, if you will)
[obj performSelector:sel withObject:self]
}
Objective C has Dynamic Typing
NSString *charlieBrownAuthor = @"Charles Schultz";
NSLog(charlieBrownAuthor);
But Dynamically:
id nm = @"Funky Chicken";
NSLog(nm);
Apparently all type checking is done at compile time. (not run time)
Friday, July 3, 2009
XCode
Learning about the XCode development environment for Mac OS X has been an interesting process.
I currently have XCode Version 3.1.2
There is a lot to learn. Tons of configuration capabilities that give the environment a lot of power...and a lot of complexity.
Coming from the Eclipse/Java world it is clear that we're not in Kansas any more :-)
One thing that I find interesting is the search mechanism in XCode. It is tightly bound to Mac OS X's Spotlight feature. So if you need to search for something it must be on a drive that has been indexed by Spotlight. If it is on a mounted drive you'll want to let Spotlight know about it by using the mdutil utility:
> sudo mdutil -i on /Volumes/<volume_name>
Thursday, July 2, 2009
Tethering your iPhone

http://www.gadgetreview.com/2009/06/gadget-how-to-iphone-tethering-without-jailbreaking.html
NOTE: THIS POST POSTED BY TETHERED iPhone!
From the Apple Byte podcast, Brian Tong says:
- http://help.benm.at/help.php
- Scroll down to tethering and internet settings
- Press on the Download link
- Select your country (U.S.A.)
- Select your carrier (at&t)
- You'll come to a page with an Install button
- Then go to the home screen
- Go to Settings
- Go to General
- Go to Network
- Now you'll see an Internet Tethering Option
- To activate - turn it on (either Bluetooth or USB)
- Connect USB between iPhone and Mac
- Network will automatically be detected

























