Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: CUPS and error dialogs



Dave,
I did some development about a year ago so the following suggestion
could be worthless...

I believe the dialog just polls for available messages and it may take
several seconds before your message is actually displayed in the UI, to
confirm this you might just sleep for 30 seconds in your CUPS filter before
returning to see if your error message ever gets displayed.

The bottom line is that expecting to inform the user reliably with
messages from the filter is a waste of time ( or was for Panther releases ).


----- Original Message -----
From: "Dave Camp" <email@hidden>
To: "Richard Blanchard" <email@hidden>
Cc: "Printing" <email@hidden>
Sent: Tuesday, March 02, 2004 9:18 PM
Subject: Re: CUPS and error dialogs


> I've truncated my CUPS driver to the following code:
>
> int main (int argc, const char * argv[])
> {
> fprintf(stderr, "ERROR: Unable to read CUPS raster data\n");
> fflush(stderr);
> return 1;
> }
>
> I see the following in the CUPS log:
>
> E [02/Mar/2004:18:14:25 -0800] [Job 346] Unable to read CUPS raster data
>
> However, the queue app for my printer just quits at the end of the job.
> The only time i think I've seen the app hang around and get a badge in
> the dock is when my code crashed or hung badly.
>
> Should the above code work?
>
> Thanks,
> Dave
>
> On Mar 2, 2004, at 9:25 AM, Richard Blanchard wrote:
>
> > All of that said, an error condition logged with simply the cups error
> > prefix should cause an error dialog to be presented to the user. If
> > you can confirm that you are seeing this displayed in the UI, I'll
> > investigate.
> >
> > CUPS has since added the '+' and '-' prefixes to message to allow
> > strings to be added and removed from IPP's printer-state-reasons.
> > [cups/scheduler/printers.c:SetPrinterReasons()] We'll be supporting
> > that in the UI in the next major OS release.
> >
> > I hope this helps,
> >
> > Rich
> >
> >> Message: 3
> >> To: Printing <email@hidden>
> >> From: Dave Camp <email@hidden>
> >> Subject: CUPS and error dialogs
> >> Date: Mon, 1 Mar 2004 16:50:44 -0800
> >>
> >> I can't seem to get CUPS print jobs to display any kind of error
> >> dialog
> >> like Tioga drivers are able to do.
> >>
> >> For example, the following lines of code in my main() don't seem to do
> >> anything:
> >>
> >> fprintf(stderr, "ERROR: This is a bad error\n");
> >> return 1;
> >>
> >> I was expecting to see the OS display some sort of alert indicating
> >> the
> >> print job failed, but that does not happen.
> >>
> >> Am I missing something?
> >>
> >> Thanks,
> >> Dave
> >> ---
> >> Among the chief weapons of UNIX: Fear, surprise and ruthless
> >> efficiency.
> >>
> ---
> Among the chief weapons of UNIX: Fear, surprise and ruthless
> efficiency.
> _______________________________________________
> printing mailing list | email@hidden
> Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/printing
> Do not post admin requests to the list. They will be ignored.
_______________________________________________
printing mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/printing
Do not post admin requests to the list. They will be ignored.


References: 
 >CUPS and error dialogs (From: Richard Blanchard <email@hidden>)
 >Re: CUPS and error dialogs (From: Dave Camp <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.