Re: [Mono-list] Gtk print demo fails on Windows7 for all versions of Mono/Gtk
Am 08.09.2011 20:06, schrieb Doug Blank: Wow... nothing. No activity in the bug tracker. No response here. Maybe someone can make some guesses about the issue, or why I can't get any comments: Perhaps you can find an solution in https://bugzilla.novell.com/show_bug.cgi?id=380675 If that does not help you should send your complaint about the missing support to the people you did contract for urgent support. Elmar ___ Mono-list maillist - Mono-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-list
Re: [Mono-list] Gtk print demo fails on Windows7 for all versions of Mono/Gtk
On Fri, Sep 9, 2011 at 3:34 AM, Elmar Haneke el...@haneke.de wrote: Am 08.09.2011 20:06, schrieb Doug Blank: Wow... nothing. No activity in the bug tracker. No response here. Maybe someone can make some guesses about the issue, or why I can't get any comments: Perhaps you can find an solution in https://bugzilla.novell.com/show_bug.cgi?id=380675 Yes! Thank you, thank you, thank you! It turns out that if you want to use Gtk.PrintOperation, your Main function, wherever it is, must have the [STAThread] attribute. I've been using Mono and Gtk# for a year now without this (just using Gtk.Application.Invoke for to run in the correct thread), but Printing appears to require STAThread. (My application is actually written in IronPython, which would be problematic as there is no way to set this attribute, and so there appears to be no way to have a pure IronPython app that prints in Windows. But this is easily remedied by creating a little C# wrapper). If that does not help you should send your complaint about the missing support to the people you did contract for urgent support. Well, this is an open source project, without money or contracts. So it is up to people like us to make sure that we provide even little hints to each other. And so, this day shall be know as Elmar Day :) Your hint means a lot to a lot of users. Thanks! -Doug Elmar ___ Mono-list maillist - Mono-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-list ___ Mono-list maillist - Mono-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-list
Re: [Mono-list] Gtk print demo fails on Windows7 for all versions of Mono/Gtk
On 09.09.2011 13:06, Doug Blank wrote: On Fri, Sep 9, 2011 at 3:34 AM, Elmar Hanekeel...@haneke.de wrote: Am 08.09.2011 20:06, schrieb Doug Blank: Wow... nothing. No activity in the bug tracker. No response here. Maybe someone can make some guesses about the issue, or why I can't get any comments: Perhaps you can find an solution in https://bugzilla.novell.com/show_bug.cgi?id=380675 Yes! Thank you, thank you, thank you! It turns out that if you want to use Gtk.PrintOperation, your Main function, wherever it is, must have the [STAThread] attribute. I've been using Mono and Gtk# for a year now without this (just using Gtk.Application.Invoke for to run in the correct thread), but Printing appears to require STAThread. (My application is actually written in The printing support is invoking native Windows functions, and some of them need a STA thread. IronPython, which would be problematic as there is no way to set this attribute, and so there appears to be no way to have a pure IronPython app that prints in Windows. But this is easily remedied by creating a little C# wrapper). You don't need a wrapper if you translate this to IronPython: // entry point static void Main (string[] args) { // create a STA thread Thread t = new Thread(delegate { RealMain(args); }); t.SetApartmentState(ApartmentState.STA); t.Start(); t.Join(); } static void RealMain(string[] args) { // do stuff you've done in main before } Robert ___ Mono-list maillist - Mono-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-list
Re: [Mono-list] Gtk print demo fails on Windows7 for all versions of Mono/Gtk
On Fri, Aug 26, 2011 at 6:13 AM, Doug Blank doug.bl...@gmail.com wrote: Has anyone tried to print using Mono on Windows7? I have some sample code (basically the demo print program) on: http://bugzilla.xamarin.com/show_bug.cgi?id=218 that doesn't run on any version of Mono that I have tried on Windows7? Surely this is a serious issue, or something that no one else is seeing? If someone could try the code, and report back: gmcs DemoPrinting.cs /pkg:gtk-sharp-2.0 -r:Mono.Cairo Run with: mono DemoPrinting.exe Thanks for *any* feedback, Wow... nothing. No activity in the bug tracker. No response here. Maybe someone can make some guesses about the issue, or why I can't get any comments: [ ] - we're too busy to do anything related to Gtk under Mono [ ] - we don't support Mono/Gtk/Windows7 any more [ ] - I don't see the problem [ ] - Use a different method to print when using Mono on Windows (like what?) As far as I can tell, there is no way to print from Windows7. Am I wrong? -Doug -Doug ___ Mono-list maillist - Mono-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-list
[Mono-list] Gtk print demo fails on Windows7 for all versions of Mono/Gtk
Has anyone tried to print using Mono on Windows7? I have some sample code (basically the demo print program) on: http://bugzilla.xamarin.com/show_bug.cgi?id=218 that doesn't run on any version of Mono that I have tried on Windows7? Surely this is a serious issue, or something that no one else is seeing? If someone could try the code, and report back: gmcs DemoPrinting.cs /pkg:gtk-sharp-2.0 -r:Mono.Cairo Run with: mono DemoPrinting.exe Thanks for *any* feedback, -Doug ___ Mono-list maillist - Mono-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-list