From: "Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de>
Subject: Re: How to use a function in a procedure call?
Date: Fri, 30 Sep 2011 14:16:34 +0200
Date: 2011-09-30T14:16:34+02:00 [thread overview]
Message-ID: <z7eihbemy00c$.1d4qyl587bov2$.dlg@40tude.net> (raw)
In-Reply-To: 604bf6ae-4050-4d03-be4a-aab907d42162@j10g2000vbb.googlegroups.com
On Fri, 30 Sep 2011 03:41:30 -0700 (PDT), Sunny wrote:
> I want so set a icon to my frame. Use GtkAda. But when I use the
> Set_Icon_From_File(win,"icon.jpg");
> An Error said that "can not use function 'Set_Icon_From_File' in a
> procedure call"
> How to solve the problem? Thanks!
By using the result returned by the function.
> My source code is:
> WITH Gtk.Window;USE Gtk.Window;
> WITH Gtk.Main;USE Gtk.Main;
> WITH Gtk.Enums;USE Gtk.Enums;
>
> PROCEDURE icon IS
> win:gtk_window;
>
> BEGIN
> Init;
> Gtk_new(win);
> Set_Size_Request(win,300,200);
> Set_Icon_From_File(win,"icon.jpg");
if not Set_Icon_From_File(win,"icon.jpg") then
null; -- Or set the default icon instead
end if;
--
Regards,
Dmitry A. Kazakov
http://www.dmitry-kazakov.de
next prev parent reply other threads:[~2011-09-30 12:16 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-09-30 10:41 How to use a function in a procedure call? Sunny
2011-09-30 12:16 ` Dmitry A. Kazakov [this message]
2011-09-30 19:13 ` Jeffrey Carter
2011-10-01 3:53 ` Sunny
2011-10-01 5:06 ` Jeffrey Carter
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox