thanks, I'm glad you like it.
> Ever considered doing a wxPython based version of sqlkit?
no, honestly. I was asked for a Qt porting a year ago but I don't have any
real personal advantage so I just decided I wouldn't do it.
> Is all the GTK related stuff well isolated?
not really/not always.
all sql interaction is definitely segregated from gtk. That means that the
layer that grants a django_like syntax over sqlalchemy and the filtering is
a totally gtk independent.
But all my widgets (i.d.: SqlMask, SqlTable but also many other subsidiary
widgets) derive from gobject as a mean to propagate signals.
Since the last release even each SA object inglobe via AttributeExtension a
gobject that emits signals in order to inform observers of changes in the
model. (That will change in the future to the new signal frawework of SA 0.7)
Fields are totally independent from GTK, they talk to miniwidgets that are a
gtk display of a field value. SqlTable has an implementation that strongly
depends on gtk.TreeView/gtk/TreeStore.
> Would you think it a big
> job to create a wxPython based version?
I think it would be a big effort, If anybody feels like doing it, it can
surely be a good occasion to furtherly cleanup user interface the rest. But
would not be simple...
sandro
*:-)
--
Sandro Dentella *:-)
http://www.reteisi.org Soluzioni libere per le scuole
http://sqlkit.argolinux.org SQLkit home page - PyGTK/python/sqlalchemy
> Wondered what "gobject" was about when I had a very very quick look at
> the code.
gobject is now separate from GTK, so you can use it independently. I found
it extremly useful. A good introduction is here:
http://www.pygtk.org/articles/subclassing-gobject/sub-classing-gobject-in-python.htm
> > Since the last release even each SA object inglobe via AttributeExtension a
> > gobject that emits signals in order to inform observers of changes in the
> > model. (That will change in the future to the new signal frawework of SA 0.7)
> >
> > Fields are totally independent from GTK, they talk to miniwidgets that are a
> > gtk display of a field value. SqlTable has an implementation that strongly
> > depends on gtk.TreeView/gtk/TreeStore.
> Wondered what you were using for this stuff.
A TreeView is the GTK Widget, TreeStore is the model. Then I instruct the
widget how to represent data in the model (sqlkit.widgets.table.columns).
In the model I place all the records returned by SA. Each data-type has a
different renderer.
> I guess I will have to look at GTK then.
That's surely good and needed to create a complete application. The best way
to approach sqlkit is anyhow to browse the 80+ examples in the demo dir. A
very 'cheap' and simple approach is to copy samples and start them from the
demo listing. You can change the example and restart it from the demo
listing w/o restarting the demo.
> What version of GTK is the recommended one (I am on Windows) and what
> is a good IDE for it, or is the Windows Package Manager you mention on
> the Windows Install page going to give me all I need. I guess I just
> have to try it.
WPM is a *very* simple way to install everything under windows, I wanted it
expecially for those people that wnt sqlkit for the application and don't
even know waht a 'python setup.py install' would be. If you already have
python installed and are familiar with installing modules -as I guess you
are-, you can just install using the pygtk-all installer and standard
donelowd + python setup.py install.
> BTW, on the web site I would suggest to move the things like support/
> list, how to install to a page different then "Download", nearly
> didn't look there.
Ok, I have changed a little in that direction now. And all documentation
page have the link to the mailing list on the right.
sandro
*:-)
PS: if you feel like contributing the french localization, I can help you
setting it up (basically: poedit/virtaal sqlkit.pot)
Just curious: what would be the benefits?!
Pietro
yes!
>
> >
> > > > Since the last release even each SA object inglobe via AttributeExtension a
> > > > gobject that emits signals in order to inform observers of changes in the
> > > > model. (That will change in the future to the new signal frawework of SA 0.7)
> >
> > > > Fields are totally independent from GTK, they talk to miniwidgets that are a
> > > > gtk display of a field value. SqlTable has an implementation that strongly
> > > > depends on gtk.TreeView/gtk/TreeStore.
> > > Wondered what you were using for this stuff.
> Just tried it against my own database using my SA model and it just
> works. Amazing!
:-)
I think that sqlkit/sqledit can be very handy not only for those that
develop an application based on databases *with* sqlkit but also for those
that just want to debug theyre application using sqledit (customized as
suggested in in [2])
> BTW, can't see how does it figure out which column information to
> display for relationship columns? In my cases it shows the right
> column (name) but looking at "Info" for that column it doesn't give
> any indication which column it uses.
Well, you should read the 'completion' documentation [1] at least up to
"foreign key description & search field". The default way is to guess that
the first string field of a table will do. That cannot be always correct so
you can configure it in a table, so that it will work also w/o need of any
programming skill (You edit that from sqledit).
The nice thing is that you can also use as description a mixture of other
columns by just setting e.g.: '%(last_name)s %(first_name)s -
%(city)s'.
[1] http://sqlkit.argolinux.org/sqlkit/completion.html
[2] http://sqlkit.argolinux.org/misc/sqledit.html
> > > What version of GTK is the recommended one (I am on Windows) and what
I forgot to answer at this. I suggest at least 2.16, but it works also with
older ones. The older I use is 2.12.
> > > is a good IDE for it
I use emacs. I do consider it an IDE... ;-)
> Tried WPM but couldn't figure out how to get kinterbasdb (Firebird SQL
> driver), with it, so just deinstalled it all and used the pyGTK all in
> one and easy_install for sqlkit. Worked without any problems:)
> older ones. The older I use is 2.12
You could have lft WPM and just add kinterbasdb for the python interpreter
older ones. The one in c:\Programs\WPM\org.python....
> I already use poedit for my own stuff. So, send me the sqlkit.pot and
> I have a look. Might do you the German (I am Swiss German, "just"
> living in France) one even if I decide against GTK as looking at
> sqlkit has given me lots of ideas and I am still thinking about a "wx"
> version. I can't do it alone as I am not that technical, but maybe
> can convience some others - will see.......
here it is:
http://hg.argolinux.org/py/sqlkit/raw-file/tip/sqlkit/locale/sqlkit.pot
good night
sandro
*:-)
Tastes are tastes, I was just curious because while KDE users/developers
for instance may say "for consistency, I would like sqlkit to use QT -
native libraries of my preferred DE", wx adds a non-native layer
wherever it is used... but maybe it is easier to install, for instance,
on Mac than pygtk, and that was what I was wondering.
Pietro
"wherever it is used" - pygtk for instance does on Windows but not under
GNOME.
>
> Looking at the pygtk "File dialog" on Windows it is definitely not
> native looking,
> my understanding of wx is that it uses native widgets were ever
> possible and I think
> on *nix this is actually GTK based - but I am no expert on this.
It depends on which frontend you install (there is also QT, and maybe
others) - but yes, GTK frontend is tipically used for instance in GNOME.
>
> Anyhow pyGTK on Windows is still not quit as native looking as
> wxPython - at least
> not out of the box.
OK, that totally makes sense to me, even more so because I ignore the
details.
Pietro