[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 12:26:38 -0500
Daniel Wagner wrote:
> On Thu, 22 Feb 2001, rodrigo gnome-db org wrote:
>
> > > > yes, please, do so. You can either ask here (on glade-devel) or on the
> > > > gnome-db-list (gnome-db-list gnome org).
> > > >
> > > > What problems are you having right now? compiling issues?
> > >
> > > No, no. I had trouble to get a gda connection. For example, I was
> > > unable to use gnomedb-fe, because my libxml was outdated. Now it works.
> > >
> > > Right now, I'm not sure how to intergrate gnomedbbrowser: in order
> > > to add a new gnomedbbrowser widget, you will be asked for a
> > > gda-connection (gnome-db-login) and then this will be used somehow.
> > > 'somehow' means I don't know right now.
> > >
> >
> > 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.
>
> ...
> 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?
cheers
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]