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,FREEMAIL_FROM autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: a07f3367d7,e3d1f8b996f89671 X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,UTF8 Path: g2news1.google.com!news4.google.com!proxad.net!feeder1-2.proxad.net!news.mixmin.net!aioe.org!not-for-mail From: =?utf-8?Q?Yannick_Duch=C3=AAne_=28Hibou57?= =?utf-8?Q?=29?= Newsgroups: comp.lang.ada Subject: Re: How to implement JEWL File dialogs? Date: Tue, 26 Oct 2010 11:22:27 +0200 Organization: Ada @ Home Message-ID: References: <407e812c-e249-4974-b7b2-df4a2b98f932@l20g2000yqm.googlegroups.com> NNTP-Posting-Host: hjR5igqaLk4UmV7iTPzekg.user.speranza.aioe.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed; delsp=yes Content-Transfer-Encoding: Quoted-Printable X-Complaints-To: abuse@aioe.org X-Notice: Filtered by postfilter v. 0.8.2 User-Agent: Opera Mail/10.63 (Win32) Xref: g2news1.google.com comp.lang.ada:14789 Date: 2010-10-26T11:22:27+02:00 List-Id: Le Tue, 26 Oct 2010 10:25:44 +0200, tolkamp a =C3=A9= crit: > I try to implement an file selection window using Open_Dialog. Here is= > the code: > > My_File_Selection_Dialog : Open_Dialog_Type; > -- > -- > My_File_Selection_Dialog :=3D Open_Dialog("file name"); > end; > > Nothing is displayed when this code is running. I expect an input file= > selection window as described in section 6.3 of > JEWL.windows User Manual OK, I see. The spec in not clear enough I feel, I had to look at the = implementation to understand what is wrong. Here is : Open_Dialog does not open anything, this is just a kind of = constructor (bad name for a constructor). Think of it as if it was named= = Initialize_Open_Dialog. The spec just says =E2=80=9C-- create an open fi= le dialog = with this title.=E2=80=9D, but this ambiguous with such a name. Open_Dialog returns an instance of a File_Dialog_Type. File_Dialog_Type is derived from Common_Dialog_Type. Common_Dialog_Type has a method named Execute : function Execute (Dialog= : = Common_Dialog_Type) return Boolean; There as well, the spec is lacking expressiveness, as it just say : -- Execute (Dialog) -- execute the dialog and return True if t= he = OK -- -- button was used to close the dialog and= = False -- -- otherwise. Actually, I can tell you that this is this Execute method which display = = the dialog (the spec does not say this, but it is what the implementatio= n = actually do). So, you just have to invok Execute on the instance you created with = Open_Dialog. Tell if that works :) -- = Si les chats miaulent et font autant de vocalises bizarres, c=E2=80=99es= t pas pour = les chiens.