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.9 required=5.0 tests=BAYES_00,FORGED_GMAIL_RCVD, FREEMAIL_FROM autolearn=no 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,CP1252 Path: g2news1.google.com!postnews.google.com!j18g2000yqd.googlegroups.com!not-for-mail From: tolkamp Newsgroups: comp.lang.ada Subject: Re: How to implement JEWL File dialogs? Date: Thu, 28 Oct 2010 04:10:16 -0700 (PDT) Organization: http://groups.google.com Message-ID: <2e224902-401a-41b5-870a-403b78b0d9e9@j18g2000yqd.googlegroups.com> References: <407e812c-e249-4974-b7b2-df4a2b98f932@l20g2000yqm.googlegroups.com> NNTP-Posting-Host: 62.163.210.190 Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable X-Trace: posting.google.com 1288264216 19748 127.0.0.1 (28 Oct 2010 11:10:16 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Thu, 28 Oct 2010 11:10:16 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: j18g2000yqd.googlegroups.com; posting-host=62.163.210.190; posting-account=nZAcngoAAACcfYM9wDw3w9Z1XR3bObfs User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; GTB6.6; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; InfoPath.1; .NET4.0C),gzip(gfe) Xref: g2news1.google.com comp.lang.ada:14892 Date: 2010-10-28T04:10:16-07:00 List-Id: On 26 okt, 11:22, Yannick Duch=EAne (Hibou57) wrote: > Le Tue, 26 Oct 2010 10:25:44 +0200, tolkamp a =E9cr= it: > > > 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 =A0 > implementation to understand what is wrong. > > Here is : Open_Dialog does not open anything, this is just a kind of =A0 > constructor (bad name for a constructor). Think of it as if it was named = =A0 > Initialize_Open_Dialog. The spec just says =93-- create an open file dial= og =A0 > with this title.=94, 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 = : =A0 > Common_Dialog_Type) return Boolean; > There as well, the spec is lacking expressiveness, as it just say : > > =A0 =A0 -- =A0Execute (Dialog) =A0 =A0 =A0-- execute the dialog and retur= n True if the =A0 > OK > =A0 =A0 -- =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0-- button was u= sed to close the dialog and =A0 > False > =A0 =A0 -- =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0-- otherwise. > > Actually, I can tell you that this is this Execute method which display = =A0 > the dialog (the spec does not say this, but it is what the implementation= =A0 > actually do). > > So, you just have to invok Execute on the instance you created with =A0 > Open_Dialog. > > Tell if that works :) > > -- > Si les chats miaulent et font autant de vocalises bizarres, c=92est pas p= our =A0 > les chiens. Indeed when I add the function Execute(My_File_Selection_Dialog) the expected File Dialog window is shown. Now I can select the desired file and press button Open. By adding the function Get_Name(My_File_Selection_Dialog) the selected file can be used in the application.