Skip to content
This repository has been archived by the owner on Jun 25, 2021. It is now read-only.

Commit

Permalink
Changed to postfix under bar standard.
Browse files Browse the repository at this point in the history
Changed member variables to the postfix underbar standard.  Added
internal "required" interface definitions for some methods.
  • Loading branch information
epreston committed Oct 3, 2011
1 parent d4ce095 commit cff6306
Show file tree
Hide file tree
Showing 18 changed files with 268 additions and 343 deletions.
4 changes: 2 additions & 2 deletions Example 1/Classes/Controller/PSHTreeGraphAppDelegate.h
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
@class PSHTreeGraphViewController; @class PSHTreeGraphViewController;


@interface PSHTreeGraphAppDelegate : NSObject <UIApplicationDelegate> { @interface PSHTreeGraphAppDelegate : NSObject <UIApplicationDelegate> {
UIWindow *window; UIWindow *window_;
PSHTreeGraphViewController *viewController; PSHTreeGraphViewController *viewController_;
} }


@property (nonatomic, retain) IBOutlet UIWindow *window; @property (nonatomic, retain) IBOutlet UIWindow *window;
Expand Down
12 changes: 6 additions & 6 deletions Example 1/Classes/Controller/PSHTreeGraphAppDelegate.m
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -14,17 +14,17 @@
@implementation PSHTreeGraphAppDelegate @implementation PSHTreeGraphAppDelegate




@synthesize window; @synthesize window = window_;
@synthesize viewController; @synthesize viewController = viewController_;




#pragma mark - Application Lifecycle #pragma mark - Application Lifecycle


- (BOOL) application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions - (BOOL) application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{ {
// Override point for customization after app launch. // Override point for customization after app launch.
[window addSubview:viewController.view]; [window_ addSubview:viewController_.view];
[window makeKeyAndVisible]; [window_ makeKeyAndVisible];


return YES; return YES;
} }
Expand Down Expand Up @@ -62,8 +62,8 @@ - (void) applicationDidReceiveMemoryWarning:(UIApplication *)application


- (void) dealloc - (void) dealloc
{ {
[viewController release]; [viewController_ release];
[window release]; [window_ release];
[super dealloc]; [super dealloc];
} }


Expand Down
9 changes: 6 additions & 3 deletions Example 1/Classes/Controller/PSHTreeGraphViewController.h
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -13,9 +13,12 @@


@class PSBaseTreeGraphView; @class PSBaseTreeGraphView;


@interface PSHTreeGraphViewController : UIViewController <PSTreeGraphDelegate> { @interface PSHTreeGraphViewController : UIViewController <PSTreeGraphDelegate>
PSBaseTreeGraphView *treeGraphView; {
NSString *rootClassName;
@private
PSBaseTreeGraphView *treeGraphView_;
NSString *rootClassName_;
} }


// The TreeGraph // The TreeGraph
Expand Down
21 changes: 10 additions & 11 deletions Example 1/Classes/Controller/PSHTreeGraphViewController.m
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -20,20 +20,19 @@ @implementation PSHTreeGraphViewController


#pragma mark - Property Accessors #pragma mark - Property Accessors


@synthesize treeGraphView; @synthesize treeGraphView = treeGraphView_;

@synthesize rootClassName = rootClassName_;
@synthesize rootClassName;


- (void) setRootClassName:(NSString *)newRootClassName - (void) setRootClassName:(NSString *)newRootClassName
{ {
NSParameterAssert(newRootClassName != nil); NSParameterAssert(newRootClassName != nil);


if (![rootClassName isEqualToString:newRootClassName]) { if (![rootClassName_ isEqualToString:newRootClassName]) {
[rootClassName release]; [rootClassName_ release];
rootClassName = [newRootClassName copy]; rootClassName_ = [newRootClassName copy];


// Get an ObjCClassWrapper for the named Objective-C Class, and set it as the TreeGraph's root. // Get an ObjCClassWrapper for the named Objective-C Class, and set it as the TreeGraph's root.
[treeGraphView setModelRoot:[ObjCClassWrapper wrapperForClassNamed:rootClassName]]; [treeGraphView_ setModelRoot:[ObjCClassWrapper wrapperForClassNamed:rootClassName_]];
} }
} }


