Re: Your opinion about "how to get data from dialog box"
- From: Olexiy Avramchenko <olexiy irtech cn ua>
- To: Harobed <mailing harobed org>
- Cc: "gtk-list gnome org" <gtk-list gnome org>
- Subject: Re: Your opinion about "how to get data from dialog box"
- Date: Fri, 14 Nov 2003 10:17:14 +0200
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
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]