2
Was ist der beste Weg, um eine Benachrichtigung mit NSRect-Informationen zu posten?Beste Art, NSNotification mit NSRect-Informationen zu veröffentlichen?
Hier ist meine aktuelle Lösung (mit NSStringFromRect).
- (void)postNotificationForDirtyRect:(NSRect)rect
{
NSDictionary *userInfo =
[NSDictionary dictionaryWithObject: NSStringFromRect(rect)
forKey: ILDirtyRect];
NSNotificationCenter *ncenter = [NSNotificationCenter defaultCenter];
[ncenter postNotificationName: ILDocumentBecomeDirtyRectNotification
object: self
userInfo: userInfo];
}
Aber ich bin nicht sicher, ob dies der beste Weg ist es, eine rect-Struktur zu senden.
ausgezeichnet! Vielen Dank. – cocoafan