Printing processing two notifications?
Printing processing two notifications?
- Subject: Printing processing two notifications?
- From: John MacMullin <email@hidden>
- Date: Sat, 4 Oct 2003 13:57:19 -0700
My program adds an observer in one program and posts a notification in
another. In the receiving program, which prints, somehow the program
is cycling through twice and processing the notification twice even tho
the send only posted it once. This starts happening on the second pass
through, see the log following.
2003-10-04 13:23:34.970 GLASS[1257] its posted
2003-10-04 13:23:34.990 GLASS[1257] <theFileSetUp:
0x148dee0>_notification object
2003-10-04 13:24:01.234 GLASS[1257] its posted
2003-10-04 13:24:01.253 GLASS[1257] < theFileSetUp:
0x148dee0>_notification object
2003-10-04 13:24:14.541 GLASS[1257] < theFileSetUp:
0x148dee0>_notification object
GLASS has exited with status 0.
_______
The sender uses the following to post and coalesce:
[[NSNotificationQueue defaultQueue] enqueueNotification:[NSNotification
notificationWithName:printButtonNotification object:self] postingStyle:
NSPostWhenIdle coalesceMask:NSNotificationCoalescingOnName
forModes:nil];
NSLog(@"its posted");
The double processing problem seems to be connected with the:
[printInfo setHorizontallyCentered:YES];
printOp = [NSPrintOperation printOperationWithView:myView
printInfo: printInfo];
[printOp runOperation];
but I can't fathom why Cocoa would either send another message or start
the printing method over when I haven't asked it to.
Any suggestions?
John
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.