Subclassing NSPrintPanel

  • I need to make a simple modification to NSPrintPanel. Because my app
    deals with documents whose pages might have non-numeric names (e.g.,
    Cover, 22A, iii), I'd like the "Copies & Pages" pane's NSTextFields
    to be able to display/accept values other than integers. I realize
    that I can endow my NSPrintPanel with an accessory view, but what I'd
    really like to do is replace the Copies & Pages pane with one of my
    own. But I'd still like to retain all the other panes, for obvious
    reasons. There doesn't seem to be too much in the API for
    NSPrintPanel that'll let me do this and I really, really don't want
    to have to make my own custom print panel from scratch. Scouring the
    docs and the web for solutions hasn't helped much -- the best I can
    come up with is creating an NSPrintInfo object with a modified
    dictionary, but even that won't let me set the start and end pages to
    anything other than NSNumbers.

    Has anyone here confronted this problem before?

    Glenn Zelniker
  • On Nov 26, 2007, at 8:33 AM, Glenn Zelniker wrote:

    > I need to make a simple modification to NSPrintPanel. Because my app
    > deals with documents whose pages might have non-numeric names (e.g.,
    > Cover, 22A, iii), I'd like the "Copies & Pages" pane's NSTextFields
    > to be able to display/accept values other than integers. I realize
    > that I can endow my NSPrintPanel with an accessory view, but what
    > I'd really like to do is replace the Copies & Pages pane with one of
    > my own. But I'd still like to retain all the other panes, for
    > obvious reasons. There doesn't seem to be too much in the API for
    > NSPrintPanel that'll let me do this and I really, really don't want
    > to have to make my own custom print panel from scratch. Scouring the
    > docs and the web for solutions hasn't helped much -- the best I can
    > come up with is creating an NSPrintInfo object with a modified
    > dictionary, but even that won't let me set the start and end pages
    > to anything other than NSNumbers.
    >
    > Has anyone here confronted this problem before?

    What you need is to create your own Copies & Pages PDE that replaces
    Apple's. You'll have to re-implement all the functionality of the
    standard Apple PDE but that's probably not too hard.

    Dave
  • On Nov 26, 2007, at 1:27 PM, Dave Camp wrote:

    > On Nov 26, 2007, at 8:33 AM, Glenn Zelniker wrote:
    >
    >> I need to make a simple modification to NSPrintPanel. Because my
    >> app deals with documents whose pages might have non-numeric names
    >> (e.g., Cover, 22A, iii), I'd like the "Copies & Pages" pane's
    >> NSTextFields to be able to display/accept values other than
    >> integers. I realize that I can endow my NSPrintPanel with an
    >> accessory view, but what I'd really like to do is replace the
    >> Copies & Pages pane with one of my own. But I'd still like to
    >> retain all the other panes, for obvious reasons. There doesn't
    >> seem to be too much in the API for NSPrintPanel that'll let me do
    >> this and I really, really don't want to have to make my own custom
    >> print panel from scratch. Scouring the docs and the web for
    >> solutions hasn't helped much -- the best I can come up with is
    >> creating an NSPrintInfo object with a modified dictionary, but
    >> even that won't let me set the start and end pages to anything
    >> other than NSNumbers.
    >>
    >> Has anyone here confronted this problem before?
    >
    > What you need is to create your own Copies & Pages PDE that
    > replaces Apple's. You'll have to re-implement all the functionality
    > of the standard Apple PDE but that's probably not too hard.

    That's the approach I favor, as I mentioned above. But the question
    is HOW to replace the Copies & Pages pane? There's nothing in the
    published API about how to do this. Do you have any ideas?

    Glenn
  • On Nov 28, 2007, at 7:41 AM, Glenn Zelniker wrote:

    > On Nov 26, 2007, at 1:27 PM, Dave Camp wrote:
    >
    >> On Nov 26, 2007, at 8:33 AM, Glenn Zelniker wrote:
    >>
    >>> I need to make a simple modification to NSPrintPanel. Because my
    >>> app deals with documents whose pages might have non-numeric names
    >>> (e.g., Cover, 22A, iii), I'd like the "Copies & Pages" pane's
    >>> NSTextFields to be able to display/accept values other than
    >>> integers. I realize that I can endow my NSPrintPanel with an
    >>> accessory view, but what I'd really like to do is replace the
    >>> Copies & Pages pane with one of my own. But I'd still like to
    >>> retain all the other panes, for obvious reasons. There doesn't
    >>> seem to be too much in the API for NSPrintPanel that'll let me do
    >>> this and I really, really don't want to have to make my own custom
    >>> print panel from scratch. Scouring the docs and the web for
    >>> solutions hasn't helped much -- the best I can come up with is
    >>> creating an NSPrintInfo object with a modified dictionary, but
    >>> even that won't let me set the start and end pages to anything
    >>> other than NSNumbers.
    >>>
    >>> Has anyone here confronted this problem before?
    >>
    >> What you need is to create your own Copies & Pages PDE that
    >> replaces Apple's. You'll have to re-implement all the functionality
    >> of the standard Apple PDE but that's probably not too hard.
    >
    > That's the approach I favor, as I mentioned above. But the question
    > is HOW to replace the Copies & Pages pane? There's nothing in the
    > published API about how to do this. Do you have any ideas

    <http://developer.apple.com/documentation/Printing/Conceptual/ExtPrintingDia
    logs/index.html?http://developer.apple.com/documentation/Printing/Conceptua
    l/ExtPrintingDialogs/Introduction/chapter_1_section_1.html#//apple_ref/doc/
    uid/TP30000979-CH201-TP9
    >

    Dave
previous month november 2007 next month
MTWTFSS
      1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30    
Go to today