From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,WEIRD_PORT autolearn=unavailable autolearn_force=no version=3.4.4 Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!news.eternal-september.org!feeder.eternal-september.org!feeds.phibee-telecom.net!newsfeed.xs4all.nl!newsfeed8.news.xs4all.nl!nzpost2.xs4all.net!news.kpn.nl!not-for-mail From: "ldries46" Newsgroups: comp.lang.ada References: <57a1973c$0$12033$e4fe514c@news.kpn.nl> In-Reply-To: Subject: Re: GtkAda. Printing Date: Wed, 3 Aug 2016 12:25:17 +0200 MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset="Windows-1252"; reply-type=response Content-Transfer-Encoding: 7bit Importance: Normal X-Newsreader: Microsoft Windows Live Mail 16.4.3528.331 X-MimeOLE: Produced By Microsoft MimeOLE V16.4.3528.331 Message-ID: <57a1c6a7$0$12136$e4fe514c@news.kpn.nl> NNTP-Posting-Host: 77.168.179.107 X-Trace: 1470219944 dreader34.news.xs4all.nl 12136 77.168.179.107:56942 X-Complaints-To: abuse@kpn.nl Xref: news.eternal-september.org comp.lang.ada:31266 Date: 2016-08-03T12:25:17+02:00 List-Id: Yes Print is declared as Gtkada_Print_Operation; and still in the Call to routine Set_N_Pages(Print_Op, 1); the compiler does not find an error while the declaration is procedure Set_N_Pages (Self : not null access Gtk_Print_Operation_Record; N_Pages : Gint); and type Gtkada_Print_Operation_Record is new Gtk_Print_Operation_Record with private; type Gtkada_Print_Operation is access all Gtkada_Print_Operation_Record; I expect that in the compiler to react the same in simular cases. Therefore I think that the error in lines 190:30 is the real error and the one I asked about. "Dmitry A. Kazakov" schreef in bericht news:nns747$s6g$1@gioia.aioe.org... On 2016-08-03 09:02, ldries46 wrote: > 190:07: missing argument for parameter "Slot" in call to "On_Draw_Page" > declared at gtk-print_operation.ads:769 > 190:20: expected an access type with designated type > "Gtk_Print_Operation_Record" defined at gtk-print_operation.ads:98 > 190:20: found type "Gtkada_Print_Operation" defined at > gtkada-printing.ads:104 The compiler told you everything you need. You use an instance of Gtkada_Print_Operation instead of access Gtk_Print_Operation_Record. The types are declared as follows: type Gtkada_Print_Operation_Record is new Gtk_Print_Operation_Record with private; type Gtkada_Print_Operation is access all Gtkada_Print_Operation_Record; P.S. Granted, it seems a glitch in the GtkAda bindings which should have used access Gtk_Print_Operation_Record'Class instead. But nothing you could not workaround with an explicit type conversion... -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de