« Return to Thread: [vwnc] MockMedium and Printing Problem

Re: [vwnc] MockMedium and Printing Problem

by David AH Long :: Rate this Message:

Reply to Author | View in Thread

Hi Stewart,

I have a table that I have done in VW. I attached a picture of the UI. Basically, when you hit the print button, it should have the table widget print itself out on the graphics medium - which is the printer. It started working when I got a new image, although I think the borders are getting clipped.

Here's the code:

print
| ps cmp mainWindow mainCmp |

mainWindow := Window currentWindow.
mainCmp := mainWindow component.

self builder window.
cmp := self builder componentAt: #tableAspect.
ps := Printer startPrintJobNamed: 'temp.postscript'.

[(MockMedium
on: ((ScalingWrapper on: cmp copy) scale: 0.50)
in: (0 @ 0 extent: mainWindow bounds extent)
for: ps)
newGraphicsDevice: ps graphicsDevice;
display]
ensure:
[mainWindow
component: cmp;
extentEvent: mainWindow bounds extent;
flushCaches.
ps print.
mainWindow
component: mainCmp;
extentEvent: mainWindow bounds extent;
flushCaches.
].

On Tue, 2008-07-08 at 14:35 +1200, Stewart MacLean wrote:
Hi David,

 

Can you please provide a bit more background to your problem. I.e. what version of VW you are using, your platform, whether the error occurs when printing examples or in your own code, and also attach the walkback log of the doesNotUnderstand:.

 

Cheers,

 

Stewart

 

 

 

-----Original Message-----
From: vwnc-bounces@... [mailto:vwnc-bounces@...] On Behalf Of david
Sent: 7 July 2008 11:50 p.m.
To: vwnc@...
Subject: [vwnc] MockMedium and Printing Problem

 

Hello,

I was wondering if anyone had encountered a problem with MockMedium and Printing. This class is used in the Printer examples.
I've found I get a #doesNotUnderstand: message which then closes the main window. The print job runs ok, but for some reason the MockMedium
is being set as the main window, and it does not understand how to handle mouse events - or so it seems.

Anyone seen anything like this? Or know of a working method for printing a widget out to a file?

thanks,

David

Your business, your way.
http://sageteagroup.com



 


_______________________________________________
vwnc mailing list
vwnc@...
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
Your business, your way.
http://sageteagroup.com


_______________________________________________
vwnc mailing list
vwnc@...
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc

examplePrint.jpg (111K) Download Attachment

 « Return to Thread: [vwnc] MockMedium and Printing Problem

LightInTheBox - Buy quality products at wholesale price!