1
edit
Changes
→Help
Thank you, fjzhou. I wonder why I didn't use any code from XMOVER. If you are right, then we have to keep tracking the cursor position on the screen by using getPos() function and comparing with the getCols()? However, I don't think that would be a problem since we keep adjusting the strOffset if the curPosition is at the end of the field. Then the last character of the string will not be at the edge of the screen and the cursor will be. So why would we put the cursor on the last character of the string? -Chun
|-
|Can someone tell why "TAB" key does't work on the matrix using PUTTY. I have set the keybord already........hqiao hyqiao||
|-
| Im having problems with the initial corrections with the offset and curpos. test 4.1 - when i have to correct curpos 40 to 19, program crashes. I know it has to do with the creating a local variable instead of pointing to external. <br/> here is my code that crashes the program: <br/> http://www.noobiedev.com/oop344/oop344-release-0-1-bug/ || Create two local variables to store *strOffset & *curPosition,the purpose of doing this is:<br/>
1. if IsTextEditor is true, test if *strOffset is changed, then teminate the program;(to do this, test everytime you press key that means test it in the loop);;<br/>2. when press the ESC key, if IsTextEditor is false, program revert to the original value(*strOffset & curPosition & *str);<br/><br/>
Before the loop, test this two variables (*strOffset & *curPosition) is vaild:<br/>
1. Is *strOffset & *curPosition NULL? if it is , set to 0;<br/>
2. Does *strOffset go beyond (>string's len)? then, set to a valid value;<br/>
3. If *curPosition > fieldLength? or > strlen? or *curpostion > strlen-*stroffset,if it is, then reset it to an appropriate value.<br/>
I hope these can help you to solve you problem.--hyqiao<br/>
|}