First of all, i dont want to step on anyones toes, (namely Ewayne), but i thought i would post my solution to a program simular to Ewayne AsmTypeA program..

His idea inspired me to work on a variation of his idea to basically test the two object class files that i have created so far. They are designed to reduce overhead with redundant work, such as accessing file information etc. I have to admit they seem robust enough as i managed to finish it in about 200 lines of code (plus comments ~ 250 ). There is 4 funcitons in all.

I simply modified IcZelion's Tutorial #34, and had it branch off to the my new code in 3 places (WM_CHAR, WM_KEYDOWN, and WM_KEYUP handling).

Anywho.. here is how it works if anyone wants to play with it..

On the 4th succesive char pressed after a space/return/tab, the program will search for a match from the wordfile (20,631 words so far) ~ this is surpringly fast with Hutch's search algorithm.

When a match is found, the remaining match of the word is displayed in RED.

If this is the word you wanted, press space or tab to continue.

If not keep spelling out the word, and it will try to rematch.

If your finished spelling a word, and its displaying a longer word, hit SHIFT SPACE to indicate "i have the correct word already" and the remaining word will be dropped.

The word file was built from,, and (plus a few others i could think of). They should give your enough to play with... (I used the same object classes to write another program to parse these files for only the first word on a line and write it into an output file if it has 4 or more characters (the program was 30 lines long) and then i used UltraEdit to sort the file alphabetically ~ so this is how i got 20K words in about 2 min.)

Anywho.. check it out, see what you think.. I will probably put it into the Object Creator tool Thomas and I are working on (the edit section), so if you have any probs, constructive feedback, lemme know..

PS: try typing: "invoke SendMessage ,hWnd, TVM_SETIMAGELIST , eax, TV_SORTCB" :)

Posted on 2001-08-12 15:44:16 by NaN
Btw.. if anyone is currious.. here is the source file i wrote...

