comp.lang.ada
 help / color / mirror / Atom feed
From: "ldries46" <bertus.dries@planet.nl>
Subject: Re: GtkAda. Printing
Date: Thu, 4 Aug 2016 07:33:01 +0200
Date: 2016-08-04T07:33:01+02:00	[thread overview]
Message-ID: <57a2d3a9$0$20631$e4fe514c@news.kpn.nl> (raw)
In-Reply-To: <nnsij4$1ddn$1@gioia.aioe.org>

To check what you said I tried the following just added an extra 
declaration:
Print_OpR : Gtkada_Print_Operation_Record;
and replaced Print_Op with it: The error stayed
Then I changed Print_OpR in On_Draw_Page with Print_OpR'Access.
The Error stayed nut said they expected Gtk_Print_Operation_record.
When I Changed the declaration accordingly The Error said they expected 
Gtkada_Print_Operation_Record
This looks like an infinite loop, and again, my experience wiyh GPS ia that 
somtimes the compiler tries several ways to resolve a problem abd you have 
to find out which of the several Error messages is the solution for you. I 
stll think It is the last one

: expected type "Cb_Gtk_Print_Operation_Gtk_Print_Context_Gint_Void" defined 
at gtk-print_operation.ads:754
: found type access to procedure "Draw_Page" defined at line 191
:   ==> in call to inherited operation "On_Draw_Page" at 
gtkada-printing.ads:102

I still cannot find how to address the draw_page routine ib there

"Dmitry A. Kazakov"  schreef in bericht news:nnsij4$1ddn$1@gioia.aioe.org...

On 2016-08-03 12:25, ldries46 wrote:
> 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.

That depends on whether the operation is primitive or type specific. A
primitive operation is inherited. Draw_Page parameter types are

    access Gtk_Print_Operation_Record'Class;
    not null access Gtk_Context_Record'Class;
    Gint

not

    Gtk_Print_Operation_Record;
    Gtk_Print_Context;
    Gint

-- 
Regards,
Dmitry A. Kazakov
http://www.dmitry-kazakov.de 


  reply	other threads:[~2016-08-04  5:33 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-03  7:02 GtkAda. Printing ldries46
2016-08-03  7:39 ` Dmitry A. Kazakov
2016-08-03 10:25   ` ldries46
2016-08-03 10:55     ` Dmitry A. Kazakov
2016-08-04  5:33       ` ldries46 [this message]
2016-08-04  7:01         ` Dmitry A. Kazakov
2016-08-04 11:39           ` ldries46
2016-08-04 12:27             ` ldries46
2016-08-05 17:34               ` ldries46
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox