[gnome-db]Re: [Glade-devel] how to extend gnome-db support?
- From: Rodrigo Moya <rodrigo gnome-db org>
- To: Daniel Wagner <heapsort gmx net>
- Cc: glade-devel helixcode com, gnome-db-list gnome org
- Subject: [gnome-db]Re: [Glade-devel] how to extend gnome-db support?
- Date: Thu, 22 Feb 2001 13:34:18 -0500
Daniel Wagner wrote:
> On Thu, 22 Feb 2001, Rodrigo Moya wrote:
> > > > I'm not sure neither about this. We should find a way to have this automatically
> > > > specified when designing in Glade. Maybe we could add properties to the widget (in
> > > > Glade) to specify the GDA data soource to use, username and password. And then, have
> > > > the GnomeDbBrowser-related code in Glade, open the connection when created.
> > >
> > > I have started to do so, but run out of ideas for creating the source.
> > > It needs a Gda_Connection for creating a new gnome_db_browser widget. I
> > > guess it's not a good idea to write it like this:
> > >
> > > source_add (data, "Gda_Connection *cnc;\n");
> > > source_add (data, "cnc = cnc = gda_connection_new(bonobo_orb());\n");
> > > ...
> > please, DON'T use bonobo_orb, use gda_corba_get_orb instead.
> thanks for the tip :)
> > >
> > > ...
> > > source_add (data, " %s = gnome_db_browser_new (cnc);\n", data->wname);
> > >
> > yes, but before the call to gnome_db_browser_new, I'd add:
> > source_add(data, "gda_connection_open(cnc, $dsn, $user, $password);");
> > where $dsn, $user and $password are the properties specified by the user when designing
> > the screen from glade.
> > BTW, I'd also add, if that makes sense, a property to specify whether we want this code
> > for opening the connection or not. Since there are cases when people would prefer to add
> > that code themselves (say, in the main function, for example, before opening the screen
> > designed by glade).
> > On the other hand, yesterday I talked with Damon about this, and maybe it could be a good
> > idea to do something similar to what Visual Basic does (or did in the version I used some
> > years ago) for this: we could add an invisible widget (let's call it GnomeDbDataControl),
> > which contains all the info needed to open the connection. And then, you create
> > data-bound widgets (GnomeDbGrid, GnomeDbBrowser, etc) which have a property to indicate
> > the name of a GnomeDbDataControl widget associated with it. Thus, the code for opening
> > the connection is only generated for the GnomeDbDataControl widget, and the other widgets
> > just use that.
> > Do you like that idea?
> Yeah, that's exaclty what I was looking for. With GnomeDbDataControl, it
> would be much more easier to write the code and controling GnomeDb.
ok, so if Damon agrees to do it that way, let me a week or so to add this new widget to
gnome-db, so that you can start your work based on it.
I would start right now, but I'm busy and haven't got time.
] [Thread Prev