I mean how do I add branches to the tree, can I search just once branch then?
You don't. Blitz does this for you automatically, and a Binary Search Tree, is sorted in such a way that you always only search one branch at a time. It's kinda like one of those "Guees a number between 1 and 100" puzzles which you could always guess in 7 steps or less, by starting in the middle, and then halving the value each time you "missed" and going higher or lower. Also TMap uses a string as a key or an object? Can you use ints too?
TMap uses objects for keys, so you can use strings (which are also objects) but not ints. It is however a trivial matter to write an int wrapper Type. And if you know more about how "real" hashtables work I'll like to know, just out of curiosity.
A real Hashtable works in much the same way, except the key is typically the hash of the object in question, retrieved by some sort of hashing algorythm. This hash is then used as an index in an array.For more information I recommend reading one of Mark Allen Weiss' books on Data Structures and Algorithm Analysis.