From: "Yannick Duchêne (Hibou57)" <yannick_duchene@yahoo.fr>
Subject: Re: How to implement JEWL File dialogs?
Date: Tue, 26 Oct 2010 11:22:27 +0200
Date: 2010-10-26T11:22:27+02:00 [thread overview]
Message-ID: <op.vk6ezpuzule2fv@garhos> (raw)
In-Reply-To: 407e812c-e249-4974-b7b2-df4a2b98f932@l20g2000yqm.googlegroups.com
Le Tue, 26 Oct 2010 10:25:44 +0200, tolkamp <f.tolkamp@gmail.com> a é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 := 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 “-- create an open file dialog
with this title.”, 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 the
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 implementation
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’est pas pour
les chiens.
next prev parent reply other threads:[~2010-10-26 9:22 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-10-26 8:25 How to implement JEWL File dialogs? tolkamp
2010-10-26 8:41 ` Yannick Duchêne (Hibou57)
2010-10-26 9:22 ` Yannick Duchêne (Hibou57) [this message]
2010-10-28 11:10 ` tolkamp
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox