>>>I have a web browser object, set to editable, in a form. Now I want to use that object as a text entry (with, in the end, syntax coloring) and I've found Yousfi's
article most helpful.
>>>
>>>But, but... the code in the implementation has no parameters! It reacts to _onkeydown() but I don't know which key, because there's nothing holding the value. I see he tried to resolve that by using GetAsyncKeyState API call, but he has to call it 255 times to find which key was last pressed - and not to mention anything about ctrl or alt... so is there a better interface to implement? Or a way to get to the event object from DOM - it's surely passed to the event inside the document, but not to the interface.
>>
>>Hi,
>>
>>Just today Peter Valenca published his HTMLEditor see his message "Shell.explorer.2 create document from variable"
>>Apart from that there also exists a more crude HTMLEditor created by Fred A.
http://www.atoutfox.org/articles.asp?ACTION=FCONSULTER&ID=0000000027 >>If you like his interface I have translated the class comments into english and moked up the class with up-to-date icons and could upload my class. Although Peter's is just working as fine.
>
>Fred's where I started from, but since I need to do syntax coloring, not interaction with selection, those buttons are of no use in this context. I did use it before in a pet project, though.
>
>Tx, I'll take a look at Peter's stuff.
The issue you mention is exactly one of the issues I found troublesome in Yousfi's code. Read the comments I wrote in my WBEventHandler.prg. Esp. the way Yousfi uses GetAsyncKeyState is troublesome. Instead of looping thru all 255 places, you should only test the places in the buffer that you are interested in. The code also handles ctrl, alt, shift, etc.
Groet,
Peter de Valença
Constructive frustration is the breeding ground of genius.
If there’s no willingness to moderate for the sake of good debate, then I have no willingness to debate at all.
Let's develop superb standards that will end the holy wars.
"There are three types of people: Alphas and Betas", said the beta decisively.
If you find this message rude or offensive or stupid, please take a step away from the keyboard and try to think calmly about an eventual a possible alternative explanation of my message.