Thanks for the example Chris. I'm working on converting it to BXML to 
demonstrate how the same thing can be done in markup.

I noticed that you pass the dialog's owner to the constructor. Any reason you 
don't just use the open() method?

@Override
public void buttonPressed(org.apache.pivot.wtk.Button button) {
    final MyDialog myDialog = new MyDialog("MyDialog");
    myDialog.open(window, myDialogCloseListener);
}


On Jun 24, 2010, at 7:02 AM, Chris Bartlett wrote:

> Have a look at this, and let me know if you have any problems.  (It was 
> written against the current trunk)
> I'm no Pivot expert, so perhaps someone else can suggest 
> cleaner/simpler/better alternatives.
> 
> The main app features a form to show the data collected from the MyDialog 
> class, and a PushButton used to create and show a MyDialog instance.
> MyDialog itself extends Dialog.
> In order to keep the example as simple as possible, all Component creation is 
> done in java and not with WTKX/BXML.
> 
> Regards,
> 
> Chris
> 
> On Thu, Jun 24, 2010 at 2:28 PM, <[email protected]> wrote:
> Hi!
> 
> I need an input dialog to get some info from the user.
> I would prefere to have this dialog completely encapsulated and not
> directly wired to my main application class.
> 
> Something like this would be nice.
> 
> MyDialog dlg = new MyDialog()
> dlg.show;
> dlg.getDataX();
> dlg.getDataZ();
> 
> So the dialog itself needs the logic to handle userinputs.
> 
> Is there an example around that I could use?
> 
> Thx!
> 
> --
> GMX DSL: Internet-, Telefon- und Handy-Flat ab 19,99 EUR/mtl.
> Bis zu 150 EUR Startguthaben inklusive! http://portal.gmx.net/de/go/dsl
> 
> <MyDialog.zip>

Reply via email to