maskededit.py - wxMaskedComboBox

Darryl,

Sorry-- this is a combination of a bug and a desire to
emulate standard windows combobox behavior. Due to
the details of how the internal implementation of
wxComboBox handles events and does bookkeeping, I was
forced to reimplement "autocomplete" behavior for
this control myself to preserve that functionality.
(At least under Windows) auto-complete is normally
case-insensitive, and so, by default, I coded
wxMaskedComboBox to say:

## Since combobox completion is case-insensitive, always validate same way
        if not kwargs.has_key('compareNoCase'):
            kwargs['compareNoCase'] = True

However, I neglected to test for this in the Append()
routine. It should have said:

        if self._ctrl_constraints._choiceRequired:
        choice = choice.strip()
            if self._ctrl_constraints._compareNoCase:
                choice = choice.lower()

However, this doesn't really address your problem; if
you were to patch your code this way, and then explicitly
indicate compareNoCase=False in your constructor, then
you'd get the ability to mix case, but lose the
case-independent autocomplete capability.

I've never been entirely comfortable with the current
implementation, because I'm making a lot of assumptions
about the contents of the list, and I had at one point
intended that list for comparison's sake and the actual
combobox values be kept distinct. But it's been so many
months now since I worked on that part that I've
forgotten why I decided to merge them... Anyway, I
will revisit this area and let you know when I have
a better implementation.

Regards and apologies,
/Will Sadkin
Parlance Corporation
www.nameconnector.com

ยทยทยท

-----Original Message-----
From: Daryl Daly [mailto:dwdaly@yahoo.com]
Sent: Sunday, July 20, 2003 12:43 PM
To: wxpython-users@lists.wxwindows.org
Subject: [wxPython-users] maskededit.py - wxMaskedComboBox

I have recently started using wxMasked. objects. I
have run into a problem with the wxMaskedComboBox. Is
there a reason why the Append method of this object
converts the choice being appended to lower case when
choiceRequired is set?

snip of code from mamaskededitypy:

         if self._ctrl_constraints._choiceRequired
             choice = choice.lower().strip()

This is a problem for me because I want the choices to
include upper case characters.

Thanks,
Daryl

__________________________________
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com

---------------------------------------------------------------------
To unsubscribe, e-mail: wxPython-users-unsubscribe@lists.wxwindows.org
For additional commands, e-mail:
wxPython-users-help@lists.wxwindows.org