Re: [gnome-db] libgda/libgnome questions



On Tue, 2003-08-12 at 00:28, Loren Bandiera wrote:
> I'm using libgda/libgnomedb in my application sussen (which you guys
> where nice enough to mention on the GNOME-DB website; thanks) and 
> I've got a couple of questions.
> 
it's just to make you happy so that you continue using our libs :-)

> 1) In libgnomedb if you use the GnomeDbConnectionSelector widget how to
> do you find out what the user selected (if anything)?  
> 
GnomeDbConnectionSelector is a subclass of GtkOptionMenu, so you can
attach to the "changed" signal on it.

> 2) How do you run a GnomeDbDsnConfigDruid?  I can put it into a window
> and show it all but then what?  How does it get into a loop waiting for
> the user?  How do I know when it's finished and I can call
> gnome_db_dsn_config_druid_get_dsn()
> 
connect to the "finished" signal on it.

> In my app, I've got a Getting Started druid, if the user doesn't have a
> pre-existing GNOME-DB connection to use then it offers a choice to
> create a new one.  I thought I could just pop up the dsn_config_druid
> after I was done.  I haven't been able to make it work thus far.
> 
> Would it be better to try and integrate GnomeDbDsnConfig into my druid? 
> 
well, I'd use the druid, since it makes things easier for the user.
Although it might be a bit weird, UI-wise, to have a druid within a
druid. In that case, the GnomeDbDsnConfig widget might be ok, although
it's more cryptic for the user.

> 3) When using the GnomeDbBrowser in a dialog I've noticed if I try and
> destroy the dialog after the user has done something with the
> GnomeDbBrowser widget it hangs my program.  
> 
> I found that by getting the close signal and first calling
> gnome_db_browser_set_connection() and setting it the widget connection
> to NULL then calling gtk_widget_destroy() on the dialog
> it works.
> 
hmm

> Is this the correct way to use the widget?
> 
no, it shouldb't be needed. Could you please gdb your program, and
obtain a backtrace when it hangs (bt command in (gdb) prompt).

> 4) When my software inserts data into a database I'm getting this error
> on every insert statement I make:
> 
> CRITICAL **: file gda-mysql-recordset.c: line 446
> (gda_mysql_recordset_new): assertion `mysql_res != NULL' failed
> 
> Code wise what I'm doing is exactly from your libgda manual examples. 
> I've got a execute_sql_non_query function which I pass the connection
> and SQL command as a string.  
> 
> The data does get inserted and it looks okay.  I'm not sure where the
> error is coming from.
> 
it's an assertion on the code, which seems to not affect anything.
Although it would be nice to know where it comes from. Could you please,
again, in gdb:

(gdb) b g_logv
(gdb) continue
...
when it stops in g_logv and displays the warning message, obtain again
the backtrace. That should tell us where the call comes from.

> 
> 
> I've also got a couple of questions about the GDA Report Engine.
> 
> 1) Is it meant to be used today?
>
no, it's unfinished. Although it would need only a bit of work to make
it work.

>   I noticed when trying to write some
> code with it the libs were not being passed by pkg-config.  I was able
> to get it working by manually adding the link to the libgda-report-2.la
> file.
> 
yes, we need a libgda-report.pc file, as we do with libgda.pc.

> 2) I'd like to have my application produce a number of different
> reports  (in different formats) on the collected data with the user
> being able to add more.  
> 
you could have a look at papyrus (papyrus.treshna.com). It misses libgda
support, but from what Andru (the author) says, it should be an easy job
to add that support.

> I kind of have that working today but it looks like the reporting engine
> might be better suited to this task.  
> 
yes. The reporting engine is one of the most interesting things in
libgda. If we had it finished... :-)

> What's up with the libgnomedb ReportEditor widget?  I couldn't ever get
> it to display when writing the code by hand and it wasn't in glade.  Is
> it still a work in progress?
> 
don't use it, it's just half done. I think I'm going to remove it from
the installed headers for 1.0, so that nobody ever tries to use it until
it's really done.

> Will I be able to pass a ReportDocument to this widget let a user define
> their own report in my application?  It sounds like that is how it
> does/will work in the docs but it's not 100% clear to me.
> 
that's how it will work, yes.

> Are there any plans to have some libgnomedb widget that can display
> these reports in some fashion?  Say a ReportViewer widget?  
> 
yes, a GnomeDbReportViewer widget is also planned. It would use
gnome-print to create a preview of the report and to allow users to
print it.

> 3) Are there any examples for how the various ReportItems work
> together?  I'm kind of iffy on how to layout a report properly.  
> I saw the stuff in report/testing but it was pretty basic stuff.
> 
Santi, the guy who last worked on the report engine is missing in
action, so I think you'll have to look at the code again :-) There is a
report example in libgda/report.

cheers




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