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=-0.3 required=5.0 tests=BAYES_00, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,d356566c971f9921 X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Received: by 10.68.38.38 with SMTP id d6mr38838130pbk.4.1317384972481; Fri, 30 Sep 2011 05:16:12 -0700 (PDT) Path: lh7ni8269pbb.0!nntp.google.com!news1.google.com!news.glorb.com!feeder.erje.net!feeder.news-service.com!aioe.org!.POSTED!not-for-mail From: "Dmitry A. Kazakov" Newsgroups: comp.lang.ada Subject: Re: How to use a function in a procedure call? Date: Fri, 30 Sep 2011 14:16:34 +0200 Organization: cbb software GmbH Message-ID: References: <604bf6ae-4050-4d03-be4a-aab907d42162@j10g2000vbb.googlegroups.com> Reply-To: mailbox@dmitry-kazakov.de NNTP-Posting-Host: FbOMkhMtVLVmu7IwBnt1tw.user.speranza.aioe.org Mime-Version: 1.0 X-Complaints-To: abuse@aioe.org User-Agent: 40tude_Dialog/2.0.15.1 X-Notice: Filtered by postfilter v. 0.8.2 Xref: news1.google.com comp.lang.ada:18230 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Date: 2011-09-30T14:16:34+02:00 List-Id: 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