473,218 Members | 1,418 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,218 software developers and data experts.

Strange wxChoice.FindString behavior

Hello everybody,

I had this problem using the FindString funcion of a wxChoice object
on wxPython:
* I have Windows 98
* I read a text file edited on a Japanese computer, but only uses
'english' characters.
* From the file I loaded some strings in some wxChoice object.
* Later when I wanted to find an string using 'FindString' I never
got a match, even when I say my string, I printed both strings and
look same!, same lenght, same internal coding, so the only way to find
my string is by using:

## my own Find string function, choice is a wxChoice object
def FindString(choice, thestring):
for i in range(choice.GetCount()):
txta = choiceDevice.GetString(i)
if len(txta) != len(thestring):
continue
if map(ord, txta) != map(ord, thestring):
continue
return i #we have a match
return -1 #not found

So this is my best solution to something I think should not happen.
Any comments?.

Rene
Jul 18 '05 #1
0 1053

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: ' | last post by:
I want to get the selection of several wxChoice boxes. But i do not want to have to catch the events for all the boxes I should be able to access the current selection outside of an event,but i am...
17
by: amber | last post by:
Hello. Can someone tell me what I may be doing wrong here? I'm using the code (lboxRP is a listbox): Dim newRPindex As Integer newRPindex = Me.lboxRP.FindString(RP)...
1
by: Marcin Floryan | last post by:
Hello! I have recently come across two very nice methods in ListBox control: ..FindString and .FindStringExact it is very usefull for me, and I would like to use it in some other situations. ...
2
by: Jorge | last post by:
Hello I have a little problem i have a checkedlistbox with several repeated items. The code below only selects the first ocurrence While reader.Read For i = 0 To...
4
by: J L | last post by:
I am trying to use the following code to auto fill a combo box (credit and thanks to Code Project and Daryl) Public Sub AutoFillCombo(ByVal theCombo As ComboBox, ByVal theKey As Keys) Dim...
6
by: Joseph Geretz | last post by:
Writing an Outlook AddIn with C#. For the user interface within Outlook I'm adding matching pairs of Toolbar buttons and Menu items. All of the buttons and menu items are wired up to send events to...
0
by: VivesProcSPL | last post by:
Obviously, one of the original purposes of SQL is to make data query processing easy. The language uses many English-like terms and syntax in an effort to make it easy to learn, particularly for...
3
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 3 Jan 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). For other local times, please check World Time Buddy In...
0
by: jianzs | last post by:
Introduction Cloud-native applications are conventionally identified as those designed and nurtured on cloud infrastructure. Such applications, rooted in cloud technologies, skillfully benefit from...
0
by: abbasky | last post by:
### Vandf component communication method one: data sharing ​ Vandf components can achieve data exchange through data sharing, state sharing, events, and other methods. Vandf's data exchange method...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 7 Feb 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:30 (7.30PM). In this month's session, the creator of the excellent VBE...
0
by: fareedcanada | last post by:
Hello I am trying to split number on their count. suppose i have 121314151617 (12cnt) then number should be split like 12,13,14,15,16,17 and if 11314151617 (11cnt) then should be split like...
0
by: stefan129 | last post by:
Hey forum members, I'm exploring options for SSL certificates for multiple domains. Has anyone had experience with multi-domain SSL certificates? Any recommendations on reliable providers or specific...
0
Git
by: egorbl4 | last post by:
Скачал я git, хотел начать настройку, а там вылезло вот это Что это? Что мне с этим делать? ...
1
by: davi5007 | last post by:
Hi, Basically, I am trying to automate a field named TraceabilityNo into a web page from an access form. I've got the serial held in the variable strSearchString. How can I get this into the...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.