Answering own question: On Fri, 2017-07-14 at 09:10 +0100, Russel Winder wrote: > It appears that all the Gotk3 examples use the old-fashioned > gtk.Init/gtk.Main application structure. I am trying to create a Go > GTK+3 application with the modern > gtk.Application/gtk.ApplicationWindow > structure. Everything seems to be there except... > > gtk.Application.AddWindow requires a *gtk.Window but the top-level > window should be a *gtk.ApplicationWindow. There seems no obvious way > of using a *gtk.ApplicationWindow as an argument to > gtk.Application.AddWindow that doesn't cause a compilation error.
It turns out you have to unpack rather than coerce – obvious really. If aw is a *gtk.ApplicationWindow then &(aw.Window) is a *gtk.Window. > I am clearly missing something obvious… anyone any pointers (sic) to > helpful stuff? Yes. :-) -- Russel. ============================================================================= Dr Russel Winder t: +44 20 7585 2200 voip: sip:russel.win...@ekiga.net 41 Buckmaster Road m: +44 7770 465 077 xmpp: rus...@winder.org.uk London SW11 1EN, UK w: www.russel.org.uk skype: russel_winder -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
signature.asc
Description: This is a digitally signed message part