[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Another NSDocument patch
From: |
Wolfgang Lux |
Subject: |
Another NSDocument patch |
Date: |
Sat, 3 Mar 2007 18:48:26 +0100 |
Hello!
The following patch brings NSDocument's modal print dialog interface
into operation. Here's a short summary of the changes:
- NSPrintPanel:
The modal loop which displays the print panel is now left with either
NSOKButton or NSCancelButton (cf. the documentation of NSPrintPanel's
-runModal: and
-
beginSheetWithPrintInfo:modalForWindow:delegate:didEndSelector:contextIn
fo:
methods).
- NSPrintOperation:
The callback passed to the print panel's beginSheet... method had a
wrong signature (and also was misspelled). In addition, the code of
the callback did retrieve its own callback from the print dictionary
in a wrong way (was asking for a pointer to a selector while a
selector was saved).
- NSDocument:
The callback of -
runModalPrintOperation:delegate:didRunSelector:contextInfo:
method has a different signature than the one passed to the print
operation's
-runOperationModalForWindow:delegate:didRunSelector:contextInfo:
method. This
means NSDocument needs some adapter code and also has to save the
delegate
and selector passed to runModalPrintOperation... in some place.
Since there
can be at most one print dialog for a document, I've chosen to add
two private
instance variables to NSDocument for that purpose.
Regards
Wolfgang
gui.patch
Description: Binary data
- Another NSDocument patch,
Wolfgang Lux <=