[Gambas-user] Gambas "Best Practices"

richard terry rterry at ...1822...
Mon May 26 07:00:01 CEST 2008


On Mon, 26 May 2008 01:08:39 pm Stephen Bungay wrote:
> Richard, Doug;
>    I too popped up a text box and on each keypress searched a table for
> a partial match, pulled back the recordset and populated a clickable
> list. IMHO this is bad as it hits the tables far too often

bad in theory, in practice it's quick anyway, so does it matter. You could 
presumably cache your database tables in memory?

> , but it 
> depends on how many people are using the app and hitting the tables over
> the network. The table was in MySQL, and the database hosted on a server
> with 30 other diskless workstations, all putting demands on the server
> and I have to say that the app and queries never missed a beat.
>    I did end up writing alot of code so I could do this trick on any
> form  for any table in any database, and it was a pain in the... well...
> you know, but it works incredibly well.

mm........... any chance of the sql/code samples being posted?

What one needs for this as mentioned is an intelligent control, like I 
mentioned Ian Haywood/Karsten wrote gmPhraseWheel for gnumed modelled after 
the behaviour of an old vb client of mine which works well. The logic is in 
gmPhraseWheel.py in cvs.

Regards

Richard

>
> richard terry wrote:
> > This probably won't be of much use to you because I'm not in your
> > programming league and probably off topic for you, however, my 2 cents
> > worth is:
> >
> > QT walks all over GTK.
> >
> > The combo box problem - agree. I've written a medical records system in
> > VB back in 1996/7 which I use at work, and have been tinkering do some
> > modelling of a new system in gambas, and have found similar problems to
> > yourself.
> >
> > Unless I'm wrong, the only way to easily do this would be to roll your
> > own control. If you are into other languages take a look at the
> > cPhraseWheel in the gnumed project which Ian Haywood and Karsten modelled
> > after my vb work from the 90's. Its a super-control - textbox, popup
> > list, spell checker, backend updater etc etc all rolled into one.
> >
> > In my tinkering I must admit that I simply use a textbox with an
> > attatched list box, which popups up as the user types eg to search for
> > people use either j m (would bring up all firstnames j surnames s,  or
> > s,j (like the way you do in your example or john, would bring up all the
> > johns, or ,smith would bring up all the smiths .
> >
> > I find there are lots of limitations with many of the qt controls in
> > annoying ways, but at the end of the day they function well, the IDE of
> > gambas is easy to use.
> >
> > Don't know what database you are using but Postgresql seems to stand out
> > from the pack. pgAdmin3 is available on linux, not bad, but for anything
> > complex like working out complex queries or functions (with my puny
> > cerebrum), I purchased a copy of EMS sqlmanager for postgres for windows
> > which I run in virtualbox (seamless mode) on my ARCH linux laptop, so I
> > can can past queries etc between the two environments - works well.
> >
> > Hope you stick with gambas and bring some expertise, as many seem to come
> > and go due to some of the frustrations inherent in a developing language
> > and lack of documentation.
> >
> > Regards
> >
> > Richard
> >
> > On Tue, 20 May 2008 01:43:01 am Doug Gack wrote:
> >> Background:
> >>
> >>     I am an independent software developer, primarily providing custom
> >> business applications to small businesses. I do most of my work in M$
> >> Access, but also some in PHP and ASP Internet forms. (After programming
> >> for 40+ years, another language is easier to learn than the first few.)
> >> I've been looking for a couple of years for a way to do the same thing
> >> in Linux, and it looks like I've finally found it. Thank you. Gambas!
> >>
> >> I just completed a conversion of a (tiny) application from Access/ASP to
> >> Gambas/MySql/PHP, and it works just fine, thank you very much!
> >> Except....
> >>
> >> As when learning any new environment, there's a prolonged period of
> >> developing a "style" for the environment.
> >>
> >> I started off trying to create a "Graphical" application, not knowing
> >> any better, and soon (well, not so soon, actually) realized that a "QT
> >> Application" would give me a lot better user environment. That's just
> >> one of the bumps encountered on the road, but I got it to work, so I'm
> >> better for the experience.
> >>
> >> Question is, what can anyone tell me about better ways to approach the
> >> subject?
> >>
> >> Some starter questions:
> >>
> >> - Which graphical environment, and why?
> >>
> >> - I've been spoiled by Access's methods with combo boxes, and it's
> >> become my most used way of looking up data. If I want to find "Smith,
> >> John", I start typing "smi...", and soon his name pops up. Looks like
> >> Linux subscribes to the browser forms method of only using only the
> >> first letter out of a list. I type "S" and get "Sa...", then type "m"
> >> and get "Ma...". When I have a list with 15 or 20 thousand names, this
> >> won't do. How have others solved this issue?
> >>
> >> Any starter suggestions?
> >>
> >> TIA,
> >>
> >> Doug
> >>
> >>
> >> Doug Gack
> >> Homepage: http://dgack.selfip.com
> >>
> >> _________________________________________________________________
> >> E-mail for the greater good. Join the i’m Initiative from Microsoft.
> >> http://im.live.com/Messenger/IM/Join/Default.aspx?source=EML_WL_
> >> GreaterGood
> >> ------------------------------------------------------------------------
> >>- This SF.net email is sponsored by: Microsoft
> >> Defy all challenges. Microsoft(R) Visual Studio 2008.
> >> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
> >> _______________________________________________
> >> Gambas-user mailing list
> >> Gambas-user at lists.sourceforge.net
> >> https://lists.sourceforge.net/lists/listinfo/gambas-user
> >
> > -------------------------------------------------------------------------
> > This SF.net email is sponsored by: Microsoft
> > Defy all challenges. Microsoft(R) Visual Studio 2008.
> > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
> > _______________________________________________
> > Gambas-user mailing list
> > Gambas-user at lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/gambas-user






More information about the User mailing list