[APBeta] Exception on Canvas.Cancelled

Michael Portuesi portuesi at jotabout.com
Sun Aug 23 17:21:26 PDT 2009


Paul,

I did the "Hunt the Wumpus" game with debug statements in my Print  
finder Charts script.  They are pointing towards an exception  
generated by Canvas.Cancelled:

		Debug "Point A"

		' Open a new printer document (or display window for preview)
		if prefs.isPreview then
			' Onscreen preview cannot be printed (it looks horrible on paper)
			c = new Canvas( w, h, nil, wtitle, false )
		else
			c = new Canvas( prefs.showPageSetup )
		end if
		
		Debug "Point B"

		' Loop and print charts/forms for selected objects
		if not c.Cancelled then
			
			Debug "Point C"


I get "A" and "B" before the exception dialog, but not "C".

The Framework Reference describes Cancelled as a read-only property on  
the Canvas object.  Why would that cause an exception?

I'm using 2.0b55 on Mac OS X 10.5.8, by the way.

On a different note, I note that the Framework Reference lists the  
existence of a PrinterCanvas object, which is a subclass of Canvas.   
Should I be using PrinterCanvas instead of Canvas when rendering my  
star charts to the printed page?

Thanks in advance for the advice,
Michael P.



More information about the APBeta mailing list