On Wed, 25 Aug 1999, you wrote:
> On Wed, 25 Aug 1999, Damon Chaplin wrote:
> 
> > "Gene S." wrote:
> > 
> > > Different person, but same question. I've just started playing with Glade, and
> > > it's very nice, however I have the same problem.
> > > 
> > > I have 2 text entry boxes, one called "host" and one called "user", and one
> > > text box named "output".
> > > 
> > > so, when I click the button "Action", I'm doing the following:
> > > 
> > > GtkWidget *hostname, *username, *results;
> > > 
> > > hostname = lookup_widget(GTK_WIDGET(host), "host");
> > > etc..
> > > 
> > > When I run make, it complains that 'host' is undeclared.
> > > 
> > > I'm sure I'm making a stupid mistake somewhere, but the obvious is eluding me.
> > > 
> > > Any advice?
> > > 
> > > You said above, pass any widget and it's name, so that's what I thought I was
> > > doing, but I guess
> > > I'm still screwing it up.
> > 
> > 
> > The first argument to lookup_widget() must be a valid pointer to one of the widgets
> > in the window or dialog box.
> > 
> > In a signal handler, the first argument is the widget the signal was for, and you
> > can usually use this as the first argument to lookup_widget(). e.g.
> > 
> > 
> > void
> > on_button1_clicked                     (GtkButton       *button,
> >                                         gpointer         user_data)
> > {
> >   GtkWidget *host, *user;
> > 
> >   host = lookup_widget (GTK_WIDGET (button), "host");
> >   user = lookup_widget (GTK_WIDGET (button), "user");
> > }
> > 
> > 
> 
> But what should one do if you want to acces a widget wich is not in 
> the argument of the lookup_widget , or even better, not on the same window
> as the widget named in the arguments for lookup_widget?
> excuse me if this is a stupid question..
> its in the middle of the night.. and i need to get some sleep now!
> 
> 
> +---------------------------------------------------------------------+
> To unsubscribe from this list, send a message to [EMAIL PROTECTED]
> with the line "unsubscribe glade-devel" in the body of the message.

        pass it as data on creation of OBJECT The lookup as below
        syntax_window = gtk_object_get_data (GTK_OBJECT (pass_window), MainWindowKey);
--
 \!!!/            
 ($$) 
_(_)_Ooo__________________________________
_____!_____!_____!_____!_____!_____!_____!___!
___!____!_____!_____!_____!_____!_____!_____!_
___!____!_____!_____!_____!_____!_____!_____!_
  "The grass is a little greener over here!"

Have a nice day! :-)

John Hawk
Email: [EMAIL PROTECTED]
"Got-Ya! it was sea-grass. I'm a diver hope you are!"

+---------------------------------------------------------------------+
To unsubscribe from this list, send a message to [EMAIL PROTECTED]
with the line "unsubscribe glade-devel" in the body of the message.

Reply via email to