[APBeta] Exception on Canvas.Cancelled
Paul Rodman
paul at ilanga.com
Sun Aug 23 18:07:17 PDT 2009
On Aug 23, 2009, at 5:21 PM, Michael Portuesi wrote:
> 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?
Probably a bug. I will check.
>
> 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?
That's for printing the plan objects, observations and forms (now
handled by a script). You could certainly create a printing script for
your Finder Charts, but I suggest not messing with that right now as
it's fairly non-trivial. It will (eventually) get documented.
Paul R.
More information about the APBeta
mailing list