This is only a piece of the entire program (the other file is Ic's Tut 34 example with 10 extra line or so to jump to this file on the WM_ events mentioned above..)

But this is the source of the AutoComplete behavior...

Posted on 2001-08-12 15:47:38 by NaN
as a suggestion, I personally think it would work better if tab finished the completed word, and space just typed a space, that way if you finish typing and it's still showing part of another word, simply hit space and you're on to the next word. just a thought.
Posted on 2001-08-12 16:42:30 by mc`
well mc, the "complete it" key has to be one that's quick to reach,
as you will probably be using it a lot :). It can be a bit frustrating
with space though :/.

NaN, case insensitive searched would be nice. Perhaps you should
use a (balanced!) binary tree for the searches? Also, if you move
back to a line with a partial word, it would be nice to be able to
resume the completion... perhaps a ctrl+space combo to do that?
It would also be nice if enter did the auto-completion as well as space,
so I can move to the next line while completing the last parameter
of an invoke call.

Other than that, it works excellently, and is very promising :)
Posted on 2001-08-12 16:55:25 by f0dder
I agree it should be something easy to reach, but using the space bar is a little frustrating. The space bar is a key that when I press, I expect a space, regardless of when I press it. I find the tab key as a good solution for this as it's simply a slight stretch of the pinky finger, and it's not something that most people type in the middle of a line of code.

I also agree that case insensitive searching is a good idea, especially if when the user presses tab (or whatever you decide to use) it fixes the case for you.

Again, these are just personal preferences, but I believe that they would help most people code a lot faster.
Posted on 2001-08-12 18:02:15 by mc`
That's nice. :) It might be better to select the completion by usage rather than by alphabet order. A binary tree would be needed for this. Need better word detection that accounts for all delimiters - basically all non-word characters.

The action keys could all be configurable in a later revision.
Posted on 2001-08-12 18:06:45 by bitRAKE
I liked Ewaynes idea, but i didnt like the way his came out (I dont mean that to be insulting by the way, i love your editor.) But this came out awesome.
Posted on 2001-08-12 19:06:15 by ChimpFace9000
Thanx all there are some good sugestions here, very much appreciated:

NC: Thanx for the thought, but i think i will side with the space and tab.. most often you wont have to force the word to end so i felt SHIFT SPACE was best. As well you may not even need to do this if in an invoke or something because you can just hit ',' and it will cancle out anything remaining anyways...

fodder: Your suggestions are interesting (thanx ~ tho they sound like more overhead :) ). I will see what i can do with the existing layout, the CTRL-SPACE idea might be easily possible.. will look into it.. As for the Return idea, ya that was my first idea, but then i though i shouldnt to allow more editing control... you can stil go 'space enter', which is still a fast key combo to use (( kinda like TAB-SPACE to send off icq messages..)) The case insensitive search however i wonder about, as it sounds like it will cause significant overhead... (im using hutch's BM seach algoithm which is case sensitive, so i would need to revamp this to do such..).. will give it some thought... thanx again.

BitRake: Delimiters, i will look into, i didnt test this, but i assumed the WM_CHAR would provide them as well as normal ascii.. if they arent being noticed its due to this... I will look into it.. However, I think your idea is a good one... I dont think i will build a binary tree however.. my thoughts are building an ini file for customizations, like color preferences, tab space uses etc. etc. and also store a list of statistics on the word use (storing word index number, and the # of times called upon.). Then allow the users to periodically use a dialog box to force a statistical update on the word file (or perhaps provide a threshold statistic limit and automatically resort when a word reaches this point of use). Im weary of having it resort the word file on every use... with 20K words it would be a bit of a lag i figure...

ChimpFace9000: Thanx for your praises. As you know, I do want to re-inforce the fact this was a borrowed idea from Ewayne and it was not to "out-do" his work but rather test the point of my object classes (RAD development). He has a unique version of his own at the moment with alot of promise especially for those who code in the same maner as he does. My version is basicaly the incantation of my suggestions to him in the first place :tongue: ... But still, thanx for your approval..

Posted on 2001-08-12 22:38:25 by NaN
NaN, I haven't looked at how you BM search (?) the wordfile yet,
but if done correctly, the binary tree approach should be faster.
I mean, each time you traverse a node on the tree, you halve the
number of remaining searches... of course this would only work with
a balanced tree, but there are "auto-balancing" trees. You could of
course still use any format for the wordfile, it's "just" the reading and
searching algos that would need to change.

As for case insensitive, it's a must. Not having to fiddle with shift
with my little finger means I code faster =).
Posted on 2001-08-13 00:13:23 by f0dder
Hi NaN

I like your program, I tried ewayne's program first and I liked all of the features and for the most part it worked ok, but his program had some problems.

Your program works good, its to bad you don't have some of his features.

I like ewayne's auto completion feature even if there are some confilcts, it save a lot of keystrokes.

At first I liked ewayne's program and then I liked your program better, but then I tried ewayne's latest program and with the auto completion feature turned off his is almost as good as yours, he still has a few more bugs like going back and fixing existing code etc..

If he gets the bugs out then I'll probally like his better again.

I'll post on his thread about the bugs.

Maybe you two should get togeather and work on the project togeather, I think it will be a great tool.

Posted on 2001-08-13 10:44:17 by BitMan
Thanx all for your suggestions... I will try to implement what i can.. but doing some quick math and looking at the date, im realizing i got too much on the go to finish this venture..

My new goal is a Balanced Binary tree class (shouldnt be too hard) as i need to get the object library finished.

I will most likely put in the suggestion given at a later point, as i do still think it can accent my object editor program... but im basically putting it on hold myself.. (Ive offered the source to Ewayne if he wants it.. )

If someone is truely interested in my Object stuff and want to continue building it with objects i will give you the source and beta object classes (on the condition i get feedback about the object set itself ~ this may be a good way of getting user feedback as to what they feel is missing), irregardless, this will most likely end up in the examples directory with the package......

If is not clear yet, my goal is to get the object class library finished by mid september so i can focus on school, and give the MASM community something to play with all the same.

Thanx again all...

Posted on 2001-08-13 12:25:43 by NaN