We can't hold onto managed objects in our temporary objects because they can disappear from under us, so do the lookup when we propagate values

This commit is contained in:
Cameron Gutman
2016-01-21 11:29:17 -05:00
parent 3076e29335
commit f8e2ca8500
6 changed files with 63 additions and 38 deletions
+5 -7
View File
@@ -14,8 +14,6 @@
- (id) initFromApp:(App*)app withTempHost:(TemporaryHost*)tempHost {
self = [self init];
self.parent = app;
self.id = app.id;
self.image = app.image;
self.name = app.name;
@@ -24,11 +22,11 @@
return self;
}
- (void) propagateChangesToParent {
self.parent.id = self.id;
self.parent.image = self.image;
self.parent.name = self.name;
self.parent.host = self.host.parent;
- (void) propagateChangesToParent:(App*)parent withHost:(Host*)host {
parent.id = self.id;
parent.image = self.image;
parent.name = self.name;
parent.host = host;
}
- (NSComparisonResult)compareName:(TemporaryApp *)other {