Hi,

On Fri, 25 Jan 2013 18:50:56 -0600
Russell Adams <rlad...@adamsinfoserv.com> wrote:

> Does anyone have any code samples, best practices, or could recommend
> other open source programs that use tkinter and sql-alchemy that
> correctly demonstrate how to work with the pair?
(...)
> I've tried a few methods now, including using Variables (ie: IntVar,
> StringVar, etc), tracing those variables, and now I'm working through
> creating a class which would inherit from Variable but perform the
> type conversions.

I don't know anything about sql-alchemy, from what you write my first
idea too was to subclass StringVar and add a datatype attribute to the
new SqlVariable class and let get() and set() handle the conversions
according to self.datatype. If you have only the five mentioned datatypes
I think this shouldn't be too hard and might prove quite handy then.

For the date and time datatypes maybe you could borrow some code from the
Pmw.EntryField validation mechanisms.

Regards

Michael


.-.. .. ...- .   .-.. --- -. --.   .- -. -..   .--. .-. --- ... .--. . .-.

Vulcans worship peace above all.
                -- McCoy, "Return to Tomorrow", stardate 4768.3
_______________________________________________
Tkinter-discuss mailing list
Tkinter-discuss@python.org
http://mail.python.org/mailman/listinfo/tkinter-discuss

Reply via email to