[Mono-list] Mono & Printing
Klaus Siebke
ksiebke at web.de
Mon Apr 27 04:28:59 EDT 2009
Hi,
I've tried the DemoPrinting example, but the program doesn't work :-(
Messages:
------------
Unhandled Exception: System.NullReferenceException: Object reference not set
to an instance of an object
at GLib.Signal.Lookup (GLib.Object obj, System.String name,
System.Delegate marshaler) [0x00000]
at Gtk.PrintOperation.add_BeginPrint (Gtk.BeginPrintHandler value)
[0x00000]
at GtkDemo.DemoPrinting..ctor () [0x0002b] in
/share/source/mono/csharp/DemoPrinting/DemoPrinting/DemoPrinting.cs:36
at DemoPrinting.MainClass.Main (System.String[] args) [0x0000a] in
/share/source/mono/csharp/DemoPrinting/DemoPrinting/Main.cs:20
Code extract:
----------------
public DemoPrinting ()
{
print = new PrintOperation ();
// Set the Print Operation methods
(line 36) print.BeginPrint += new BeginPrintHandler (OnBeginPrint);
<--------------
print.DrawPage += new DrawPageHandler (OnDrawPage);
print.EndPrint += new EndPrintHandler (OnEndPrint);
Any ideas?
Thank you,
Klaus
Adam Tauno Williams wrote:
>
> On Sat, 2009-04-25 at 06:31 -0700, Yoerivdm wrote:
>> Is there a way to create and directly print reports from mono?
>
> <http://library.gnome.org/devel/gtk/2.12/Printing.html>
> See DemoPrinting.cs in the source tar ball
> <http://ftp.gnome.org/pub/gnome/sources/gtk-sharp/2.12/gtk-sharp-2.12.6.tar.gz>
> <http://sysinf0.klabs.be/usr/share/gtk-sharp2-examples/GtkDemo/DemoPrinting.cs?dist=%3Barch=>
> --
> OpenGroupware developer: awilliam at whitemice.org
> <http://whitemiceconsulting.blogspot.com/>
> OpenGroupare & Cyrus IMAPd documenation @
> <http://docs.opengroupware.org/Members/whitemice/wmogag/file_view>
>
> _______________________________________________
> Mono-list maillist - Mono-list at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-list
>
>
--
View this message in context: http://www.nabble.com/Mono---Printing-tp23232145p23252022.html
Sent from the Mono - General mailing list archive at Nabble.com.
More information about the Mono-list
mailing list