File tree 4 files changed +15
-7
lines changed
4 files changed +15
-7
lines changed Original file line number Diff line number Diff line change @@ -19,7 +19,7 @@ - (void)setDocument:(BkmxDoc *)document {
19
19
}
20
20
21
21
- (id )initWithDocument : (BkmxDoc*)document_ {
22
- self = [super init ];
22
+ self = [super init ] ;
23
23
24
24
if (self != 0 ) {
25
25
[self setDocument: document_] ;
Original file line number Diff line number Diff line change 1
1
#import < Cocoa/Cocoa.h>
2
2
3
3
// Public Notifications
4
- extern NSString * const constNoteWillUpdateObject ;
4
+ extern NSString * const SSYManagedObjectWillUpdateNotification ;
5
5
extern NSString * const SSYManagedObjectWillFaultNotification ;
6
6
7
7
// Keys inside Notification UserInfo Dictionaries
@@ -183,7 +183,7 @@ extern NSString* const constKeyNewValue ;
183
183
forSetKey : (NSString *)setKey ;
184
184
185
185
/* !
186
- @brief Posts a constNoteWillUpdateObject notification.
186
+ @brief Posts a SSYManagedObjectWillUpdateNotification notification.
187
187
188
188
@details This is a workaround for Apple Bug 6624874, using Solution 2.
189
189
Original file line number Diff line number Diff line change 9
9
#import " NSEntityDescription+SSYMavericksBugFix.h"
10
10
11
11
// Public Notifications
12
- NSString * const constNoteWillUpdateObject = @" willUpdateObject " ;
12
+ NSString * const SSYManagedObjectWillUpdateNotification = @" SSYManagedObjectWillUpdateNotification " ;
13
13
NSString * const SSYManagedObjectWillFaultNotification = @" SSYManagedObjectWillFaultNotification" ;
14
14
15
15
// Keys inside Notification UserInfo Dictionaries
@@ -347,16 +347,16 @@ - (void)postWillSetNewValue:(id)value
347
347
#if 0
348
348
#warning Logging postWillSetNewValue:forKey:
349
349
NSLog(@"7120: Posting %@ with object: %@\nwith oldValue: %@\nwith info:\n%@",
350
- constNoteWillUpdateObject ,
350
+ SSYManagedObjectWillUpdateNotification ,
351
351
[self shortDescription],
352
352
[[self valueForKeyPath:key] shortDescription],
353
353
[info shortDescription]) ;
354
354
#endif
355
- [[NSNotificationCenter defaultCenter ] postNotificationName: constNoteWillUpdateObject
355
+ [[NSNotificationCenter defaultCenter ] postNotificationName: SSYManagedObjectWillUpdateNotification
356
356
object: self
357
357
userInfo: info] ;
358
358
/* In BookMacster version 1.3.19, I tried changing the above line to this…
359
- NSNotification* notification = [NSNotification notificationWithName:constNoteWillUpdateObject
359
+ NSNotification* notification = [NSNotification notificationWithName:SSYManagedObjectWillUpdateNotification
360
360
object:self
361
361
userInfo:info] ;
362
362
[[NSNotificationQueue defaultQueue] enqueueNotification:notification
Original file line number Diff line number Diff line change @@ -51,6 +51,14 @@ - (void)appendToRecentSearches:(NSString*)newString {
51
51
52
52
if (![[self recentSearches ] isEqualToArray: recentSearches]) {
53
53
[self setRecentSearches: recentSearches] ;
54
+ /* I have twice seen a crash here, when the above method attempts
55
+ to post a notification. Could not reproduce after that. Crash
56
+ occurs when framework method attempts to post a notification.
57
+ But I could not identify the notification because Xcode gives
58
+ me the "couldn't materialize struct" crap when I ask for values
59
+ in registers $rdi $rdx $rsi. I looked through my code, Apple
60
+ documentation and have no idea what notification would be posted.
61
+ */
54
62
}
55
63
56
64
[recentSearches release ] ;
You can’t perform that action at this time.
0 commit comments