Expand All @@ -46,10 +45,10 @@ - (void) viewDidLoad
[super viewDidLoad]; [super viewDidLoad];


// Set the delegate to self. // Set the delegate to self.
[treeGraphView setDelegate:self]; [self.treeGraphView setDelegate:self];


// Specify a .nib file for the TreeGraph to load each time it needs to create a new node view. // Specify a .nib file for the TreeGraph to load each time it needs to create a new node view.
[treeGraphView setNodeViewNibName:@"ObjCClassTreeNodeView"]; [self.treeGraphView setNodeViewNibName:@"ObjCClassTreeNodeView"];


// Specify a starting root class to inspect on launch. // Specify a starting root class to inspect on launch.
[self setRootClassName:@"UIControl"]; [self setRootClassName:@"UIControl"];
Expand All @@ -66,7 +65,7 @@ - (void) willAnimateRotationToInterfaceOrientation:(UIInterfaceOrientation)inter
duration:(NSTimeInterval)duration duration:(NSTimeInterval)duration
{ {
// Keep the view in sync // Keep the view in sync
[treeGraphView parentClipViewDidResize:nil]; [self.treeGraphView parentClipViewDidResize:nil];
} }




Expand Down Expand Up @@ -112,7 +111,7 @@ - (void) viewDidUnload


- (void) dealloc - (void) dealloc
{ {
[rootClassName release]; [rootClassName_ release];
[super dealloc]; [super dealloc];
} }


Expand Down
6 changes: 3 additions & 3 deletions Example 1/Classes/View/PSHLeafView.h
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@
@private @private


// Interface // Interface
UIButton *expandButton; UIButton *expandButton_;
UILabel *titleLabel; UILabel *titleLabel_;
UILabel *detailLabel; UILabel *detailLabel_;
} }


@property (nonatomic, assign) IBOutlet UIButton *expandButton; @property (nonatomic, assign) IBOutlet UIButton *expandButton;
Expand Down
4 changes: 3 additions & 1 deletion Example 1/Classes/View/PSHLeafView.m
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@


@implementation PSHLeafView @implementation PSHLeafView


@synthesize expandButton, titleLabel, detailLabel; @synthesize expandButton = expandButton_;
@synthesize titleLabel = titleLabel_;
@synthesize detailLabel = detailLabel_;


