appjam 0.1.0.pre11 → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/README.rdoc +22 -2
- data/lib/appjam/generators/cli.rb +7 -0
- data/lib/appjam/generators/model.rb +66 -10
- data/lib/appjam/generators/project.rb +57 -7
- data/lib/appjam/generators/project/Classes/ContactsAppDelegate.h.tt +5 -5
- data/lib/appjam/generators/project/Classes/ContactsAppDelegate.m.tt +14 -14
- data/lib/appjam/generators/project/Classes/contacts/ApplicationFacade.h.tt +11 -11
- data/lib/appjam/generators/project/Classes/contacts/ApplicationFacade.m.tt +8 -8
- data/lib/appjam/generators/project/Classes/contacts/controller/CreateUserCommand.h.tt +4 -4
- data/lib/appjam/generators/project/Classes/contacts/controller/CreateUserCommand.m.tt +13 -13
- data/lib/appjam/generators/project/Classes/contacts/controller/DeleteUserCommand.h.tt +4 -4
- data/lib/appjam/generators/project/Classes/contacts/controller/DeleteUserCommand.m.tt +10 -10
- data/lib/appjam/generators/project/Classes/contacts/controller/GetUsersCommand.h.tt +4 -5
- data/lib/appjam/generators/project/Classes/contacts/controller/GetUsersCommand.m.tt +8 -9
- data/lib/appjam/generators/project/Classes/contacts/controller/StartupCommand.h.tt +2 -2
- data/lib/appjam/generators/project/Classes/contacts/controller/StartupCommand.m.tt +12 -12
- data/lib/appjam/generators/project/Classes/contacts/controller/UpdateUserCommand.h.tt +4 -4
- data/lib/appjam/generators/project/Classes/contacts/controller/UpdateUserCommand.m.tt +13 -13
- data/lib/appjam/generators/project/Classes/contacts/model/UserProxy.h.tt +4 -4
- data/lib/appjam/generators/project/Classes/contacts/model/UserProxy.m.tt +15 -15
- data/lib/appjam/generators/project/Classes/contacts/model/vo/UserVO.h.tt +7 -7
- data/lib/appjam/generators/project/Classes/contacts/model/vo/UserVO.m.tt +18 -18
- data/lib/appjam/generators/project/Classes/contacts/view/UserFormMediator.h.tt +5 -5
- data/lib/appjam/generators/project/Classes/contacts/view/UserFormMediator.m.tt +18 -18
- data/lib/appjam/generators/project/Classes/contacts/view/UserListMediator.h.tt +5 -5
- data/lib/appjam/generators/project/Classes/contacts/view/UserListMediator.m.tt +19 -19
- data/lib/appjam/generators/project/Classes/contacts/view/UserMediator.h.tt +15 -0
- data/lib/appjam/generators/project/Classes/contacts/view/UserMediator.m.tt +43 -0
- data/lib/appjam/generators/project/Classes/contacts/view/components/Contacts.h.tt +12 -12
- data/lib/appjam/generators/project/Classes/contacts/view/components/Contacts.m.tt +14 -14
- data/lib/appjam/generators/project/Classes/contacts/view/components/UserForm.h.tt +14 -14
- data/lib/appjam/generators/project/Classes/contacts/view/components/UserForm.m.tt +29 -29
- data/lib/appjam/generators/project/Classes/contacts/view/components/UserList.h.tt +15 -15
- data/lib/appjam/generators/project/Classes/contacts/view/components/UserList.m.tt +29 -29
- data/lib/appjam/generators/project/Classes/org/puremvc/objectivec/patterns/command/SimpleCommand.m +1 -1
- data/lib/appjam/generators/project/Contacts_Prefix.pch.tt +1 -1
- data/lib/appjam/generators/project/main.m.tt +4 -4
- data/lib/appjam/generators/project/utils/NSStringWhiteSpace.h +2 -2
- data/lib/appjam/generators/project/utils/NSStringWhiteSpace.m +2 -2
- data/lib/appjam/generators/project/utils/UIDevice.h +2 -2
- data/lib/appjam/generators/project/utils/UIDevice.m +2 -2
- data/lib/appjam/generators/project/utils/URLEncodeString.h +2 -2
- data/lib/appjam/generators/project/utils/URLEncodeString.m +2 -2
- data/lib/appjam/version.rb +4 -4
- data/test/test_model_generator.rb +28 -0
- data/test/test_project_generator.rb +5 -5
- metadata +13 -15
- data/lib/appjam/generators/project/Classes/contacts/view/ContactsMediator.h.tt +0 -15
- data/lib/appjam/generators/project/Classes/contacts/view/ContactsMediator.m.tt +0 -43
@@ -1,17 +1,17 @@
|
|
1
1
|
//
|
2
|
-
//
|
2
|
+
// <%= @class_name %>ListMediator.h
|
3
3
|
// PureMVC_ObjectiveC
|
4
4
|
//
|
5
|
-
//
|
6
|
-
//
|
5
|
+
// Created by <%= @developer.capitalize %> on <%= @created_on %>
|
6
|
+
// Copyright(c) <%= Time.now.year %>, All rights reserved.
|
7
7
|
//
|
8
8
|
|
9
9
|
#import <UIKit/UIKit.h>
|
10
10
|
#import "Mediator.h"
|
11
|
-
#import "
|
11
|
+
#import "<%= @class_name %>List.h"
|
12
12
|
#import "ApplicationFacade.h"
|
13
13
|
|
14
|
-
@interface
|
14
|
+
@interface <%= @class_name %>ListMediator : Mediator <<%= @class_name %>ListViewControllerDelegate>{
|
15
15
|
}
|
16
16
|
|
17
17
|
@end
|
@@ -1,25 +1,25 @@
|
|
1
1
|
//
|
2
|
-
//
|
2
|
+
// <%= @class_name %>ListMediator.m
|
3
3
|
// PureMVC_ObjectiveC
|
4
4
|
//
|
5
|
-
//
|
6
|
-
//
|
5
|
+
// Created by <%= @developer.capitalize %> on <%= @created_on %>
|
6
|
+
// Copyright(c) <%= Time.now.year %>, All rights reserved.
|
7
7
|
//
|
8
8
|
|
9
|
-
#import "
|
9
|
+
#import "<%= @class_name %>ListMediator.h"
|
10
10
|
|
11
|
-
@implementation
|
11
|
+
@implementation <%= @class_name %>ListMediator
|
12
12
|
|
13
13
|
+(NSString *)NAME {
|
14
|
-
return @"
|
14
|
+
return @"<%= @class_name %>ListMediator";
|
15
15
|
}
|
16
16
|
|
17
|
-
-(
|
17
|
+
-(<%= @class_name %>List *)viewComponent {
|
18
18
|
return viewComponent;
|
19
19
|
}
|
20
20
|
|
21
21
|
-(void)initializeMediator {
|
22
|
-
self.mediatorName = [
|
22
|
+
self.mediatorName = [<%= @class_name %>ListMediator NAME];
|
23
23
|
}
|
24
24
|
|
25
25
|
-(void)onRegister {
|
@@ -27,29 +27,29 @@
|
|
27
27
|
}
|
28
28
|
|
29
29
|
-(NSArray *)listNotificationInterests {
|
30
|
-
return [NSArray arrayWithObjects:
|
30
|
+
return [NSArray arrayWithObjects:Get<%= @class_name %>sSuccess, nil];
|
31
31
|
}
|
32
32
|
|
33
33
|
-(void)handleNotification:(id<INotification>)notification {
|
34
|
-
if ([[notification name] isEqualToString:
|
35
|
-
[self.viewComponent
|
34
|
+
if ([[notification name] isEqualToString:Get<%= @class_name %>sSuccess]) {
|
35
|
+
[self.viewComponent reload<%= @class_name %>s:[notification body]];
|
36
36
|
}
|
37
37
|
}
|
38
38
|
|
39
|
-
-(void)
|
40
|
-
[self sendNotification:
|
39
|
+
-(void)<%= @project_name %>ListAppeared {
|
40
|
+
[self sendNotification:Get<%= @class_name %>s];
|
41
41
|
}
|
42
42
|
|
43
|
-
-(void)
|
44
|
-
[self sendNotification:
|
43
|
+
-(void)<%= @project_name %>Selected:(<%= @class_name %>VO *)<%= @project_name %>VO {
|
44
|
+
[self sendNotification:ShowEdit<%= @class_name %> body:<%= @project_name %>VO];
|
45
45
|
}
|
46
46
|
|
47
|
-
-(void)
|
48
|
-
[self sendNotification:
|
47
|
+
-(void)delete<%= @class_name %>Selected:(<%= @class_name %>VO *)<%= @project_name %>VO {
|
48
|
+
[self sendNotification:Delete<%= @class_name %> body:<%= @project_name %>VO];
|
49
49
|
}
|
50
50
|
|
51
|
-
-(void)
|
52
|
-
[self sendNotification:
|
51
|
+
-(void)new<%= @class_name %>Selected {
|
52
|
+
[self sendNotification:ShowNew<%= @class_name %>];
|
53
53
|
}
|
54
54
|
|
55
55
|
-(void)dealloc {
|
@@ -0,0 +1,15 @@
|
|
1
|
+
//
|
2
|
+
// <%= @class_name %>Mediator.h
|
3
|
+
// PureMVC_ObjectiveC
|
4
|
+
//
|
5
|
+
// Created by <%= @developer.capitalize %> on <%= @created_on %>
|
6
|
+
// Copyright(c) <%= Time.now.year %>, All rights reserved.
|
7
|
+
//
|
8
|
+
|
9
|
+
#import "Mediator.h"
|
10
|
+
|
11
|
+
@interface <%= @class_name %>Mediator : Mediator {
|
12
|
+
|
13
|
+
}
|
14
|
+
|
15
|
+
@end
|
@@ -0,0 +1,43 @@
|
|
1
|
+
//
|
2
|
+
// <%= @class_name %>Mediator.m
|
3
|
+
// PureMVC_ObjectiveC
|
4
|
+
//
|
5
|
+
// Created by <%= @developer.capitalize %> on <%= @created_on %>
|
6
|
+
// Copyright(c) <%= Time.now.year %>, All rights reserved.
|
7
|
+
//
|
8
|
+
|
9
|
+
#import "<%= @class_name %>Mediator.h"
|
10
|
+
#import "<%= @class_name %>.h"
|
11
|
+
#import "ApplicationFacade.h"
|
12
|
+
|
13
|
+
@implementation <%= @class_name %>Mediator
|
14
|
+
|
15
|
+
+(NSString *)NAME {
|
16
|
+
return @"<%= @class_name %>Mediator";
|
17
|
+
}
|
18
|
+
|
19
|
+
-(<%= @class_name %> *)viewComponent {
|
20
|
+
return viewComponent;
|
21
|
+
}
|
22
|
+
|
23
|
+
-(void)initializeMediator {
|
24
|
+
self.mediatorName = [<%= @class_name %>Mediator NAME];
|
25
|
+
}
|
26
|
+
|
27
|
+
-(NSArray *)listNotificationInterests {
|
28
|
+
return [NSArray arrayWithObjects:Show<%= @class_name %>Form, Show<%= @class_name %>List, ShowError, nil];
|
29
|
+
}
|
30
|
+
|
31
|
+
-(void)handleNotification:(id<INotification>)notification {
|
32
|
+
|
33
|
+
if ([[notification name] isEqualToString:Show<%= @class_name %>Form]) {
|
34
|
+
[self.viewComponent show<%= @class_name %>Form];
|
35
|
+
} else if ([[notification name] isEqualToString:Show<%= @class_name %>List]) {
|
36
|
+
[self.viewComponent show<%= @class_name %>List];
|
37
|
+
} else if ([[notification name] isEqualToString:ShowError]) {
|
38
|
+
[self.viewComponent showError:[notification body]];
|
39
|
+
}
|
40
|
+
}
|
41
|
+
|
42
|
+
|
43
|
+
@end
|
@@ -1,27 +1,27 @@
|
|
1
1
|
//
|
2
|
-
//
|
2
|
+
// <%= @class_name %>.h
|
3
3
|
// PureMVC_ObjectiveC
|
4
4
|
//
|
5
|
-
//
|
6
|
-
//
|
5
|
+
// Created by <%= @developer.capitalize %> on <%= @created_on %>
|
6
|
+
// Copyright(c) <%= Time.now.year %>, All rights reserved.
|
7
7
|
//
|
8
8
|
|
9
9
|
#import <UIKit/UIKit.h>
|
10
|
-
#import "
|
11
|
-
#import "
|
10
|
+
#import "<%= @class_name %>List.h"
|
11
|
+
#import "<%= @class_name %>Form.h"
|
12
12
|
|
13
|
-
@interface
|
13
|
+
@interface <%= @class_name %> : UIView {
|
14
14
|
UINavigationController *navigation;
|
15
|
-
|
16
|
-
|
15
|
+
<%= @class_name %>List *<%= @project_name %>List;
|
16
|
+
<%= @class_name %>Form *<%= @project_name %>Form;
|
17
17
|
}
|
18
18
|
|
19
19
|
@property(nonatomic, retain) UINavigationController *navigation;
|
20
|
-
@property(nonatomic, retain)
|
21
|
-
@property(nonatomic, retain)
|
20
|
+
@property(nonatomic, retain) <%= @class_name %>List *<%= @project_name %>List;
|
21
|
+
@property(nonatomic, retain) <%= @class_name %>Form *<%= @project_name %>Form;
|
22
22
|
|
23
|
-
-(void)
|
24
|
-
-(void)
|
23
|
+
-(void)show<%= @class_name %>Form;
|
24
|
+
-(void)show<%= @class_name %>List;
|
25
25
|
-(void)showError:(NSString *)message;
|
26
26
|
|
27
27
|
@end
|
@@ -1,34 +1,34 @@
|
|
1
1
|
//
|
2
|
-
//
|
2
|
+
// <%= @class_name %>.m
|
3
3
|
// PureMVC_ObjectiveC
|
4
4
|
//
|
5
|
-
//
|
6
|
-
//
|
5
|
+
// Created by <%= @developer.capitalize %> on <%= @created_on %>
|
6
|
+
// Copyright(c) <%= Time.now.year %>, All rights reserved.
|
7
7
|
//
|
8
8
|
|
9
|
-
#import "
|
9
|
+
#import "<%= @class_name %>.h"
|
10
10
|
|
11
11
|
|
12
|
-
@implementation
|
12
|
+
@implementation <%= @class_name %>
|
13
13
|
|
14
|
-
@synthesize
|
14
|
+
@synthesize <%= @project_name %>List, <%= @project_name %>Form, navigation;
|
15
15
|
|
16
16
|
-(id)initWithFrame:(CGRect)frame {
|
17
17
|
if (self = [super initWithFrame:frame]) {
|
18
18
|
self.navigation = [[[UINavigationController alloc] init] autorelease];
|
19
|
-
self
|
20
|
-
self
|
21
|
-
[navigation pushViewController
|
19
|
+
self.<%= @project_name %>List = [[[<%= @class_name %>List alloc] init] autorelease];
|
20
|
+
self.<%= @project_name %>Form = [[[<%= @class_name %>Form alloc] init] autorelease];
|
21
|
+
[navigation pushViewController:<%= @project_name %>List animated:NO];
|
22
22
|
[self addSubview:navigation.view];
|
23
23
|
}
|
24
24
|
return self;
|
25
25
|
}
|
26
26
|
|
27
|
-
-(void)
|
28
|
-
[navigation pushViewController
|
27
|
+
-(void)show<%= @class_name %>Form {
|
28
|
+
[navigation pushViewController:<%= @project_name %>Form animated:YES];
|
29
29
|
}
|
30
30
|
|
31
|
-
-(void)
|
31
|
+
-(void)show<%= @class_name %>List {
|
32
32
|
[navigation popToRootViewControllerAnimated:YES];
|
33
33
|
}
|
34
34
|
|
@@ -38,8 +38,8 @@
|
|
38
38
|
|
39
39
|
- (void)dealloc {
|
40
40
|
self.navigation = nil;
|
41
|
-
self
|
42
|
-
self
|
41
|
+
self.<%= @project_name %>List = nil;
|
42
|
+
self.<%= @project_name %>Form = nil;
|
43
43
|
[super dealloc];
|
44
44
|
}
|
45
45
|
|
@@ -1,18 +1,18 @@
|
|
1
1
|
//
|
2
|
-
//
|
2
|
+
// <%= @class_name %>Form.h
|
3
3
|
// PureMVC_ObjectiveC
|
4
4
|
//
|
5
|
-
//
|
6
|
-
//
|
5
|
+
// Created by <%= @developer.capitalize %> on <%= @created_on %>
|
6
|
+
// Copyright(c) <%= Time.now.year %>, All rights reserved.
|
7
7
|
//
|
8
8
|
|
9
9
|
#import <UIKit/UIKit.h>
|
10
|
-
#import "
|
10
|
+
#import "<%= @class_name %>VO.h"
|
11
11
|
|
12
|
-
@protocol
|
12
|
+
@protocol <%= @class_name %>FormViewControllerDelegate
|
13
13
|
|
14
|
-
-(void)
|
15
|
-
-(void)
|
14
|
+
-(void)create<%= @class_name %>Selected:(<%= @class_name %>VO *)<%= @project_name %>VO;
|
15
|
+
-(void)update<%= @class_name %>Selected:(<%= @class_name %>VO *)<%= @project_name %>VO;
|
16
16
|
|
17
17
|
@end
|
18
18
|
|
@@ -20,17 +20,17 @@ typedef enum {
|
|
20
20
|
NEW, EDIT
|
21
21
|
} Mode;
|
22
22
|
|
23
|
-
@interface
|
24
|
-
|
25
|
-
UITextField *firstNameTextField, *lastNameTextField, *emailTextField,
|
23
|
+
@interface <%= @class_name %>Form : UITableViewController {
|
24
|
+
<%= @class_name %>VO *<%= @project_name %>VO;
|
25
|
+
UITextField *firstNameTextField, *lastNameTextField, *emailTextField, *<%= @project_name %>nameTextField, *passwordTextField, *confirmPasswordTextField;
|
26
26
|
Mode mode;
|
27
|
-
id
|
27
|
+
id<<%= @class_name %>FormViewControllerDelegate> delegate;
|
28
28
|
}
|
29
29
|
|
30
|
-
@property(nonatomic, retain)
|
31
|
-
@property(nonatomic, retain) UITextField *firstNameTextField, *lastNameTextField, *emailTextField,
|
30
|
+
@property(nonatomic, retain) <%= @class_name %>VO *<%= @project_name %>VO;
|
31
|
+
@property(nonatomic, retain) UITextField *firstNameTextField, *lastNameTextField, *emailTextField, *<%= @project_name %>nameTextField, *passwordTextField, *confirmPasswordTextField;
|
32
32
|
@property Mode mode;
|
33
|
-
@property(nonatomic, retain) id
|
33
|
+
@property(nonatomic, retain) id<<%= @class_name %>FormViewControllerDelegate> delegate;
|
34
34
|
|
35
35
|
-(UITextField *)textFieldWithPlaceHolder:(NSString *)placeHolder frame:(CGRect)frame;
|
36
36
|
|
@@ -1,17 +1,17 @@
|
|
1
1
|
//
|
2
|
-
//
|
2
|
+
// <%= @class_name %>Form.m
|
3
3
|
// PureMVC_ObjectiveC
|
4
4
|
//
|
5
|
-
//
|
6
|
-
//
|
5
|
+
// Created by <%= @developer.capitalize %> on <%= @created_on %>
|
6
|
+
// Copyright(c) <%= Time.now.year %>, All rights reserved.
|
7
7
|
//
|
8
8
|
|
9
|
-
#import "
|
9
|
+
#import "<%= @class_name %>Form.h"
|
10
10
|
|
11
11
|
|
12
|
-
@implementation
|
12
|
+
@implementation <%= @class_name %>Form
|
13
13
|
|
14
|
-
@synthesize
|
14
|
+
@synthesize <%= @project_name %>VO, firstNameTextField, lastNameTextField, emailTextField, <%= @project_name %>nameTextField, passwordTextField, confirmPasswordTextField, mode, delegate;
|
15
15
|
|
16
16
|
-(id)init {
|
17
17
|
return [super initWithStyle:UITableViewStyleGrouped];
|
@@ -19,8 +19,8 @@
|
|
19
19
|
|
20
20
|
- (void)loadView {
|
21
21
|
[super loadView];
|
22
|
-
self.navigationItem.title = @"
|
23
|
-
self.navigationItem.rightBarButtonItem = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemSave target:self action:@selector(
|
22
|
+
self.navigationItem.title = @"<%= @class_name %> Profile";
|
23
|
+
self.navigationItem.rightBarButtonItem = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemSave target:self action:@selector(save<%= @class_name %>)];
|
24
24
|
self.tableView.scrollEnabled = NO;
|
25
25
|
}
|
26
26
|
|
@@ -39,36 +39,36 @@
|
|
39
39
|
switch (indexPath.row) {
|
40
40
|
case 0: { //First and Last Name
|
41
41
|
self.firstNameTextField = [self textFieldWithPlaceHolder:@"First Name" frame:CGRectMake(10,12,135,25)];
|
42
|
-
firstNameTextField.text =
|
42
|
+
firstNameTextField.text = <%= @project_name %>VO.firstName;
|
43
43
|
[cell.contentView addSubview:firstNameTextField];
|
44
44
|
|
45
45
|
self.lastNameTextField = [self textFieldWithPlaceHolder:@"Last Name" frame:CGRectMake(150,12,135,25)];
|
46
|
-
lastNameTextField.text =
|
46
|
+
lastNameTextField.text = <%= @project_name %>VO.lastName;
|
47
47
|
[cell.contentView addSubview:lastNameTextField];
|
48
48
|
break;
|
49
49
|
}
|
50
|
-
case 1: {
|
50
|
+
case 1: { //<%= @project_name %>name and email
|
51
51
|
self.emailTextField = [self textFieldWithPlaceHolder:@"Email" frame:CGRectMake(10,12,155,25)];
|
52
|
-
emailTextField.text =
|
52
|
+
emailTextField.text = <%= @project_name %>VO.email;
|
53
53
|
[cell.contentView addSubview:emailTextField];
|
54
54
|
|
55
|
-
self
|
56
|
-
|
55
|
+
self.<%= @project_name %>nameTextField = [self textFieldWithPlaceHolder:@"<%= @class_name %>name*" frame:CGRectMake(170,12,115,25)];
|
56
|
+
<%= @project_name %>nameTextField.text = <%= @project_name %>VO.<%= @project_name %>name;
|
57
57
|
if (mode == EDIT) {
|
58
|
-
|
58
|
+
<%= @project_name %>nameTextField.enabled = NO;
|
59
59
|
}
|
60
|
-
[cell.contentView addSubview
|
60
|
+
[cell.contentView addSubview:<%= @project_name %>nameTextField];
|
61
61
|
break;
|
62
62
|
}
|
63
63
|
case 2: { //password and confirm
|
64
64
|
self.passwordTextField = [self textFieldWithPlaceHolder:@"Password*" frame:CGRectMake(10,12,135,25)];
|
65
65
|
passwordTextField.secureTextEntry = YES;
|
66
|
-
passwordTextField.text =
|
66
|
+
passwordTextField.text = <%= @project_name %>VO.password;
|
67
67
|
[cell.contentView addSubview:passwordTextField];
|
68
68
|
|
69
69
|
self.confirmPasswordTextField = [self textFieldWithPlaceHolder:@"Confirm*" frame:CGRectMake(150,12,135,25)];
|
70
70
|
confirmPasswordTextField.secureTextEntry = YES;
|
71
|
-
confirmPasswordTextField.text =
|
71
|
+
confirmPasswordTextField.text = <%= @project_name %>VO.password;
|
72
72
|
[cell.contentView addSubview:confirmPasswordTextField];
|
73
73
|
break;
|
74
74
|
}
|
@@ -81,17 +81,17 @@
|
|
81
81
|
|
82
82
|
}
|
83
83
|
|
84
|
-
-(void)
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
84
|
+
-(void)save<%= @class_name %> {
|
85
|
+
<%= @project_name %>VO.firstName = firstNameTextField.text;
|
86
|
+
<%= @project_name %>VO.lastName = lastNameTextField.text;
|
87
|
+
<%= @project_name %>VO.email = emailTextField.text;
|
88
|
+
<%= @project_name %>VO.<%= @project_name %>name = <%= @project_name %>nameTextField.text;
|
89
|
+
<%= @project_name %>VO.password = passwordTextField.text;
|
90
|
+
<%= @project_name %>VO.confirmPassword = confirmPasswordTextField.text;
|
91
91
|
if (mode == NEW) {
|
92
|
-
[delegate
|
92
|
+
[delegate create<%= @class_name %>Selected:<%= @project_name %>VO];
|
93
93
|
} else if (mode == EDIT) {
|
94
|
-
[delegate
|
94
|
+
[delegate update<%= @class_name %>Selected:<%= @project_name %>VO];
|
95
95
|
}
|
96
96
|
}
|
97
97
|
|
@@ -104,11 +104,11 @@
|
|
104
104
|
}
|
105
105
|
|
106
106
|
- (void)dealloc {
|
107
|
-
self
|
107
|
+
self.<%= @project_name %>VO = nil;
|
108
108
|
self.firstNameTextField = nil;
|
109
109
|
self.lastNameTextField = nil;
|
110
110
|
self.emailTextField = nil;
|
111
|
-
self
|
111
|
+
self.<%= @project_name %>nameTextField = nil;
|
112
112
|
self.passwordTextField = nil;
|
113
113
|
self.confirmPasswordTextField = nil;
|
114
114
|
self.delegate = nil;
|
@@ -1,31 +1,31 @@
|
|
1
1
|
//
|
2
|
-
//
|
2
|
+
// <%= @class_name %>List.h
|
3
3
|
// PureMVC_ObjectiveC
|
4
4
|
//
|
5
|
-
//
|
6
|
-
//
|
5
|
+
// Created by <%= @developer.capitalize %> on <%= @created_on %>
|
6
|
+
// Copyright(c) <%= Time.now.year %>, All rights reserved.
|
7
7
|
//
|
8
8
|
|
9
9
|
#import <UIKit/UIKit.h>
|
10
|
-
#import "
|
10
|
+
#import "<%= @class_name %>VO.h"
|
11
11
|
|
12
|
-
@protocol
|
12
|
+
@protocol <%= @class_name %>ListViewControllerDelegate
|
13
13
|
|
14
|
-
-(void)
|
15
|
-
-(void)
|
16
|
-
-(void)
|
17
|
-
-(void)
|
14
|
+
-(void)<%= @project_name %>Selected:(<%= @class_name %>VO *)<%= @project_name %>VO;
|
15
|
+
-(void)delete<%= @class_name %>Selected:(<%= @class_name %>VO *)<%= @project_name %>VO;
|
16
|
+
-(void)new<%= @class_name %>Selected;
|
17
|
+
-(void)<%= @project_name %>ListAppeared;
|
18
18
|
|
19
19
|
@end
|
20
20
|
|
21
|
-
@interface
|
22
|
-
NSMutableArray
|
23
|
-
id
|
21
|
+
@interface <%= @class_name %>List : UITableViewController {
|
22
|
+
NSMutableArray *<%= @project_name %>s;
|
23
|
+
id<<%= @class_name %>ListViewControllerDelegate> delegate;
|
24
24
|
}
|
25
25
|
|
26
|
-
@property(nonatomic, retain) NSMutableArray
|
27
|
-
@property(nonatomic, retain) id
|
26
|
+
@property(nonatomic, retain) NSMutableArray *<%= @project_name %>s;
|
27
|
+
@property(nonatomic, retain) id<<%= @class_name %>ListViewControllerDelegate> delegate;
|
28
28
|
|
29
|
-
-(void)
|
29
|
+
-(void)reload<%= @class_name %>s:(NSMutableArray *)<%= @project_name %>s;
|
30
30
|
|
31
31
|
@end
|