Re: Stop process to wait for a signal to hapen



I want to stop the hole aplication while the event
on_button_data_entered_ok
doesn´t hapen. the problem is.
when I make
 
this funciton will return and my program is a Virtual Machine, so it must stop while the user doesn´t enter the data, if it doesn´t stop the callig functions....
 
execute_read()
{
  GtkWidget *window_enter_data;
  char          *mydata;
 
  window_enter_data=create_window_enter_data();
  gtk_widget_show(window_enter_data);
 
  mydata = strdup(gtk_entry_get_text(entry_data));
 
  ....
  ///mydata will contain trash!!
}
 
void execute()
{
   while (instruction!=NULL)
  {
     ...
     if(!strcmp(instruction->opcode,"rd"))
     {
        execute_read();
     }
     ...
 
     instruction=instruction->next;
  }
}

will continue and get thash, but I´m looking for a solution using semaphores
IanBell <ian redtommo com> wrote:
On Wednesday 17 March 2004 23:54, Murilo Tuvani wrote:
> How can I stop a function to wait for an event to hapen?
> I´m building an Virgual Machine using GTK 1.2 and when the program asks for
> an input I open a window and the program must be blocked waiting for the
> signal insert_data_button_ok_clicked (for exemple) and than continue.

What function do you want to stop. gtk *is* event based so it is blocked when
no events are pending unless your use idle time deliberately.

Ian
_______________________________________________
gtk-app-devel-list mailing list
gtk-app-devel-list gnome org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list



Yahoo! Mail - O melhor e-mail do Brasil. Abra sua conta agora!

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