52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
|
@implementation ShowDetailsController
- (void)dealloc
{
[_name release];
[_nameField release];
[_lengthField release];
[_legacySwitch release];
[_passphraseField release];
[_mainViewController release];
[super dealloc];
}
- (void)viewWillAppear: (BOOL)animated
{
SiteStorage *siteStorage;
NSIndexPath *indexPath;
[super viewWillAppear: animated];
siteStorage = self.mainViewController.siteStorage;
indexPath = self.mainViewController.tableView.indexPathForSelectedRow;
[_name release];
_name = [self.mainViewController.sites[indexPath.row] retain];
_length = [siteStorage lengthForSite: _name];
_legacy = [siteStorage isSiteLegacy: _name];
self.nameField.text = _name.NSObject;
self.lengthField.text = [NSString stringWithFormat: @"%zu", _length];
self.legacySwitch.on = _legacy;
[self.mainViewController.tableView deselectRowAtIndexPath: indexPath
animated: YES];
}
- (void)viewDidAppear: (BOOL)animated
{
|
>
>
|
>
>
|
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
|
@implementation ShowDetailsController
- (void)dealloc
{
[_name release];
[_nameField release];
[_lengthField release];
[_legacySwitch release];
[_keyFile release];
[_keyFileField release];
[_passphraseField release];
[_mainViewController release];
[super dealloc];
}
- (void)viewWillAppear: (BOOL)animated
{
SiteStorage *siteStorage;
NSIndexPath *indexPath;
[super viewWillAppear: animated];
siteStorage = self.mainViewController.siteStorage;
indexPath = self.mainViewController.tableView.indexPathForSelectedRow;
[_name release];
_name = [self.mainViewController.sites[indexPath.row] copy];
_length = [siteStorage lengthForSite: _name];
_legacy = [siteStorage isSiteLegacy: _name];
_keyFile = [[siteStorage keyFileForSite: _name] copy];
self.nameField.text = _name.NSObject;
self.lengthField.text = [NSString stringWithFormat: @"%zu", _length];
self.legacySwitch.on = _legacy;
self.keyFileField.text = _keyFile.NSObject;
[self.mainViewController.tableView deselectRowAtIndexPath: indexPath
animated: YES];
}
- (void)viewDidAppear: (BOOL)animated
{
|