- (id) initWithFrame:(CGRect)frame - (id) initWithFrame:(CGRect)frame
{ {
Expand Down
22 changes: 7 additions & 15 deletions Example 1/Interface/MainWindow.xib
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -2,20 +2,15 @@
<archive type="com.apple.InterfaceBuilder3.CocoaTouch.iPad.XIB" version="8.00"> <archive type="com.apple.InterfaceBuilder3.CocoaTouch.iPad.XIB" version="8.00">
<data> <data>
<int key="IBDocument.SystemTarget">800</int> <int key="IBDocument.SystemTarget">800</int>
<string key="IBDocument.SystemVersion">11A511</string> <string key="IBDocument.SystemVersion">11B26</string>
<string key="IBDocument.InterfaceBuilderVersion">1617</string> <string key="IBDocument.InterfaceBuilderVersion">907</string>
<string key="IBDocument.AppKitVersion">1138</string> <string key="IBDocument.AppKitVersion">1138</string>
<string key="IBDocument.HIToolboxVersion">566.00</string> <string key="IBDocument.HIToolboxVersion">566.00</string>
<object class="NSMutableDictionary" key="IBDocument.PluginVersions"> <object class="NSMutableDictionary" key="IBDocument.PluginVersions">
<string key="NS.key.0">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string> <string key="NS.key.0">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string key="NS.object.0">534</string> <string key="NS.object.0">141</string>
</object> </object>
<array key="IBDocument.IntegratedClassDependencies"> <array class="NSMutableArray" key="IBDocument.EditedObjectIDs"/>
<string>IBUIWindow</string>
<string>IBUICustomObject</string>
<string>IBUIViewController</string>
<string>IBProxyObject</string>
</array>
<array key="IBDocument.PluginDependencies"> <array key="IBDocument.PluginDependencies">
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string> <string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
</array> </array>
Expand All @@ -30,12 +25,9 @@
<string key="targetRuntimeIdentifier">IBIPadFramework</string> <string key="targetRuntimeIdentifier">IBIPadFramework</string>
</object> </object>
<object class="IBUIWindow" id="62075450"> <object class="IBUIWindow" id="62075450">
<reference key="NSNextResponder"/> <nil key="NSNextResponder"/>
<int key="NSvFlags">292</int> <int key="NSvFlags">292</int>
<string key="NSFrameSize">{768, 1024}</string> <string key="NSFrameSize">{768, 1024}</string>
<reference key="NSSuperview"/>
<reference key="NSWindow"/>
<reference key="NSNextKeyView"/>
<object class="NSColor" key="IBUIBackgroundColor"> <object class="NSColor" key="IBUIBackgroundColor">
<int key="NSColorSpace">1</int> <int key="NSColorSpace">1</int>
<bytes key="NSRGB">MSAxIDEAA</bytes> <bytes key="NSRGB">MSAxIDEAA</bytes>
Expand All @@ -55,7 +47,6 @@
<string key="IBUINibName">PSHTreeGraphViewController</string> <string key="IBUINibName">PSHTreeGraphViewController</string>
<reference key="IBUISimulatedStatusBarMetrics" ref="456458906"/> <reference key="IBUISimulatedStatusBarMetrics" ref="456458906"/>
<object class="IBUISimulatedOrientationMetrics" key="IBUISimulatedOrientationMetrics"> <object class="IBUISimulatedOrientationMetrics" key="IBUISimulatedOrientationMetrics">
<int key="IBUIInterfaceOrientation">1</int>
<int key="interfaceOrientation">1</int> <int key="interfaceOrientation">1</int>
</object> </object>
<string key="targetRuntimeIdentifier">IBIPadFramework</string> <string key="targetRuntimeIdentifier">IBIPadFramework</string>
Expand Down Expand Up @@ -215,7 +206,8 @@
<integer value="800" key="NS.object.0"/> <integer value="800" key="NS.object.0"/>
</object> </object>
<bool key="IBDocument.PluginDeclaredDependenciesTrackSystemTargetVersion">YES</bool> <bool key="IBDocument.PluginDeclaredDependenciesTrackSystemTargetVersion">YES</bool>
<nil key="IBDocument.LastKnownRelativeProjectPath"/>
<int key="IBDocument.defaultPropertyAccessControl">3</int> <int key="IBDocument.defaultPropertyAccessControl">3</int>
<string key="IBCocoaTouchPluginVersion">534</string> <string key="IBCocoaTouchPluginVersion">141</string>
</data> </data>
</archive> </archive>
97 changes: 9 additions & 88 deletions Example 1/Interface/ObjCClassTreeNodeView.xib
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -3,19 +3,14 @@
<data> <data>
<int key="IBDocument.SystemTarget">800</int> <int key="IBDocument.SystemTarget">800</int>
<string key="IBDocument.SystemVersion">11B26</string> <string key="IBDocument.SystemVersion">11B26</string>
<string key="IBDocument.InterfaceBuilderVersion">1617</string> <string key="IBDocument.InterfaceBuilderVersion">907</string>
<string key="IBDocument.AppKitVersion">1138</string> <string key="IBDocument.AppKitVersion">1138</string>
<string key="IBDocument.HIToolboxVersion">566.00</string> <string key="IBDocument.HIToolboxVersion">566.00</string>
<object class="NSMutableDictionary" key="IBDocument.PluginVersions"> <object class="NSMutableDictionary" key="IBDocument.PluginVersions">
<string key="NS.key.0">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string> <string key="NS.key.0">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string key="NS.object.0">534</string> <string key="NS.object.0">141</string>
</object> </object>
<array key="IBDocument.IntegratedClassDependencies"> <array class="NSMutableArray" key="IBDocument.EditedObjectIDs"/>
<string>IBUIButton</string>
<string>IBUIView</string>
<string>IBUILabel</string>
<string>IBProxyObject</string>
</array>
<array key="IBDocument.PluginDependencies"> <array key="IBDocument.PluginDependencies">
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string> <string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
</array> </array>
Expand All @@ -30,15 +25,14 @@
<string key="targetRuntimeIdentifier">IBIPadFramework</string> <string key="targetRuntimeIdentifier">IBIPadFramework</string>
</object> </object>
<object class="IBUIView" id="191373211"> <object class="IBUIView" id="191373211">
<reference key="NSNextResponder"/> <nil key="NSNextResponder"/>
<int key="NSvFlags">274</int> <int key="NSvFlags">274</int>
<array class="NSMutableArray" key="NSSubviews"> <array class="NSMutableArray" key="NSSubviews">
<object class="IBUIButton" id="246752469"> <object class="IBUIButton" id="246752469">
<reference key="NSNextResponder" ref="191373211"/> <reference key="NSNextResponder" ref="191373211"/>
<int key="NSvFlags">292</int> <int key="NSvFlags">292</int>
<string key="NSFrame">{{191, 10}, {29, 31}}</string> <string key="NSFrame">{{191, 8}, {29, 31}}</string>
<reference key="NSSuperview" ref="191373211"/> <reference key="NSSuperview" ref="191373211"/>
<reference key="NSWindow"/>
<int key="IBUIContentMode">4</int> <int key="IBUIContentMode">4</int>
<string key="targetRuntimeIdentifier">IBIPadFramework</string> <string key="targetRuntimeIdentifier">IBIPadFramework</string>
<int key="IBUIContentHorizontalAlignment">0</int> <int key="IBUIContentHorizontalAlignment">0</int>
Expand Down Expand Up @@ -71,7 +65,6 @@
<int key="NSvFlags">292</int> <int key="NSvFlags">292</int>
<string key="NSFrame">{{9, 7}, {169, 21}}</string> <string key="NSFrame">{{9, 7}, {169, 21}}</string>
<reference key="NSSuperview" ref="191373211"/> <reference key="NSSuperview" ref="191373211"/>
<reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="298809504"/> <reference key="NSNextKeyView" ref="298809504"/>
<bool key="IBUIOpaque">NO</bool> <bool key="IBUIOpaque">NO</bool>
<bool key="IBUIClipsSubviews">YES</bool> <bool key="IBUIClipsSubviews">YES</bool>
Expand All @@ -97,8 +90,6 @@
<int key="NSvFlags">292</int> <int key="NSvFlags">292</int>
<string key="NSFrame">{{9, 23}, {169, 21}}</string> <string key="NSFrame">{{9, 23}, {169, 21}}</string>
<reference key="NSSuperview" ref="191373211"/> <reference key="NSSuperview" ref="191373211"/>
<reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="246752469"/>
<bool key="IBUIOpaque">NO</bool> <bool key="IBUIOpaque">NO</bool>
<bool key="IBUIClipsSubviews">YES</bool> <bool key="IBUIClipsSubviews">YES</bool>
<int key="IBUIContentMode">7</int> <int key="IBUIContentMode">7</int>
Expand All @@ -117,12 +108,9 @@
</object> </object>
</array> </array>
<string key="NSFrameSize">{229, 48}</string> <string key="NSFrameSize">{229, 48}</string>
<reference key="NSSuperview"/>
<reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="189980015"/> <reference key="NSNextKeyView" ref="189980015"/>
<reference key="IBUIBackgroundColor" ref="202185770"/> <reference key="IBUIBackgroundColor" ref="202185770"/>
<object class="IBUISimulatedOrientationMetrics" key="IBUISimulatedOrientationMetrics"> <object class="IBUISimulatedOrientationMetrics" key="IBUISimulatedOrientationMetrics">
<int key="IBUIInterfaceOrientation">3</int>
<int key="interfaceOrientation">3</int> <int key="interfaceOrientation">3</int>
</object> </object>
<string key="targetRuntimeIdentifier">IBIPadFramework</string> <string key="targetRuntimeIdentifier">IBIPadFramework</string>
Expand Down Expand Up @@ -235,89 +223,22 @@
<nil key="activeLocalization"/> <nil key="activeLocalization"/>
<dictionary class="NSMutableDictionary" key="localizations"/> <dictionary class="NSMutableDictionary" key="localizations"/>
<nil key="sourceID"/> <nil key="sourceID"/>
<int key="maxID">19</int> <int key="maxID">21</int>
</object>
<object class="IBClassDescriber" key="IBDocument.Classes">
<array class="NSMutableArray" key="referencedPartialClassDescriptions">
<object class="IBPartialClassDescription">
<string key="className">PSBaseLeafView</string>
<string key="superclassName">UIView</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBProjectSource</string>
<string key="minorKey">./Classes/PSBaseLeafView.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">PSBaseSubtreeView</string>
<string key="superclassName">UIView</string>
<object class="NSMutableDictionary" key="actions">
<string key="NS.key.0">toggleExpansion:</string>
<string key="NS.object.0">id</string>
</object>
<object class="NSMutableDictionary" key="actionInfosByName">
<string key="NS.key.0">toggleExpansion:</string>
<object class="IBActionInfo" key="NS.object.0">
<string key="name">toggleExpansion:</string>
<string key="candidateClassName">id</string>
</object>
</object>
<object class="NSMutableDictionary" key="outlets">
<string key="NS.key.0">nodeView</string>
<string key="NS.object.0">UIView</string>
</object>
<object class="NSMutableDictionary" key="toOneOutletInfosByName">
<string key="NS.key.0">nodeView</string>
<object class="IBToOneOutletInfo" key="NS.object.0">
<string key="name">nodeView</string>
<string key="candidateClassName">UIView</string>
</object>
</object>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBProjectSource</string>
<string key="minorKey">./Classes/PSBaseSubtreeView.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">PSHLeafView</string>
<string key="superclassName">PSBaseLeafView</string>
<dictionary class="NSMutableDictionary" key="outlets">
<string key="detailLabel">UILabel</string>
<string key="expandButton">UIButton</string>
<string key="titleLabel">UILabel</string>
</dictionary>
<dictionary class="NSMutableDictionary" key="toOneOutletInfosByName">
<object class="IBToOneOutletInfo" key="detailLabel">
<string key="name">detailLabel</string>
<string key="candidateClassName">UILabel</string>
</object>
<object class="IBToOneOutletInfo" key="expandButton">
<string key="name">expandButton</string>
<string key="candidateClassName">UIButton</string>
</object>
<object class="IBToOneOutletInfo" key="titleLabel">
<string key="name">titleLabel</string>
<string key="candidateClassName">UILabel</string>
</object>
</dictionary>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBProjectSource</string>
<string key="minorKey">./Classes/PSHLeafView.h</string>
</object>
</object>
</array>
</object> </object>
<object class="IBClassDescriber" key="IBDocument.Classes"/>
<int key="IBDocument.localizationMode">0</int> <int key="IBDocument.localizationMode">0</int>
<string key="IBDocument.TargetRuntimeIdentifier">IBIPadFramework</string> <string key="IBDocument.TargetRuntimeIdentifier">IBIPadFramework</string>
<object class="NSMutableDictionary" key="IBDocument.PluginDeclaredDependencyDefaults"> <object class="NSMutableDictionary" key="IBDocument.PluginDeclaredDependencyDefaults">
<string key="NS.key.0">com.apple.InterfaceBuilder.CocoaTouchPlugin.iPhoneOS</string> <string key="NS.key.0">com.apple.InterfaceBuilder.CocoaTouchPlugin.iPhoneOS</string>
<integer value="800" key="NS.object.0"/> <integer value="800" key="NS.object.0"/>
</object> </object>
<bool key="IBDocument.PluginDeclaredDependenciesTrackSystemTargetVersion">YES</bool> <bool key="IBDocument.PluginDeclaredDependenciesTrackSystemTargetVersion">YES</bool>
<nil key="IBDocument.LastKnownRelativeProjectPath"/>
<int key="IBDocument.defaultPropertyAccessControl">3</int> <int key="IBDocument.defaultPropertyAccessControl">3</int>
<object class="NSMutableDictionary" key="IBDocument.LastKnownImageSizes"> <object class="NSMutableDictionary" key="IBDocument.LastKnownImageSizes">
<string key="NS.key.0">TreeViewSubtreeExpandedButton.png</string> <string key="NS.key.0">TreeViewSubtreeExpandedButton.png</string>
<string key="NS.object.0">{15, 17}</string> <string key="NS.object.0">{15, 17}</string>
</object> </object>
<string key="IBCocoaTouchPluginVersion">534</string> <string key="IBCocoaTouchPluginVersion">141</string>
</data> </data>
</archive> </archive>
Loading

0 comments on commit cff6306

Please sign in to comment.