[futurebasic] Re: [FB] cancel print help

Message: < previous - next > : Reply : Subscribe : Cleanse
Home   : January 2006 : Group Archive : Group : All Groups

From: Douglas Stemen <dstemen@...>
Date: Sat, 7 Jan 2006 12:09:11 -0500
As I rethink what I am asking, it is clear that RP's code does detect  
the button press in the print manager status window. The bottom most  
window resizing (probably to approximately 100 by 100) when the  
cancel button is pressed  and continuing to print some text in the  
resized window is an FB runtime issue (probably with CLOSE LPRINT or  
ROUTE _toScreen). It does this in at least FB 4.2 and newer. I had  
hoped that someone had experienced this and had a workaround for this  
issue. I will further try to isolate/demonstrate the circumstances,  
but it is clear this is not caused by my code.

Doug

On Jan 7, 2006, at 10:48 AM, Douglas Stemen wrote:

> Thanks.
>
> This is a compiled application run in OS 10. Some of my routines  
> can print 100 pages ( I have many printing routines in the  
> program). I want to cancel printing while in For Next loops under  
> compiled program control. I just need to some help to know how to  
> efficiently sense when the Apple PM Cancel button is pressed while  
> printing to the printer or in preview mode. This routine previously  
> worked but something has changed to screw up underlying windows.   
> The old command period method used to work great in OS 9.
>
> On Jan 7, 2006, at 10:30 AM, Brian Stevens wrote:
>
>>
>> On Jan 7, 2006, at 5:57 AM, Douglas Stemen wrote:
>>
>>> Can someone tell me what syntax to use to detect when someone has  
>>> pressed the cancel button in the OS X print status window that  
>>> automatically displays each time FB is in the process of printing  
>>> to a printer?
>> Are you referring to the printing from the FB editor or are you  
>> describing an application created with FB?  On my machine I have a  
>> desktop printer (an alias) to my connected HP LaserJet printer  
>> which can be opened during printing to cancel any or all jobs.  
>> BTW: I'm assuming (based on your code snippet)  you are using the  
>> PM code posted by RP (and can also be found in  
>> Examples=>**Donations**=>Robert P's Favorite Examples=>OS X  
>> folder=>Printing=>Page Setup and Print Sheets. I don't see the  
>> answer in this code but there might be a hint there.
>> Once the job is spooled (sorry for the old jargon---old habits die  
>> hard) to the print manager, I believe the application is out of  
>> the loop in terms of controlling the print job.
>>
>>> I cannot find find any reference to this common issue in the  
>>> reference manuals or in the examples.
>>>
>>> I have routines that print many pages and need to be able to  
>>> cancel. All my print routines use DEF LPRINT to select the  
>>> printer & copies and I use PRCANCEL to detect if the job is  
>>> canceled before starting.
>>>
>>> RP helped me with this several years ago with the following code.  
>>> This syntax put in the FOR-NEXT printing loop to constantly watch  
>>> for a user pressing the cancel button.
>>>
>>> LONG IF ( FN PMSessionError( gFBPrintSession ) == _kPMCancel )
>>> CLOSE LPRINT
>>> ROUTE _toScreen
>>> END IF
>>>
>>> This still stops printing, but now this results in underlying  
>>> windows being resized to a very small size and some remaining  
>>> text being printed to the window. I do not know if OS 10.4 or new  
>>> versions of FB caused the change. I am compiling in carbon  
>>> appearance.
>> I don't remember seeing anything new in terms of the FB appearance  
>> runtime for CLOSE LPRINT or the various flavors of ROUTE. Assuming  
>> all other factors have not changed (big if), OS X Tiger might be  
>> involved. I'm running 10.4.3 with no adverse issues but my  
>> printing is limited. I believe at least one of the revs of Tiger  
>> (don't remember if it was 10.4.1 or 10.4.2) presented some  
>> printing issues. Maybe a scan of Macintouch archives or MacFixIt  
>> archives will provide a clue. Wish I had more info for you.
>>
>> Brian S.
>>
>> --
>>
>
> --
>