[wxPython] wxSTC.AutoCompSetIgnoreCase

Changing AutoCompSetIgnoreCase does not seem to change the behavior of
AutoComp at all. Can someone confirm that this does indeed work and exactly
what impact it has on how the AutoComp list behaves? Thanks.

Win98SE, Python 2.1, wxPython 2.3.1

···

---
Patrick K. O'Brien
Orbtech (http://www.orbtech.com)
"I am, therefore I think."

Changing AutoCompSetIgnoreCase does not seem to change the behavior of
AutoComp at all. Can someone confirm that this does indeed work and

exactly

what impact it has on how the AutoComp list behaves? Thanks.

The PlatWX layer Scintilla is sitting on top of doesn't check this flag in
ListBox::Find. I suppose it should...

···

--
Robin Dunn
Software Craftsman
robin@AllDunn.com Java give you jitters?
http://wxPython.org Relax with wxPython!

Pretty please...

···

---
Patrick K. O'Brien
Orbtech
"I am, therefore I think."

-----Original Message-----
From: wxpython-users-admin@lists.wxwindows.org
[mailto:wxpython-users-admin@lists.wxwindows.org]On Behalf Of Robin Dunn
Sent: Tuesday, August 28, 2001 3:51 PM
To: wxpython-users@lists.wxwindows.org
Subject: Re: [wxPython] wxSTC.AutoCompSetIgnoreCase

Changing AutoCompSetIgnoreCase does not seem to change the behavior of
AutoComp at all. Can someone confirm that this does indeed work and

exactly

what impact it has on how the AutoComp list behaves? Thanks.

The PlatWX layer Scintilla is sitting on top of doesn't check this flag in
ListBox::Find. I suppose it should...

--
Robin Dunn
Software Craftsman
robin@AllDunn.com Java give you jitters?
http://wxPython.org Relax with wxPython!

_______________________________________________
wxpython-users mailing list
wxpython-users@lists.wxwindows.org
http://lists.wxwindows.org/mailman/listinfo/wxpython-users

[Patrick K. O'Brien]

Changing AutoCompSetIgnoreCase does not seem to change the behavior of
AutoComp at all. Can someone confirm that this does indeed work and
exactly what impact it has on how the AutoComp list behaves? Thanks.

   It didn't work in versions of wxSTC based on Scintilla 1.38 or earlier.

[Robin Dunn]

The PlatWX layer Scintilla is sitting on top of doesn't check this flag in
ListBox::Find. I suppose it should...

   Scintilla 1.39 has changed to perform all the sorting itself and just add
the items to he list in what it thinks is the order rather than relying on
the widget to perform sorting. A benefit here is that platform layers could
drop the Sort and Find methods although for now they are left in there to
avoid breaking implementations.

The wxSTC AutoComp popup list does not sort in the same order that
a native python list is sorted when the list.sort() method is called. Is
there a way to get matching sort orders?

A python list sorts uppercase, then underscores, then lowercase, whereas
the AutoComp list sorts underscores, then alphabetically regardless of
case.

   Scintilla 1.39 uses a simple ordering based on the character values which
is normally ASCII ordering but with case folded if wanted. I think this is
the same ordering as Python. Scintilla 1.38 or earlier used the platform's
native listbox sort which may be a 'culturally aware' sort. Looks like 1.39
removes some nativeness in the look and feel.

Could we have an option to not sort it? That way I could sort the list
myself before I feed it to AutoComp?

   Makes it harder to search if it is unordered. Scintilla 1.39 uses a
binary search so it can deal with very large lists and this requires an
ordering. This could be done if really needed but I can't see the UI working
well if there is no ordering to the list.

   Neil

My code looks something like this:

    list.sort()
    options = ' '.join(list)
    offset = 0
    self.AutoCompShow(offset, options)

So the list would be sorted by Python, not Scintilla. The reason I want this
is that "list" also appears as items in a tree control and it is
disconcerting to have the tree control items sorted one way while the
autocomp items for the same object are sorted another way. Do you see what I
mean?

···

---
Patrick K. O'Brien
Orbtech
"I am, therefore I think."

Could we have an option to not sort it? That way I could sort the list
myself before I feed it to AutoComp?

   Makes it harder to search if it is unordered. Scintilla 1.39 uses a
binary search so it can deal with very large lists and this requires an
ordering. This could be done if really needed but I can't see the UI working
well if there is no ordering to the list.

   Neil

Patrick:

My code looks something like this:

    list.sort()
    options = ' '.join(list)
    offset = 0
    self.AutoCompShow(offset, options)

So the list would be sorted by Python, not Scintilla. The reason I want

this

is that "list" also appears as items in a tree control and it is
disconcerting to have the tree control items sorted one way while the
autocomp items for the same object are sorted another way. Do you see what

I

mean?

   As I said, Scintilla needs to search the list which requires it to
understand the ordering.

   It is likely that a future version of wxSTC based on Scintilla 1.39 will
use the same ordering as Python's list.sort().

   Neil