Re: Your opinion about "how to get data from dialog box"

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Harobed wrote:

Hello,

I would like know your opinion about one choice whose for me is
without response.

For you, what is the best code design to use when you make a dialog
box. More specify about how get the data ?

For me, I see 3 solutions :

1 - The dialog box handle directly the data when the validation is done.

Drawback : many global variable. And dialog box less reusable.

2 - The dialog box emit signal whose send data to callback. Avantage :
the data is handle out of dialog box.

3-
Call a function whose launch the dialog box. When she closed then the
function return data.


As for me I'd prefer this way - its simple to realize Cancel/Apply/Ok behaviuor.

Drawback : application is blocked while the dialog box isn't
destroy. And, obligation to use thread.


Application is not almost blocked (expose, for example, runs just fine) but widgets can't handle user's
input. In case you want to interact with a widgets in parent's window why not to use another window
instead of dialog (which is supposed to be non-resizeable,modal and transient) ?


Olexiy


_______________________________________________ gtk-list@xxxxxxxxx http://mail.gnome.org/mailman/listinfo/gtk-list

[Index of Archives]     [Touch Screen Library]     [GIMP Users]     [Gnome]     [KDE]     [Yosemite News]     [Steve's Art]

  Powered by Linux