[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gnumed-devel] Re: Next learning question
From: |
Richard Terry |
Subject: |
[Gnumed-devel] Re: Next learning question |
Date: |
Fri, 20 Aug 2004 20:48:44 +1000 |
User-agent: |
KMail/1.5.4 |
I would't fragment the top text bar - tried that - reason - the different
length of names:
eg Carmody Howell_Hobson 29 Bat rd Cams 2290
eg John smith Flat 999 "the gables", Rear of chemist, 141 Dudley Rd,
Whitebridge 2290
also the more gui-elements, the more distracted the reader.
BTW flicking this to list, the python tutorial will probaby help more than me.
thanks
Richard
On Fri, 20 Aug 2004 08:38 pm, you wrote:
> > def match(pattern, string, flags=0)
> > from gmPatientSelector.py:
> >
> > ==================================
> > if self.IsModified() #if contents of textbox modified
> > and not
> > re.match #?what's with re?? KPE
>
> re is the "normal" version of sre, eg. the Python regular
> expression pattern matching library.
>
> > ("^(\s|\t)*$", #translation please KPE
>
> regular expression
>
> ^ anchored at start of string
> ( start group of patterns
> \s spaces
>
> | or
>
> \t tabs
> ) end group of patterns
> * repeat patterns in () as many times as needed
> $ anchor at end of string
>
> eg. match whitespace-only terms
>
> > curr_search_term # - name textbox I guess
>
> No, currently typed search fragment.
>
> Purpose of this is to weed out empty search terms.
>
> Is, however, now changed to the much cleaner:
>
> if curr_search_term.strip() == '':
> return
> if self.IsModified():
> ....
>
> > If you look at the web
> > example the window in my program usually contains full information:
> >
> > This is essential because we need plenty of clues as to who we are
> > dealing with.
>
> OK. So we add another "details" field next to the name.
> Or maybe it will work with just one field.
>
> > re: self.prev_search_term = curr_search_term
> >
> > If you use the previous contents of the search box as your search
> > fragment on a re-search you are asking for trouble
>
> Why ?
>
> > Incidentally that is why this textbox is long (to fit name,
> > address/suburb in it).
>
> That makes sense.
>
> Karsten
- [Gnumed-devel] Re: Next learning question,
Richard Terry <=