Two smal problems: File.ReadList

Bas Hamstra

Member
Licensed User
Longtime User
As newbie I completed a stringsearcher using a 60.000 word dict file. It works and even acceptably fast on the Emulator (!). Two small problems though:

List1 = File.ReadList(File.DirAssets,"woorden.lst")

I get an I/O error with 500K words file. It works with 60K words. Any workaround? The List itsself seems not the problem, it can go quite big, as I have tested.

Second problem: after the user fills the EditText and presses GO! button, I want the keyboard to disappear. HOW?

(So far I am impressed! Next goal is to make an advanced text search tool using RegEx)

Bas
 

Bas Hamstra

Member
Licensed User
Longtime User
One problem solved

Via USB on my GS2 the I/O error disappeared, so must be memory issue on the Emulator. Great that UBS works. Got RegEx working too, so I have built a tiny RegEx searcher that searches a 150.000 word list.

But how do I collapse the keyboard back?

Bas

Couple of side-notes

1) The emulator is not THAT much slower than my GS2 for this app (3x at most)

2) I can't understand that when I clear the ListView the app has to wait for some idle state first. Example:

<at Button1.Click>
ListView1.Clear
Do some stuff

The ListView is only cleared after the stuff is done?

3) RegEx is WAAAY slower than String.Contains(Pattern) so I better reduce the search space with String.Contains(Pattern) first. I expected this (from my Palm days)

Bas
 
Last edited:
Upvote 0

XverhelstX

Well-Known Member
Licensed User
Longtime User
Hey,

Probeer het volgende:
B4X:
'Kies de phone library uit je library tab.
dim p as phone 
p.HideKeyboard(Activity)

------------------------------------
Hi,

Try the following:
B4X:
'Select the phone library from the library pane.
dim p as phone 
p.HideKeyboard(Activity)

Groetjes/kind regards,
Tomas
 
Upvote 0

Bas Hamstra

Member
Licensed User
Longtime User
Yes, that was helpful

ListView clears nicely after DoEvents, thanks!

(But closing the keyboard remains a bit of a hassle)

Nonetheless I'm impressed how far I have come in little time.

Bas
 
Upvote 0
Top