Re: Wait for input



On Fri, Feb 16, 2001 at 11:43:06AM -0500 Ed Symanzik wrote:

Let's say I had a app with a button or menu item to connect to a
server.  I can catch that signal and open the connection.

However, if the user has not identified the server, I should
popup a window and get that information.  How do I wait until
they have set that value?

connect_button_pressed()
  if (no_server)
    server_popup();
  connect_to_server(server);

if would do it this way (not waiting for input, i dont like stuff, that
blocks the rest and i think GTK was not designed for such things)

connect_button_pressed() {
  if (no_server)
    server_popup();
  else
    connect_to_server();
}

server_popup_ok_clicked() {
  if (valid_server_entered())
    connect_to_server();
  else
    give_some_message();
}




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